Skip to content

Commit

Permalink
feat: support eslint 9 (#250)
Browse files Browse the repository at this point in the history
* feat: support eslint 9

* chore: update lock file

* ci: update

* feat: support eslint 9
  • Loading branch information
ricardogobbosouza committed May 3, 2024
1 parent 6ce70cf commit d25e94c
Show file tree
Hide file tree
Showing 18 changed files with 609 additions and 1,209 deletions.
20 changes: 18 additions & 2 deletions .eslintrc.js
@@ -1,8 +1,24 @@
module.exports = {
root: true,
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
extends: [
'@webpack-contrib/eslint-config-webpack/rules/possible-errors',
'@webpack-contrib/eslint-config-webpack/rules/best-practices',
'@webpack-contrib/eslint-config-webpack/rules/variables',
'@webpack-contrib/eslint-config-webpack/rules/node',
'@webpack-contrib/eslint-config-webpack/rules/stylistic-issues',
'@webpack-contrib/eslint-config-webpack/rules/es2015',
'prettier',
],
parserOptions: {
ecmaVersion: 2018,
env: {
es6: true,
jest: true,
},
sourceType: 'module',
},
rules: {
strict: 'error',
'global-require': 'off',
'import/no-dynamic-require': 'off',
},
};
9 changes: 8 additions & 1 deletion .github/workflows/nodejs.yml
Expand Up @@ -61,8 +61,15 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
eslint-version: [8.x]
eslint-version: [8.x, 9.x]
webpack-version: [latest]
exclude:
- node-version: 14.x
os: macos-latest
- node-version: 14.x
eslint-version: 9.x
- node-version: 16.x
eslint-version: 9.x

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

Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -111,12 +111,13 @@ Specify the path to the cache location. Can be a file or a directory.
- Type:

```ts
type configType = "flat" | "eslintrc";
type configType = 'flat' | 'eslintrc';
```

- Default: `eslintrc`

Specify the type of configuration to use with ESLint.

- `eslintrc` is the classic configuration format available in most ESLint versions.
- `flat` is the new format introduced in ESLint 8.21.0.

Expand Down

0 comments on commit d25e94c

Please sign in to comment.