@willbooster/eslint-config-next 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint.config.js +9 -4
- package/package.json +25 -20
package/eslint.config.js
CHANGED
|
@@ -8,6 +8,7 @@ import js from '@eslint/js';
|
|
|
8
8
|
import eslintConfigFlatGitignore from 'eslint-config-flat-gitignore';
|
|
9
9
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
10
10
|
import eslintPluginReact from 'eslint-plugin-react';
|
|
11
|
+
import eslintPluginReactCompiler from 'eslint-plugin-react-compiler';
|
|
11
12
|
import eslintPluginSortClassMembers from 'eslint-plugin-sort-class-members';
|
|
12
13
|
import eslintPluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
|
|
13
14
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
@@ -24,13 +25,11 @@ const compat = new FlatCompat({
|
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
const config = [
|
|
27
|
-
...compat.extends('next/core-web-vitals')
|
|
28
|
-
...config,
|
|
29
|
-
})),
|
|
28
|
+
...compat.extends('next/core-web-vitals'),
|
|
30
29
|
|
|
31
30
|
// We import configs of eslint-config-js/js-react/ts/ts-react manually
|
|
32
31
|
// because next/core-web-vitals depends on eslint-plugin-import,
|
|
33
|
-
//
|
|
32
|
+
// but we want to keep using eslint-plugin-import-x in the above configs.
|
|
34
33
|
|
|
35
34
|
// --------------- from eslint-config-js ---------------
|
|
36
35
|
// Note: don't merge the below two objects!
|
|
@@ -128,6 +127,12 @@ const config = [
|
|
|
128
127
|
// cf. https://github.com/jsx-eslint/eslint-plugin-react#flat-configs
|
|
129
128
|
eslintPluginReact.configs.flat.recommended,
|
|
130
129
|
eslintPluginReact.configs.flat['jsx-runtime'],
|
|
130
|
+
// cf. https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks#flat-config-eslintconfigjsts
|
|
131
|
+
// To fix the error: ConfigError: Config "react-hooks/recommended": Key "plugins": Cannot redefine plugin "react-hooks".
|
|
132
|
+
// TODO: re-enable the below configs after the error is fixed.
|
|
133
|
+
// eslintPluginReactHooks.configs['recommended-latest'],
|
|
134
|
+
// cf. https://www.npmjs.com/package/eslint-plugin-react-compiler
|
|
135
|
+
eslintPluginReactCompiler.configs.recommended,
|
|
131
136
|
{
|
|
132
137
|
settings: {
|
|
133
138
|
react: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/eslint-config-next",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "A ESLint flat config for Next.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "WillBooster Inc.",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"eslint.config.js"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
+
"check-for-ai": "yarn install > /dev/null && yarn format > /dev/null && yarn lint-fix --quiet && yarn typecheck && yarn test --silent",
|
|
13
14
|
"cleanup": "yarn format && yarn lint-fix",
|
|
14
15
|
"format": "sort-package-json && yarn prettify",
|
|
15
16
|
"lint": "eslint --color",
|
|
@@ -21,33 +22,34 @@
|
|
|
21
22
|
"prettier": "@willbooster/prettier-config",
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@eslint/eslintrc": "3.3.1",
|
|
24
|
-
"@eslint/js": "9.
|
|
25
|
+
"@eslint/js": "9.29.0",
|
|
25
26
|
"@types/eslint": "9.6.1",
|
|
26
27
|
"@types/micromatch": "4.0.9",
|
|
27
|
-
"@types/node": "22.
|
|
28
|
-
"@types/react": "19.
|
|
29
|
-
"@willbooster/prettier-config": "10.0.
|
|
30
|
-
"eslint": "9.
|
|
28
|
+
"@types/node": "22.15.32",
|
|
29
|
+
"@types/react": "19.1.8",
|
|
30
|
+
"@willbooster/prettier-config": "10.0.1",
|
|
31
|
+
"eslint": "9.29.0",
|
|
31
32
|
"eslint-config-flat-gitignore": "2.1.0",
|
|
32
|
-
"eslint-config-next": "15.
|
|
33
|
-
"eslint-config-prettier": "10.1.
|
|
34
|
-
"eslint-import-resolver-typescript": "4.
|
|
35
|
-
"eslint-plugin-import-x": "4.
|
|
36
|
-
"eslint-plugin-react": "7.37.
|
|
33
|
+
"eslint-config-next": "15.3.4",
|
|
34
|
+
"eslint-config-prettier": "10.1.5",
|
|
35
|
+
"eslint-import-resolver-typescript": "4.4.3",
|
|
36
|
+
"eslint-plugin-import-x": "4.15.2",
|
|
37
|
+
"eslint-plugin-react": "7.37.5",
|
|
38
|
+
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
37
39
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
38
40
|
"eslint-plugin-sort-class-members": "1.21.0",
|
|
39
41
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
40
|
-
"eslint-plugin-unicorn": "
|
|
42
|
+
"eslint-plugin-unicorn": "59.0.1",
|
|
41
43
|
"eslint-plugin-unused-imports": "4.1.4",
|
|
42
|
-
"globals": "16.
|
|
43
|
-
"lint-staged": "
|
|
44
|
+
"globals": "16.2.0",
|
|
45
|
+
"lint-staged": "16.1.2",
|
|
44
46
|
"micromatch": "4.0.8",
|
|
45
|
-
"next": "15.
|
|
47
|
+
"next": "15.3.4",
|
|
46
48
|
"prettier": "3.5.3",
|
|
47
49
|
"react": "19.1.0",
|
|
48
|
-
"sort-package-json": "3.
|
|
49
|
-
"typescript": "5.8.
|
|
50
|
-
"typescript-eslint": "8.
|
|
50
|
+
"sort-package-json": "3.2.1",
|
|
51
|
+
"typescript": "5.8.3",
|
|
52
|
+
"typescript-eslint": "8.34.1",
|
|
51
53
|
"use-immer": "0.11.0"
|
|
52
54
|
},
|
|
53
55
|
"peerDependencies": {
|
|
@@ -57,11 +59,14 @@
|
|
|
57
59
|
"eslint-config-flat-gitignore": ">=2.1",
|
|
58
60
|
"eslint-config-next": ">=15",
|
|
59
61
|
"eslint-config-prettier": ">=10",
|
|
60
|
-
"eslint-import-resolver-typescript": ">=
|
|
62
|
+
"eslint-import-resolver-typescript": ">=4",
|
|
61
63
|
"eslint-plugin-import-x": ">=4",
|
|
64
|
+
"eslint-plugin-react": ">=7",
|
|
65
|
+
"eslint-plugin-react-compiler": ">=19.1.0-rc.2",
|
|
66
|
+
"eslint-plugin-react-hooks": ">=5",
|
|
62
67
|
"eslint-plugin-sort-class-members": ">=1.21",
|
|
63
68
|
"eslint-plugin-sort-destructure-keys": ">=2",
|
|
64
|
-
"eslint-plugin-unicorn": ">=
|
|
69
|
+
"eslint-plugin-unicorn": ">=59",
|
|
65
70
|
"eslint-plugin-unused-imports": ">=4",
|
|
66
71
|
"globals": ">=16",
|
|
67
72
|
"typescript": ">=5",
|