Skip to content

Commit c4d65fe

Browse files
vveerrggclaude
andcommitted
chore(lint): migrate ESLint 8 to 9 with flat config
Replace legacy .eslintrc.json and .eslintignore with eslint.config.js (flat config). Upgrade eslint ^8.56 -> ^9.27, @typescript-eslint/* ^6.16 -> ^8.32, add @eslint/js. Ignores now live in flat config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f58b7eb commit c4d65fe

5 files changed

Lines changed: 524 additions & 733 deletions

File tree

.eslintignore

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

.eslintrc.json

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

eslint.config.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from '@typescript-eslint/eslint-plugin';
3+
import tsparser from '@typescript-eslint/parser';
4+
5+
export default [
6+
{
7+
ignores: ['dist/**', 'node_modules/**', 'coverage/**', 'examples/**'],
8+
},
9+
{
10+
files: ['**/*.ts'],
11+
languageOptions: {
12+
parser: tsparser,
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
sourceType: 'module',
16+
},
17+
globals: {
18+
console: 'readonly',
19+
process: 'readonly',
20+
},
21+
},
22+
plugins: {
23+
'@typescript-eslint': tseslint,
24+
},
25+
rules: {
26+
...eslint.configs.recommended.rules,
27+
...tseslint.configs.recommended.rules,
28+
'no-undef': 'off',
29+
'@typescript-eslint/no-explicit-any': 'off',
30+
'@typescript-eslint/explicit-function-return-type': 'off',
31+
'@typescript-eslint/no-unused-vars': ['warn', {
32+
argsIgnorePattern: '^_',
33+
varsIgnorePattern: '^_',
34+
caughtErrorsIgnorePattern: '^_',
35+
}],
36+
'no-console': ['warn', { allow: ['warn', 'error'] }],
37+
},
38+
},
39+
];

0 commit comments

Comments
 (0)