@antfu/eslint-config 3.15.0 → 4.0.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/README.md +5 -3
- package/dist/cli.js +25 -28
- package/dist/index.d.ts +323 -243
- package/dist/index.js +13 -4
- package/package.json +26 -29
- package/dist/cli.cjs +0 -617
- package/dist/cli.d.cts +0 -2
- package/dist/index.cjs +0 -2783
- package/dist/index.d.cts +0 -16823
package/README.md
CHANGED
|
@@ -730,13 +730,15 @@ export default antfu({
|
|
|
730
730
|
|
|
731
731
|
### Editor Specific Disables
|
|
732
732
|
|
|
733
|
-
|
|
733
|
+
Auto-fixing for the following rules are disabled when ESLint is running in a code editor:
|
|
734
734
|
|
|
735
735
|
- [`prefer-const`](https://eslint.org/docs/rules/prefer-const)
|
|
736
|
-
- [`unused-imports/no-unused-imports`](https://www.npmjs.com/package/eslint-plugin-unused-imports)
|
|
737
736
|
- [`test/no-only-tests`](https://github.com/levibuzolic/eslint-plugin-no-only-tests)
|
|
737
|
+
- [`unused-imports/no-unused-imports`](https://www.npmjs.com/package/eslint-plugin-unused-imports)
|
|
738
|
+
|
|
739
|
+
Since v3.16.0, they are no longer disabled, but made non-fixable using [this helper](https://github.com/antfu/eslint-flat-config-utils#composerdisablerulesfix).
|
|
738
740
|
|
|
739
|
-
This is to prevent unused imports from getting removed by the
|
|
741
|
+
This is to prevent unused imports from getting removed by the editor during refactoring to get a better developer experience. Those rules will be applied when you run ESLint in the terminal or [Lint Staged](#lint-staged). If you don't want this behavior, you can disable them:
|
|
740
742
|
|
|
741
743
|
```js
|
|
742
744
|
// eslint.config.js
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import c from "picocolors";
|
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@antfu/eslint-config",
|
|
14
14
|
type: "module",
|
|
15
|
-
version: "
|
|
15
|
+
version: "4.0.0",
|
|
16
16
|
packageManager: "pnpm@10.0.0",
|
|
17
17
|
description: "Anthony's ESLint config",
|
|
18
18
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -23,10 +23,7 @@ var package_default = {
|
|
|
23
23
|
"eslint-config"
|
|
24
24
|
],
|
|
25
25
|
exports: {
|
|
26
|
-
".":
|
|
27
|
-
import: "./dist/index.js",
|
|
28
|
-
require: "./dist/index.cjs"
|
|
29
|
-
}
|
|
26
|
+
".": "./dist/index.js"
|
|
30
27
|
},
|
|
31
28
|
main: "./dist/index.js",
|
|
32
29
|
types: "./dist/index.d.ts",
|
|
@@ -36,11 +33,11 @@ var package_default = {
|
|
|
36
33
|
"dist"
|
|
37
34
|
],
|
|
38
35
|
scripts: {
|
|
39
|
-
build: "nr typegen && tsup --
|
|
40
|
-
stub: "tsup
|
|
36
|
+
build: "nr typegen && tsup --clean --dts",
|
|
37
|
+
stub: "tsup",
|
|
41
38
|
dev: "npx @eslint/config-inspector --config eslint.config.ts",
|
|
42
39
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
43
|
-
watch: "tsup --
|
|
40
|
+
watch: "tsup --watch",
|
|
44
41
|
lint: "eslint .",
|
|
45
42
|
typegen: "tsx scripts/typegen.ts",
|
|
46
43
|
prepack: "nr build",
|
|
@@ -110,22 +107,22 @@ var package_default = {
|
|
|
110
107
|
"@antfu/install-pkg": "^1.0.0",
|
|
111
108
|
"@clack/prompts": "^0.9.1",
|
|
112
109
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
113
|
-
"@eslint/markdown": "^6.2.
|
|
114
|
-
"@stylistic/eslint-plugin": "^
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
116
|
-
"@typescript-eslint/parser": "^8.
|
|
110
|
+
"@eslint/markdown": "^6.2.2",
|
|
111
|
+
"@stylistic/eslint-plugin": "^3.0.0",
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
113
|
+
"@typescript-eslint/parser": "^8.21.0",
|
|
117
114
|
"@vitest/eslint-plugin": "^1.1.25",
|
|
118
115
|
"eslint-config-flat-gitignore": "^1.0.0",
|
|
119
|
-
"eslint-flat-config-utils": "^1.
|
|
116
|
+
"eslint-flat-config-utils": "^1.1.0",
|
|
120
117
|
"eslint-merge-processors": "^1.0.0",
|
|
121
118
|
"eslint-plugin-antfu": "^2.7.0",
|
|
122
119
|
"eslint-plugin-command": "^2.1.0",
|
|
123
120
|
"eslint-plugin-import-x": "^4.6.1",
|
|
124
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
125
|
-
"eslint-plugin-jsonc": "^2.
|
|
121
|
+
"eslint-plugin-jsdoc": "^50.6.3",
|
|
122
|
+
"eslint-plugin-jsonc": "^2.19.1",
|
|
126
123
|
"eslint-plugin-n": "^17.15.1",
|
|
127
124
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
128
|
-
"eslint-plugin-perfectionist": "^4.
|
|
125
|
+
"eslint-plugin-perfectionist": "^4.7.0",
|
|
129
126
|
"eslint-plugin-regexp": "^2.7.0",
|
|
130
127
|
"eslint-plugin-toml": "^0.12.0",
|
|
131
128
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
@@ -146,18 +143,18 @@ var package_default = {
|
|
|
146
143
|
devDependencies: {
|
|
147
144
|
"@antfu/eslint-config": "workspace:*",
|
|
148
145
|
"@antfu/ni": "^23.2.0",
|
|
149
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
146
|
+
"@eslint-react/eslint-plugin": "^1.24.1",
|
|
150
147
|
"@eslint/config-inspector": "^1.0.0",
|
|
151
148
|
"@prettier/plugin-xml": "^3.4.1",
|
|
152
|
-
"@stylistic/eslint-plugin-migrate": "^
|
|
149
|
+
"@stylistic/eslint-plugin-migrate": "^3.0.0",
|
|
153
150
|
"@types/fs-extra": "^11.0.4",
|
|
154
|
-
"@types/node": "^22.10.
|
|
151
|
+
"@types/node": "^22.10.10",
|
|
155
152
|
"@types/prompts": "^2.4.9",
|
|
156
153
|
"@types/yargs": "^17.0.33",
|
|
157
|
-
"@unocss/eslint-plugin": "^65.4.
|
|
158
|
-
"astro-eslint-parser": "^1.1
|
|
159
|
-
bumpp: "^9.10.
|
|
160
|
-
eslint: "^9.
|
|
154
|
+
"@unocss/eslint-plugin": "^65.4.3",
|
|
155
|
+
"astro-eslint-parser": "^1.2.1",
|
|
156
|
+
bumpp: "^9.10.2",
|
|
157
|
+
eslint: "^9.19.0",
|
|
161
158
|
"eslint-plugin-astro": "^1.3.1",
|
|
162
159
|
"eslint-plugin-format": "^1.0.1",
|
|
163
160
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
@@ -169,23 +166,23 @@ var package_default = {
|
|
|
169
166
|
"fast-glob": "^3.3.3",
|
|
170
167
|
"fs-extra": "^11.3.0",
|
|
171
168
|
jiti: "^2.4.2",
|
|
172
|
-
"lint-staged": "^15.4.
|
|
169
|
+
"lint-staged": "^15.4.2",
|
|
173
170
|
"prettier-plugin-astro": "^0.14.1",
|
|
174
171
|
"prettier-plugin-slidev": "^1.0.5",
|
|
175
172
|
rimraf: "^6.0.1",
|
|
176
173
|
"simple-git-hooks": "^2.11.1",
|
|
177
|
-
svelte: "^5.19.
|
|
174
|
+
svelte: "^5.19.3",
|
|
178
175
|
"svelte-eslint-parser": "^0.43.0",
|
|
179
176
|
tsup: "^8.3.5",
|
|
180
177
|
tsx: "^4.19.2",
|
|
181
178
|
typescript: "^5.7.3",
|
|
182
|
-
vitest: "^3.0.
|
|
179
|
+
vitest: "^3.0.4",
|
|
183
180
|
vue: "^3.5.13"
|
|
184
181
|
},
|
|
185
182
|
resolutions: {
|
|
186
183
|
"@eslint-community/eslint-utils": "^4.4.1",
|
|
187
|
-
"@typescript-eslint/utils": "^8.
|
|
188
|
-
eslint: "^9.
|
|
184
|
+
"@typescript-eslint/utils": "^8.21.0",
|
|
185
|
+
eslint: "^9.19.0",
|
|
189
186
|
tsx: "^4.19.2"
|
|
190
187
|
},
|
|
191
188
|
"simple-git-hooks": {
|