Skip to content

Commit d25e94c

Browse files
feat: support eslint 9 (#250)
* feat: support eslint 9 * chore: update lock file * ci: update * feat: support eslint 9
1 parent 6ce70cf commit d25e94c

18 files changed

+609
-1209
lines changed

.eslintrc.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
module.exports = {
22
root: true,
3-
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
3+
extends: [
4+
'@webpack-contrib/eslint-config-webpack/rules/possible-errors',
5+
'@webpack-contrib/eslint-config-webpack/rules/best-practices',
6+
'@webpack-contrib/eslint-config-webpack/rules/variables',
7+
'@webpack-contrib/eslint-config-webpack/rules/node',
8+
'@webpack-contrib/eslint-config-webpack/rules/stylistic-issues',
9+
'@webpack-contrib/eslint-config-webpack/rules/es2015',
10+
'prettier',
11+
],
12+
parserOptions: {
13+
ecmaVersion: 2018,
14+
env: {
15+
es6: true,
16+
jest: true,
17+
},
18+
sourceType: 'module',
19+
},
420
rules: {
21+
strict: 'error',
522
'global-require': 'off',
6-
'import/no-dynamic-require': 'off',
723
},
824
};

.github/workflows/nodejs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,15 @@ jobs:
6161
matrix:
6262
os: [ubuntu-latest, windows-latest, macos-latest]
6363
node-version: [14.x, 16.x, 18.x, 20.x]
64-
eslint-version: [8.x]
64+
eslint-version: [8.x, 9.x]
6565
webpack-version: [latest]
66+
exclude:
67+
- node-version: 14.x
68+
os: macos-latest
69+
- node-version: 14.x
70+
eslint-version: 9.x
71+
- node-version: 16.x
72+
eslint-version: 9.x
6673

6774
runs-on: ${{ matrix.os }}
6875

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,13 @@ Specify the path to the cache location. Can be a file or a directory.
111111
- Type:
112112

113113
```ts
114-
type configType = "flat" | "eslintrc";
114+
type configType = 'flat' | 'eslintrc';
115115
```
116116

117117
- Default: `eslintrc`
118118

119119
Specify the type of configuration to use with ESLint.
120+
120121
- `eslintrc` is the classic configuration format available in most ESLint versions.
121122
- `flat` is the new format introduced in ESLint 8.21.0.
122123

0 commit comments

Comments
 (0)