eslint-config-entva-next 2.45.0 → 2.46.0
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/index.js +13 -9
- package/package.json +9 -10
package/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import baseConf from 'eslint-config-entva-typescript';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import tsParser from '@typescript-eslint/parser';
|
|
5
|
-
|
|
6
|
-
const compat = new FlatCompat({ baseDirectory: import.meta.dirname });
|
|
1
|
+
import baseConf, { mainRule as baseMainRule } from 'eslint-config-entva-typescript';
|
|
2
|
+
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
|
|
3
|
+
import nextTypescript from 'eslint-config-next/typescript';
|
|
7
4
|
|
|
8
5
|
const [ignoreRule, ...restRules] = baseConf;
|
|
6
|
+
const { plugins: basePlugins, languageOptions: { parser: tsParser } } = baseMainRule;
|
|
9
7
|
|
|
10
8
|
const combinedRules = [
|
|
11
9
|
ignoreRule,
|
|
12
|
-
...
|
|
10
|
+
...nextCoreWebVitals,
|
|
11
|
+
...nextTypescript,
|
|
13
12
|
{
|
|
14
13
|
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx}'],
|
|
15
14
|
rules: {
|
|
@@ -20,8 +19,13 @@ const combinedRules = [
|
|
|
20
19
|
},
|
|
21
20
|
...restRules,
|
|
22
21
|
].map((mutable) => {
|
|
23
|
-
// Forces the same parser
|
|
24
|
-
|
|
22
|
+
// Forces the same plugin/parser instances from baseConf across all configs,
|
|
23
|
+
// otherwise ESLint throws on redefinition
|
|
24
|
+
if (mutable.plugins) {
|
|
25
|
+
Object.keys(mutable.plugins).forEach((name) => {
|
|
26
|
+
if (basePlugins[name]) mutable.plugins[name] = basePlugins[name];
|
|
27
|
+
});
|
|
28
|
+
}
|
|
25
29
|
if (mutable.languageOptions?.parser) mutable.languageOptions.parser = tsParser;
|
|
26
30
|
|
|
27
31
|
return mutable;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/entva/styleguide.git"
|
|
10
10
|
},
|
|
11
11
|
"bugs": "https://github.com/entva/styleguide/issues",
|
|
12
|
-
"version": "2.
|
|
12
|
+
"version": "2.46.0",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"linter",
|
|
15
15
|
"config",
|
|
@@ -25,23 +25,22 @@
|
|
|
25
25
|
"prepublishOnly": "npm test"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^25.
|
|
29
|
-
"@types/react": "^19.2.
|
|
28
|
+
"@types/node": "^25.9.3",
|
|
29
|
+
"@types/react": "^19.2.17",
|
|
30
30
|
"@types/react-dom": "^19.2.3",
|
|
31
31
|
"eslint": "^9.39.4",
|
|
32
|
-
"next": "^
|
|
33
|
-
"react": "^19.2.
|
|
32
|
+
"next": "^16.2.9",
|
|
33
|
+
"react": "^19.2.7",
|
|
34
34
|
"typescript": "^6.0.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eslint/
|
|
38
|
-
"@typescript-eslint/
|
|
39
|
-
"@typescript-eslint/parser": "^8.58.2",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
|
38
|
+
"@typescript-eslint/parser": "^8.61.0",
|
|
40
39
|
"eslint-config-entva-typescript": "^2.x.x",
|
|
41
|
-
"eslint-config-next": "^
|
|
40
|
+
"eslint-config-next": "^16.2.9"
|
|
42
41
|
},
|
|
43
42
|
"peerDependencies": {
|
|
44
43
|
"eslint": "^9.x.x",
|
|
45
|
-
"next": "^15.5.
|
|
44
|
+
"next": "^15.5.19 || ^16.2.9"
|
|
46
45
|
}
|
|
47
46
|
}
|