Skip to content

Commit 3149e42

Browse files
committed
fix: resolve ESLint circular structure error and linting issues
1 parent f1715b7 commit 3149e42

5 files changed

Lines changed: 58 additions & 38 deletions

File tree

eslint.config.mjs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
import { defineConfig } from "eslint/config";
2-
import next from "eslint-config-next";
3-
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
41
import typescriptEslint from "@typescript-eslint/eslint-plugin";
52
import tsParser from "@typescript-eslint/parser";
6-
import path from "node:path";
7-
import { fileURLToPath } from "node:url";
83
import js from "@eslint/js";
9-
import { FlatCompat } from "@eslint/eslintrc";
4+
import globals from "globals";
105

11-
const __filename = fileURLToPath(import.meta.url);
12-
const __dirname = path.dirname(__filename);
13-
const compat = new FlatCompat({
14-
baseDirectory: __dirname,
15-
recommendedConfig: js.configs.recommended,
16-
allConfig: js.configs.all
17-
});
18-
19-
export default defineConfig([{
20-
extends: [
21-
...compat.extends("plugin:@typescript-eslint/recommended"),
22-
...next,
23-
...nextCoreWebVitals,
24-
...compat.extends("prettier")
25-
],
26-
27-
plugins: {
28-
"@typescript-eslint": typescriptEslint,
29-
},
30-
31-
languageOptions: {
32-
parser: tsParser,
33-
ecmaVersion: 12,
34-
sourceType: "module",
35-
36-
parserOptions: {
37-
ecmaFeatures: {
38-
jsx: true,
6+
export default [
7+
js.configs.recommended,
8+
{
9+
files: ["**/*.{js,jsx,ts,tsx}"],
10+
plugins: {
11+
"@typescript-eslint": typescriptEslint,
12+
},
13+
languageOptions: {
14+
parser: tsParser,
15+
ecmaVersion: 12,
16+
sourceType: "module",
17+
globals: {
18+
...globals.browser,
19+
...globals.node,
20+
...globals.es2021,
3921
},
22+
parserOptions: {
23+
ecmaFeatures: {
24+
jsx: true,
25+
},
26+
},
27+
},
28+
rules: {
29+
...typescriptEslint.configs.recommended.rules,
30+
"@typescript-eslint/no-explicit-any": "warn",
31+
"@typescript-eslint/no-unused-vars": ["error", {
32+
"argsIgnorePattern": "^_",
33+
"varsIgnorePattern": "^_"
34+
}],
35+
"no-redeclare": "off",
36+
"@typescript-eslint/no-redeclare": "error",
4037
},
4138
},
42-
}]);
39+
{
40+
ignores: [".next/**", "node_modules/**", "out/**", "public/**"],
41+
}
42+
];

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"eslint-config-prettier": "^10.1.8",
5151
"eslint-import-resolver-typescript": "^4.4.4",
5252
"eslint-plugin-prettier": "^5.5.4",
53+
"globals": "^16.5.0",
5354
"husky": "^9.1.7",
5455
"postcss": "^8.5.6",
5556
"prettier": "^3.6.2",

tailwind.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = {
2323
secondary: '#67bd41',
2424
juniper: '#67bd41',
2525
light_juniper: '#83f251',
26-
slate: '#52575c',
2726
honey: '#f6d87c',
2827
vanilla: {
2928
100: '#ffffff',

topics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
type IndexedTopics = Record<string, string>;
1+
type IndexedTopicsType = Record<string, string>;
22

3-
export const IndexedTopics: IndexedTopics = {
3+
export const IndexedTopics: IndexedTopicsType = {
44
"sdg-1": "SDG-1 - No Poverty",
55
"sdg-2": "SDG-2 - Zero Hunger",
66
"sdg-3": "SDG-3 - Good Health And Well-Being",

0 commit comments

Comments
 (0)