Skip to content

Commit 82f70db

Browse files
arturosdgclaude
andauthored
chore(deps-dev): upgrade ESLint 8 → 9.x with flat config migration (#356)
* chore(deps-dev): upgrade eslint to 9.x with flat config migration - Upgrade eslint 8.57.1 → 9.39.4 - Migrate .eslintrc (legacy) to eslint.config.js (flat config) - Replace abandoned eslint-config-react-app with @eslint/js, typescript-eslint, eslint-plugin-react-hooks, and globals - Add lint script to package.json and lint step to CI - Fix @ts-ignore@ts-expect-error and remove unused variables surfaced by new rules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(deps-dev): remove eslint-plugin-react-hooks (YAGNI) src/ has no hooks; only test fixtures use them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(eslint): remove dead rules (YAGNI) Drop rules already covered by js.configs.recommended, disabled by eslint-config-prettier, or unreachable due to no-var. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: trigger pipeline check * chore(eslint): fix globals — vitest not jest, drop es2015 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: use npm install instead of npm ci rolldown (vitest 4.x) has platform-specific optional binaries. A lockfile generated on macOS omits linux variants; npm ci then fails on ubuntu runners with 'Cannot find @rolldown/binding-linux-x64-gnu'. npm install resolves the correct platform binaries regardless of what the lockfile recorded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Revert "ci: use npm install instead of npm ci" This reverts commit 02e82f3. * fix(deps): regenerate lockfile with all-platform optional deps The lockfile regenerated during the rebase on macOS dropped the linux rolldown bindings (npm/cli#4828), breaking npm ci on ubuntu runners. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8473ad8 commit 82f70db

13 files changed

Lines changed: 1244 additions & 3979 deletions

File tree

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

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

.github/workflows/integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
node-version-file: .nvmrc
1818
- run: |
1919
npm ci
20+
npm run lint
2021
npm run test
2122
npm run build
2223
npm run check:exports

eslint.config.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactPlugin from 'eslint-plugin-react'
4+
import prettierRecommended from 'eslint-plugin-prettier/recommended'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
js.configs.recommended,
10+
tseslint.configs.recommended,
11+
reactPlugin.configs.flat.recommended,
12+
{
13+
languageOptions: {
14+
globals: {
15+
...globals.node,
16+
...globals.vitest,
17+
},
18+
parserOptions: {
19+
ecmaFeatures: { jsx: true },
20+
},
21+
},
22+
settings: {
23+
react: { version: 'detect' },
24+
},
25+
rules: {
26+
'no-var': 'error',
27+
eqeqeq: 'error',
28+
'no-alert': 'error',
29+
'no-eval': 'error',
30+
'no-empty-function': 'error',
31+
complexity: ['warn', 8],
32+
},
33+
},
34+
{
35+
files: ['**/*.ts', '**/*.tsx'],
36+
rules: {
37+
'no-empty-function': 'off',
38+
'@typescript-eslint/no-explicit-any': 'off',
39+
'@typescript-eslint/ban-ts-comment': [
40+
'error',
41+
{ 'ts-expect-error': false, 'ts-ignore': true },
42+
],
43+
},
44+
},
45+
{
46+
files: ['**/*.d.ts'],
47+
rules: {
48+
'@typescript-eslint/no-empty-object-type': 'off',
49+
},
50+
},
51+
prettierRecommended,
52+
)

0 commit comments

Comments
 (0)