Skip to content

Commit 292dd04

Browse files
feat: upgrade to ESLint v9 & all related dependencies 🔥 (#271)
BREAKING CHANGE: Many rules have been changed, if you have a lot of overrides expect some work to move to a different rule.
2 parents 1b13cd7 + fc93966 commit 292dd04

File tree

31 files changed

+9257
-8844
lines changed

31 files changed

+9257
-8844
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/packages/eslint-config-base/ @robertrossmann
99
/packages/eslint-config-node/ @robertrossmann
1010
/packages/eslint-config-mocha/ @robertrossmann
11+
/packages/eslint-config-typescript/ @robertrossmann
1112
/packages/eslint-config-graphql/ @developer239
1213
/packages/eslint-config-react/ @robertrossmann @matejpolak
1314
/packages/prettier-config/ @robertrossmann @matejpolak

.github/workflows/commitlint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
CI: 'true'
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- uses: actions/setup-node@v3
19+
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 20
21+
node-version: 24
2222
cache: npm
2323

2424
- run: make install

.github/workflows/deploy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
CI: 'true'
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- uses: actions/setup-node@v3
19+
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 20
21+
node-version: 24
2222
cache: npm
2323

2424
- run: make install

.github/workflows/lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
CI: 'true'
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
17-
- uses: actions/setup-node@v3
17+
- uses: actions/setup-node@v4
1818
with:
19-
node-version: 20
19+
node-version: 24
2020
cache: npm
2121

2222
- run: make install

documentation/eslint/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const files = {
7171
}
7272

7373
// This will allow your IDE to provide autocomplete suggestions ✨
74-
/** @type {Array<import("eslint").Linter.FlatConfig>} */
74+
/** @type {Array<import("eslint").Linter.Config>} */
7575
const config = [{
7676
linterOptions: {
7777
reportUnusedDisableDirectives: true,

eslint.config.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
import node from './packages/eslint-config-node/index.mjs'
2-
import optional from './packages/eslint-config-node/optional.mjs'
3-
import style from './packages/eslint-config-node/style.mjs'
1+
import { defineConfig } from 'eslint/config'
2+
import node from '@strv/eslint-config-node'
3+
import optional from '@strv/eslint-config-node/optional'
4+
import style from '@strv/eslint-config-node/style'
45

5-
/** @type {Array<import("eslint").Linter.Config>} */
6-
const config = [{
6+
export default defineConfig([{
7+
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
8+
extends: [
9+
node,
10+
optional,
11+
style,
12+
],
713
linterOptions: {
8-
reportUnusedDisableDirectives: true,
14+
reportUnusedDisableDirectives: 'warn',
915
},
10-
ignores: [
11-
'node_modules',
12-
'!.*.js',
13-
],
1416
settings: {
1517
'import/resolver': { typescript: {} },
1618
},
17-
},
18-
node,
19-
optional,
20-
style,
21-
{
22-
rules: {},
23-
}]
24-
25-
export default config
19+
}])

0 commit comments

Comments
 (0)