Skip to content

Commit b4ff57d

Browse files
jmlwebclaude
andauthored
Upgrade ESLint to version 9 (#6)
* chore: upgrade ESLint to version 9 - Upgrade eslint from ^8.57.0 to ^9.39.1 - Migrate from .eslintrc.js to flat config (eslint.config.mjs) - Add required ESLint v9 dependencies (@eslint/js, typescript-eslint) - Add eslint-formatter-unix package for unix format support - Remove unused eslint-disable directive from memoize.ts - Verify all tests and linting pass successfully * refactor: use globals package and upgrade eslint-related packages - Install globals package and refactor eslint.config.mjs to use it - Replace manual globals definition with globals.node and globals.es2021 - Upgrade eslint-config-prettier: 9.1.0 → 10.1.8 - Upgrade eslint-plugin-prettier: 5.1.3 → 5.5.4 - Upgrade eslint-plugin-simple-import-sort: 10.0.0 → 12.1.1 - Upgrade eslint-plugin-tsdoc: 0.2.17 → 0.4.0 - Upgrade prettier: 3.3.2 → 3.6.2 - Verify all tests and linting pass successfully --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 67176f7 commit b4ff57d

5 files changed

Lines changed: 335 additions & 264 deletions

File tree

.eslintrc.js

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

eslint.config.mjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import eslint from '@eslint/js';
2+
import prettierConfig from 'eslint-config-prettier';
3+
import prettierPlugin from 'eslint-plugin-prettier';
4+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
5+
import tsdoc from 'eslint-plugin-tsdoc';
6+
import globals from 'globals';
7+
import tseslint from 'typescript-eslint';
8+
9+
export default [
10+
// Base ESLint recommended rules
11+
eslint.configs.recommended,
12+
13+
// TypeScript ESLint recommended rules
14+
...tseslint.configs.recommended,
15+
16+
// Prettier config (disables conflicting rules)
17+
prettierConfig,
18+
19+
// Main configuration
20+
{
21+
files: ['**/*.ts', '**/*.tsx'],
22+
plugins: {
23+
'@typescript-eslint': tseslint.plugin,
24+
'simple-import-sort': simpleImportSort,
25+
'tsdoc': tsdoc,
26+
'prettier': prettierPlugin,
27+
},
28+
languageOptions: {
29+
parser: tseslint.parser,
30+
parserOptions: {
31+
project: './tsconfig.json',
32+
},
33+
globals: {
34+
...globals.node,
35+
...globals.es2021,
36+
},
37+
},
38+
rules: {
39+
'prettier/prettier': 'error',
40+
'simple-import-sort/imports': 'error',
41+
'simple-import-sort/exports': 'error',
42+
'tsdoc/syntax': 'warn',
43+
},
44+
},
45+
];

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
},
5454
"devDependencies": {
5555
"@commitlint/config-conventional": "^20.0.0",
56+
"@eslint/js": "^9.39.1",
5657
"@mxssfd/typedoc-theme": "^1.1.3",
5758
"@semantic-release/git": "^10.0.1",
5859
"@size-limit/esbuild": "^11.2.0",
@@ -62,21 +63,24 @@
6263
"@typescript-eslint/eslint-plugin": "^8.0.0",
6364
"@typescript-eslint/parser": "^8.0.0",
6465
"commitlint": "^20.1.0",
65-
"eslint": "^8.57.0",
66-
"eslint-config-prettier": "^9.1.0",
67-
"eslint-plugin-prettier": "^5.1.1",
68-
"eslint-plugin-simple-import-sort": "^10.0.0",
69-
"eslint-plugin-tsdoc": "^0.2.17",
66+
"eslint": "^9.39.1",
67+
"eslint-config-prettier": "^10.1.8",
68+
"eslint-formatter-unix": "^9.0.1",
69+
"eslint-plugin-prettier": "^5.5.4",
70+
"eslint-plugin-simple-import-sort": "^12.1.1",
71+
"eslint-plugin-tsdoc": "^0.4.0",
72+
"globals": "^16.5.0",
7073
"husky": "^9.1.7",
7174
"jest": "^29.7.0",
7275
"lint-staged": "^16.2.6",
73-
"prettier": "^3.3.0",
76+
"prettier": "^3.6.2",
7477
"semantic-release": "^24.0.0",
7578
"size-limit": "^11.2.0",
7679
"ts-jest": "^29.2.0",
7780
"tsup": "^8.3.0",
7881
"type-coverage": "^2.29.7",
7982
"typedoc": "^0.27.0",
80-
"typescript": "^5.6.3"
83+
"typescript": "^5.6.3",
84+
"typescript-eslint": "^8.46.3"
8185
}
8286
}

0 commit comments

Comments
 (0)