Skip to content

Commit 067b473

Browse files
vveerrggclaude
andcommitted
chore(lint): migrate ESLint 8 to 9 with flat config
Replace legacy .eslintrc.json with eslint.config.js (flat config). Upgrade eslint ^8.56 -> ^9.27, @typescript-eslint/* ^6.16 -> ^8.32, add @eslint/js. Disable no-undef (TypeScript handles this), prefix unused catch vars with underscore, replace ternary statement with if/else in metrics.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8fa1f3d commit 067b473

7 files changed

Lines changed: 422 additions & 640 deletions

File tree

.eslintrc.json

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

eslint.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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': 'warn',
30+
'@typescript-eslint/explicit-function-return-type': 'off',
31+
'@typescript-eslint/no-unused-vars': ['error', {
32+
argsIgnorePattern: '^_',
33+
varsIgnorePattern: '^_',
34+
caughtErrorsIgnorePattern: '^_',
35+
}],
36+
},
37+
},
38+
];

0 commit comments

Comments
 (0)