Skip to content

Commit 0605d69

Browse files
committed
chore(eslint): migrate to eslint 9 flat config
1 parent 3f707e2 commit 0605d69

10 files changed

+3346
-2583
lines changed

.eslintrc.cjs

-39
This file was deleted.

eslint.config.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import importPlugin from 'eslint-plugin-import';
4+
import jsxA11y from 'eslint-plugin-jsx-a11y';
5+
import react from 'eslint-plugin-react';
6+
import reactHooks from 'eslint-plugin-react-hooks';
7+
import reactCompiler from 'eslint-plugin-react-compiler';
8+
9+
export default tseslint.config(
10+
{ ignores: ['dist/', 'website/'] },
11+
eslint.configs.recommended,
12+
tseslint.configs.recommended,
13+
importPlugin.flatConfigs.recommended,
14+
jsxA11y.flatConfigs.recommended,
15+
react.configs.flat.recommended,
16+
react.configs.flat['jsx-runtime'],
17+
reactHooks.configs['recommended-latest'],
18+
reactCompiler.configs.recommended,
19+
{
20+
settings: {
21+
'import/resolver': { typescript: true },
22+
react: { version: 'detect' },
23+
},
24+
rules: {
25+
'@typescript-eslint/no-unused-vars': [
26+
'error',
27+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
28+
],
29+
},
30+
},
31+
);

package.json

+26-25
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"src",
3434
"dist"
3535
],
36-
"packageManager": "pnpm@8.15.0",
36+
"packageManager": "pnpm@9.4.0",
3737
"scripts": {
3838
"compile": "rm -rf dist && pnpm run '/^compile:.*/'",
3939
"compile:esm": "tsc -p tsconfig.esm.json",
@@ -57,32 +57,33 @@
5757
"singleQuote": true
5858
},
5959
"devDependencies": {
60-
"@testing-library/jest-dom": "^6.4.5",
61-
"@testing-library/react": "^15.0.7",
62-
"@testing-library/user-event": "^14.5.2",
63-
"@types/node": "^20.12.12",
64-
"@types/react": "^18.3.2",
65-
"@types/react-dom": "^18.3.0",
66-
"@typescript-eslint/eslint-plugin": "^7.10.0",
67-
"@typescript-eslint/parser": "^7.10.0",
68-
"eslint": "^8.57.0",
69-
"eslint-config-prettier": "^9.1.0",
70-
"eslint-import-resolver-typescript": "^3.6.1",
71-
"eslint-plugin-import": "^2.29.1",
72-
"eslint-plugin-jsx-a11y": "^6.8.0",
73-
"eslint-plugin-react": "^7.34.1",
74-
"eslint-plugin-react-hooks": "^4.6.2",
75-
"happy-dom": "^14.11.0",
76-
"jotai": "^2.8.0",
77-
"jotai-optics": "link:.",
60+
"@eslint/js": "^9.19.0",
61+
"@testing-library/jest-dom": "^6.6.3",
62+
"@testing-library/react": "^16.2.0",
63+
"@testing-library/user-event": "^14.6.1",
64+
"@types/node": "^22.10.10",
65+
"@types/react": "^19.0.8",
66+
"@types/react-dom": "^19.0.3",
67+
"eslint": "^9.19.0",
68+
"eslint-import-resolver-typescript": "^3.7.0",
69+
"eslint-plugin-import": "^2.31.0",
70+
"eslint-plugin-jsx-a11y": "^6.10.2",
71+
"eslint-plugin-react": "^7.37.4",
72+
"eslint-plugin-react-compiler": "19.0.0-beta-decd7b8-20250118",
73+
"eslint-plugin-react-hooks": "5.2.0-canary-de1eaa26-20250124",
74+
"happy-dom": "^16.7.2",
75+
"jotai": "^2.11.1",
76+
"jotai-optics": "link:",
7877
"optics-ts": "^2.4.1",
79-
"prettier": "^3.2.5",
80-
"react": "^18.3.1",
81-
"react-dom": "^18.3.1",
78+
"prettier": "^3.4.2",
79+
"react": "^19.0.0",
80+
"react-dom": "^19.0.0",
8281
"ts-expect": "^1.3.0",
83-
"typescript": "^5.4.5",
84-
"vite": "^5.2.11",
85-
"vitest": "^1.6.0"
82+
"typescript": "^5.7.3",
83+
"typescript-eslint": "^8.21.0",
84+
"vite": "^6.0.11",
85+
"vite-tsconfig-paths": "^5.1.4",
86+
"vitest": "^3.0.4"
8687
},
8788
"peerDependencies": {
8889
"jotai": ">=2.0.0",

0 commit comments

Comments
 (0)