@paratco/eslint-config 1.0.9 → 1.0.11

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.9",
3
+ "version": "1.0.11",
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.12.0",
30
- "typescript-eslint": "^8.9.0"
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.17.0",
37
- "@stylistic/eslint-plugin": "^2.12.1",
36
+ "@eslint/js": "^9.19.0",
37
+ "@stylistic/eslint-plugin": "^2.13.0",
38
38
  "@types/eslint__js": "^8.42.3",
39
- "eslint": "^9.17.0",
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.3",
43
+ "eslint-plugin-react": "^7.37.4",
44
44
  "eslint-plugin-react-hooks": "5.1.0",
45
- "eslint-plugin-react-refresh": "^0.4.16",
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.19.0"
48
+ "typescript-eslint": "^8.22.0"
48
49
  },
49
50
  "packageManager": "yarn@4.6.0"
50
51
  }
@@ -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,21 @@ 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
+ "warn",
32
+ {
33
+ vars: "all",
34
+ varsIgnorePattern: "^_",
35
+ args: "after-used",
36
+ argsIgnorePattern: "^_"
37
+ }
38
+ ]
23
39
  }
24
40
  }
25
41
  ];
@@ -14,7 +14,7 @@ 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
  ]
@@ -138,7 +138,17 @@ export default {
138
138
  // https://typescript-eslint.io/rules/no-restricted-imports
139
139
  // Note: you must disable the base rule as it can report incorrect errors
140
140
  "no-restricted-imports": "off",
141
- "@typescript-eslint/no-restricted-imports": ["off"],
141
+ "@typescript-eslint/no-restricted-imports": [
142
+ "error",
143
+ {
144
+ patterns: [
145
+ {
146
+ regex: "^(node:)?process$",
147
+ message: "Please dont import node:process."
148
+ }
149
+ ]
150
+ }
151
+ ],
142
152
 
143
153
  // Disallow certain types
144
154
  // https://typescript-eslint.io/rules/no-restricted-types/
@@ -281,5 +291,5 @@ export default {
281
291
  // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
282
292
  // https://typescript-eslint.io/rules/prefer-optional-chain
283
293
  // Note: This rule is in the recommended rules. But we remove it.
284
- "@typescript-eslint/prefer-optional-chain": ["off"],
294
+ "@typescript-eslint/prefer-optional-chain": ["off"]
285
295
  };