@sxzz/eslint-config 3.5.2 → 3.5.4

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/README.md CHANGED
@@ -16,6 +16,8 @@ Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3, Prettier.
16
16
  npm i -D @sxzz/eslint-config
17
17
  ```
18
18
 
19
+ Require Node.js >= 16.14.
20
+
19
21
  ## Usage
20
22
 
21
23
  ```js
package/index.cjs CHANGED
@@ -215,7 +215,7 @@ var js = [
215
215
  "no-lonely-if": "error",
216
216
  "prefer-exponentiation-operator": "error",
217
217
  "unused-imports/no-unused-imports": isInEditor ? "off" : "error",
218
- [isInEditor ? "no-unused-vars" : "unused-imports/no-unused-vars"]: [
218
+ "unused-imports/no-unused-vars": [
219
219
  "error",
220
220
  { args: "after-used", ignoreRestSiblings: true }
221
221
  ]
@@ -549,7 +549,9 @@ var typescript = [
549
549
  ],
550
550
  "@typescript-eslint/no-explicit-any": "off",
551
551
  "@typescript-eslint/no-non-null-assertion": "off",
552
- "@typescript-eslint/prefer-as-const": "warn"
552
+ "@typescript-eslint/prefer-as-const": "warn",
553
+ // handled by unused-imports/no-unused-imports
554
+ "@typescript-eslint/no-unused-vars": "off"
553
555
  }
554
556
  },
555
557
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "3.5.2",
3
+ "version": "3.5.4",
4
4
  "packageManager": "pnpm@8.7.1",
5
5
  "description": "ESLint config for @sxzz.",
6
6
  "type": "module",
package/src/js.js CHANGED
@@ -93,7 +93,7 @@ export const js = [
93
93
  'prefer-exponentiation-operator': 'error',
94
94
 
95
95
  'unused-imports/no-unused-imports': isInEditor ? 'off' : 'error',
96
- [isInEditor ? 'no-unused-vars' : 'unused-imports/no-unused-vars']: [
96
+ 'unused-imports/no-unused-vars': [
97
97
  'error',
98
98
  { args: 'after-used', ignoreRestSiblings: true },
99
99
  ],
package/src/typescript.js CHANGED
@@ -32,6 +32,9 @@ export const typescript = [
32
32
  '@typescript-eslint/no-explicit-any': 'off',
33
33
  '@typescript-eslint/no-non-null-assertion': 'off',
34
34
  '@typescript-eslint/prefer-as-const': 'warn',
35
+
36
+ // handled by unused-imports/no-unused-imports
37
+ '@typescript-eslint/no-unused-vars': 'off',
35
38
  },
36
39
  },
37
40
  {