@paratco/eslint-config 1.0.10 → 1.0.12
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paratco/eslint-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Paratco",
|
|
@@ -26,25 +26,26 @@
|
|
|
26
26
|
"format": "prettier --write src/"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"eslint": "^9.
|
|
30
|
-
"typescript-eslint": "^8.
|
|
29
|
+
"eslint": "^9.19.0",
|
|
30
|
+
"typescript-eslint": "^8.22.0"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
33
|
"prettier": "^3.4.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@eslint/js": "^9.
|
|
37
|
-
"@stylistic/eslint-plugin": "^2.
|
|
36
|
+
"@eslint/js": "^9.19.0",
|
|
37
|
+
"@stylistic/eslint-plugin": "^2.13.0",
|
|
38
38
|
"@types/eslint__js": "^8.42.3",
|
|
39
|
-
"eslint": "^9.
|
|
39
|
+
"eslint": "^9.19.0",
|
|
40
40
|
"eslint-config-prettier": "^10.0.1",
|
|
41
41
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
42
42
|
"eslint-plugin-import-x": "^4.6.1",
|
|
43
|
-
"eslint-plugin-react": "^7.37.
|
|
43
|
+
"eslint-plugin-react": "^7.37.4",
|
|
44
44
|
"eslint-plugin-react-hooks": "5.1.0",
|
|
45
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
45
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
46
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
46
47
|
"globals": "^15.14.0",
|
|
47
|
-
"typescript-eslint": "^8.
|
|
48
|
+
"typescript-eslint": "^8.22.0"
|
|
48
49
|
},
|
|
49
50
|
"packageManager": "yarn@4.6.0"
|
|
50
51
|
}
|
package/src/configs/import.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import eslintPluginImportX from "eslint-plugin-import-x";
|
|
2
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
2
3
|
|
|
3
4
|
// Custom Rules
|
|
4
5
|
import importXRules from "../lints/import/index.js";
|
|
@@ -8,7 +9,8 @@ export default [
|
|
|
8
9
|
{
|
|
9
10
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
10
11
|
plugins: {
|
|
11
|
-
"import-x": eslintPluginImportX
|
|
12
|
+
"import-x": eslintPluginImportX,
|
|
13
|
+
"unused-imports": unusedImports
|
|
12
14
|
},
|
|
13
15
|
settings: {
|
|
14
16
|
"import-x/resolver": {
|
|
@@ -19,7 +21,23 @@ export default [
|
|
|
19
21
|
},
|
|
20
22
|
rules: {
|
|
21
23
|
...eslintPluginImportX.configs.recommended.rules,
|
|
22
|
-
...importXRules
|
|
24
|
+
...importXRules,
|
|
25
|
+
|
|
26
|
+
// unused-imports
|
|
27
|
+
"no-unused-vars": ["off"],
|
|
28
|
+
"@typescript-eslint/no-unused-vars": ["off"],
|
|
29
|
+
"unused-imports/no-unused-imports": ["error"],
|
|
30
|
+
"unused-imports/no-unused-vars": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
args: "all",
|
|
34
|
+
argsIgnorePattern: "^_",
|
|
35
|
+
caughtErrors: "all",
|
|
36
|
+
caughtErrorsIgnorePattern: "^_",
|
|
37
|
+
destructuredArrayIgnorePattern: "^_",
|
|
38
|
+
ignoreRestSiblings: true
|
|
39
|
+
}
|
|
40
|
+
]
|
|
23
41
|
}
|
|
24
42
|
}
|
|
25
43
|
];
|
|
@@ -14,10 +14,24 @@ export default {
|
|
|
14
14
|
{
|
|
15
15
|
patterns: [
|
|
16
16
|
{
|
|
17
|
-
regex: "(node:)?process",
|
|
17
|
+
regex: "^(node:)?process$",
|
|
18
18
|
message: "Please dont import node:process."
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
22
|
+
],
|
|
23
|
+
|
|
24
|
+
// https://eslint.org/docs/latest/rules/no-unused-vars
|
|
25
|
+
// Disallow unused variables
|
|
26
|
+
"no-unused-vars": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
args: "all",
|
|
30
|
+
argsIgnorePattern: "^_",
|
|
31
|
+
caughtErrors: "all",
|
|
32
|
+
caughtErrorsIgnorePattern: "^_",
|
|
33
|
+
destructuredArrayIgnorePattern: "^_",
|
|
34
|
+
ignoreRestSiblings: true
|
|
35
|
+
}
|
|
22
36
|
]
|
|
23
37
|
};
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
{
|
|
144
144
|
patterns: [
|
|
145
145
|
{
|
|
146
|
-
regex: "(node:)?process",
|
|
146
|
+
regex: "^(node:)?process$",
|
|
147
147
|
message: "Please dont import node:process."
|
|
148
148
|
}
|
|
149
149
|
]
|
|
@@ -275,6 +275,7 @@ export default {
|
|
|
275
275
|
// Disallow unused variables.
|
|
276
276
|
// https://typescript-eslint.io/rules/no-unused-vars
|
|
277
277
|
// Note: This rule is in the recommended rules. But we modify it.
|
|
278
|
+
"no-unused-vars": ["off"],
|
|
278
279
|
"@typescript-eslint/no-unused-vars": [
|
|
279
280
|
"error",
|
|
280
281
|
{
|
|
@@ -283,7 +284,6 @@ export default {
|
|
|
283
284
|
caughtErrors: "all",
|
|
284
285
|
caughtErrorsIgnorePattern: "^_",
|
|
285
286
|
destructuredArrayIgnorePattern: "^_",
|
|
286
|
-
varsIgnorePattern: "^_",
|
|
287
287
|
ignoreRestSiblings: true
|
|
288
288
|
}
|
|
289
289
|
],
|