Skip to content

Commit d1812c8

Browse files
committed
fix: update ESLint configuration for compatibility with ESLint 9.x
- Remove deprecated .eslintrc.json configuration - Add new eslint.config.js using flat config format - Install @eslint/eslintrc for compatibility - Resolve 'useEslintrc' and 'extensions' options error
1 parent fef7719 commit d1812c8

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

.eslintrc.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

eslint.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { FlatCompat } from '@eslint/eslintrc';
2+
import js from '@eslint/js';
3+
import path from 'path';
4+
import { fileURLToPath } from 'url';
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
});
13+
14+
export default [
15+
...compat.extends('next/core-web-vitals'),
16+
{
17+
rules: {
18+
'@typescript-eslint/no-explicit-any': 'warn',
19+
},
20+
},
21+
];

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@ant-design/icons": "^6.0.0",
1616
"@clerk/nextjs": "^4.31.5",
1717
"@clerk/themes": "^2.2.3",
18+
"@eslint/eslintrc": "^3.3.1",
1819
"@heroicons/react": "^2.0.18",
1920
"framer-motion": "^12.0.0",
2021
"next": "^14.1.0",
@@ -26,13 +27,13 @@
2627
"@types/node": "24.7.2",
2728
"@types/react": "18.3.12",
2829
"@types/react-dom": "18.3.1",
29-
"typescript": "5.9.3",
30+
"autoprefixer": "10.4.21",
3031
"eslint": "9.38.0",
3132
"eslint-config-next": "15.5.6",
33+
"postcss": "8.5.6",
3234
"prettier": "^3.5.3",
3335
"prettier-plugin-tailwindcss": "^0.7.1",
3436
"tailwindcss": "3.4.15",
35-
"postcss": "8.5.6",
36-
"autoprefixer": "10.4.21"
37+
"typescript": "5.9.3"
3738
}
3839
}

0 commit comments

Comments
 (0)