@antfu/eslint-config 2.6.0 → 2.6.2
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 +3 -0
- package/bin/index.js +0 -1
- package/dist/cli.cjs +11 -10
- package/dist/cli.js +11 -10
- package/dist/index.cjs +12 -2
- package/dist/index.js +12 -2
- package/package.json +21 -20
package/README.md
CHANGED
package/bin/index.js
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -46,27 +46,27 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
|
46
46
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
47
47
|
|
|
48
48
|
// package.json
|
|
49
|
-
var version = "2.6.
|
|
49
|
+
var version = "2.6.2";
|
|
50
50
|
var devDependencies = {
|
|
51
51
|
"@antfu/eslint-config": "workspace:*",
|
|
52
52
|
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
|
|
53
53
|
"@antfu/ni": "^0.21.12",
|
|
54
|
-
"@stylistic/eslint-plugin-migrate": "^1.5.
|
|
55
|
-
"@types/eslint": "^8.56.
|
|
54
|
+
"@stylistic/eslint-plugin-migrate": "^1.5.3",
|
|
55
|
+
"@types/eslint": "^8.56.1",
|
|
56
56
|
"@types/fs-extra": "^11.0.4",
|
|
57
|
-
"@types/node": "^20.10.
|
|
57
|
+
"@types/node": "^20.10.7",
|
|
58
58
|
"@types/prompts": "^2.4.9",
|
|
59
59
|
"@types/yargs": "^17.0.32",
|
|
60
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
60
|
+
"@unocss/eslint-plugin": "^0.58.3",
|
|
61
61
|
bumpp: "^9.2.1",
|
|
62
|
-
eslint: "npm:eslint-ts-patch@^8.
|
|
63
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
62
|
+
eslint: "npm:eslint-ts-patch@^8.56.0-0",
|
|
63
|
+
"eslint-flat-config-viewer": "^0.1.4",
|
|
64
64
|
"eslint-plugin-format": "^0.1.0",
|
|
65
65
|
"eslint-plugin-react": "^7.33.2",
|
|
66
66
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
67
67
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
68
68
|
"eslint-plugin-svelte": "^2.35.1",
|
|
69
|
-
"eslint-ts-patch": "^8.
|
|
69
|
+
"eslint-ts-patch": "^8.56.0-0",
|
|
70
70
|
esno: "^4.0.0",
|
|
71
71
|
execa: "^8.0.1",
|
|
72
72
|
"fast-glob": "^3.3.2",
|
|
@@ -74,11 +74,12 @@ var devDependencies = {
|
|
|
74
74
|
"lint-staged": "^15.2.0",
|
|
75
75
|
rimraf: "^5.0.5",
|
|
76
76
|
"simple-git-hooks": "^2.9.0",
|
|
77
|
+
svelte: "^4.2.8",
|
|
77
78
|
"svelte-eslint-parser": "^0.33.1",
|
|
78
79
|
tsup: "^8.0.1",
|
|
79
80
|
typescript: "^5.3.3",
|
|
80
|
-
vitest: "^1.1.
|
|
81
|
-
vue: "^3.
|
|
81
|
+
vitest: "^1.1.3",
|
|
82
|
+
vue: "^3.4.5"
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
// src/cli/constants.ts
|
package/dist/cli.js
CHANGED
|
@@ -17,27 +17,27 @@ import parse from "parse-gitignore";
|
|
|
17
17
|
import c from "picocolors";
|
|
18
18
|
|
|
19
19
|
// package.json
|
|
20
|
-
var version = "2.6.
|
|
20
|
+
var version = "2.6.2";
|
|
21
21
|
var devDependencies = {
|
|
22
22
|
"@antfu/eslint-config": "workspace:*",
|
|
23
23
|
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
|
|
24
24
|
"@antfu/ni": "^0.21.12",
|
|
25
|
-
"@stylistic/eslint-plugin-migrate": "^1.5.
|
|
26
|
-
"@types/eslint": "^8.56.
|
|
25
|
+
"@stylistic/eslint-plugin-migrate": "^1.5.3",
|
|
26
|
+
"@types/eslint": "^8.56.1",
|
|
27
27
|
"@types/fs-extra": "^11.0.4",
|
|
28
|
-
"@types/node": "^20.10.
|
|
28
|
+
"@types/node": "^20.10.7",
|
|
29
29
|
"@types/prompts": "^2.4.9",
|
|
30
30
|
"@types/yargs": "^17.0.32",
|
|
31
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
31
|
+
"@unocss/eslint-plugin": "^0.58.3",
|
|
32
32
|
bumpp: "^9.2.1",
|
|
33
|
-
eslint: "npm:eslint-ts-patch@^8.
|
|
34
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
33
|
+
eslint: "npm:eslint-ts-patch@^8.56.0-0",
|
|
34
|
+
"eslint-flat-config-viewer": "^0.1.4",
|
|
35
35
|
"eslint-plugin-format": "^0.1.0",
|
|
36
36
|
"eslint-plugin-react": "^7.33.2",
|
|
37
37
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
38
38
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
39
39
|
"eslint-plugin-svelte": "^2.35.1",
|
|
40
|
-
"eslint-ts-patch": "^8.
|
|
40
|
+
"eslint-ts-patch": "^8.56.0-0",
|
|
41
41
|
esno: "^4.0.0",
|
|
42
42
|
execa: "^8.0.1",
|
|
43
43
|
"fast-glob": "^3.3.2",
|
|
@@ -45,11 +45,12 @@ var devDependencies = {
|
|
|
45
45
|
"lint-staged": "^15.2.0",
|
|
46
46
|
rimraf: "^5.0.5",
|
|
47
47
|
"simple-git-hooks": "^2.9.0",
|
|
48
|
+
svelte: "^4.2.8",
|
|
48
49
|
"svelte-eslint-parser": "^0.33.1",
|
|
49
50
|
tsup: "^8.0.1",
|
|
50
51
|
typescript: "^5.3.3",
|
|
51
|
-
vitest: "^1.1.
|
|
52
|
-
vue: "^3.
|
|
52
|
+
vitest: "^1.1.3",
|
|
53
|
+
vue: "^3.4.5"
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
// src/cli/constants.ts
|
package/dist/index.cjs
CHANGED
|
@@ -231,6 +231,14 @@ async function imports(options = {}) {
|
|
|
231
231
|
"import/newline-after-import": ["error", { considerComments: true, count: 1 }]
|
|
232
232
|
} : {}
|
|
233
233
|
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
237
|
+
name: "antfu:imports:bin",
|
|
238
|
+
rules: {
|
|
239
|
+
"antfu/no-import-dist": "off",
|
|
240
|
+
"antfu/no-import-node-modules-by-path": "off"
|
|
241
|
+
}
|
|
234
242
|
}
|
|
235
243
|
];
|
|
236
244
|
}
|
|
@@ -522,7 +530,6 @@ async function jsdoc(options = {}) {
|
|
|
522
530
|
{
|
|
523
531
|
name: "antfu:jsdoc",
|
|
524
532
|
plugins: {
|
|
525
|
-
// @ts-expect-error missing types
|
|
526
533
|
jsdoc: await interopDefault(import("eslint-plugin-jsdoc"))
|
|
527
534
|
},
|
|
528
535
|
rules: {
|
|
@@ -1311,6 +1318,7 @@ async function svelte(options = {}) {
|
|
|
1311
1318
|
}
|
|
1312
1319
|
},
|
|
1313
1320
|
name: "antfu:svelte:rules",
|
|
1321
|
+
processor: pluginSvelte.processors[".svelte"],
|
|
1314
1322
|
rules: {
|
|
1315
1323
|
"import/no-mutable-exports": "off",
|
|
1316
1324
|
"no-undef": "off",
|
|
@@ -1952,7 +1960,8 @@ async function antfu(options = {}, ...userConfigs) {
|
|
|
1952
1960
|
if (enableTypeScript) {
|
|
1953
1961
|
configs.push(typescript({
|
|
1954
1962
|
...resolveSubOptions(options, "typescript"),
|
|
1955
|
-
componentExts
|
|
1963
|
+
componentExts,
|
|
1964
|
+
overrides: getOverrides(options, "typescript")
|
|
1956
1965
|
}));
|
|
1957
1966
|
}
|
|
1958
1967
|
if (stylisticOptions) {
|
|
@@ -1970,6 +1979,7 @@ async function antfu(options = {}, ...userConfigs) {
|
|
|
1970
1979
|
if (enableVue) {
|
|
1971
1980
|
configs.push(vue({
|
|
1972
1981
|
...resolveSubOptions(options, "vue"),
|
|
1982
|
+
overrides: getOverrides(options, "vue"),
|
|
1973
1983
|
stylistic: stylisticOptions,
|
|
1974
1984
|
typescript: !!enableTypeScript
|
|
1975
1985
|
}));
|
package/dist/index.js
CHANGED
|
@@ -138,6 +138,14 @@ async function imports(options = {}) {
|
|
|
138
138
|
"import/newline-after-import": ["error", { considerComments: true, count: 1 }]
|
|
139
139
|
} : {}
|
|
140
140
|
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
144
|
+
name: "antfu:imports:bin",
|
|
145
|
+
rules: {
|
|
146
|
+
"antfu/no-import-dist": "off",
|
|
147
|
+
"antfu/no-import-node-modules-by-path": "off"
|
|
148
|
+
}
|
|
141
149
|
}
|
|
142
150
|
];
|
|
143
151
|
}
|
|
@@ -429,7 +437,6 @@ async function jsdoc(options = {}) {
|
|
|
429
437
|
{
|
|
430
438
|
name: "antfu:jsdoc",
|
|
431
439
|
plugins: {
|
|
432
|
-
// @ts-expect-error missing types
|
|
433
440
|
jsdoc: await interopDefault(import("eslint-plugin-jsdoc"))
|
|
434
441
|
},
|
|
435
442
|
rules: {
|
|
@@ -1218,6 +1225,7 @@ async function svelte(options = {}) {
|
|
|
1218
1225
|
}
|
|
1219
1226
|
},
|
|
1220
1227
|
name: "antfu:svelte:rules",
|
|
1228
|
+
processor: pluginSvelte.processors[".svelte"],
|
|
1221
1229
|
rules: {
|
|
1222
1230
|
"import/no-mutable-exports": "off",
|
|
1223
1231
|
"no-undef": "off",
|
|
@@ -1859,7 +1867,8 @@ async function antfu(options = {}, ...userConfigs) {
|
|
|
1859
1867
|
if (enableTypeScript) {
|
|
1860
1868
|
configs.push(typescript({
|
|
1861
1869
|
...resolveSubOptions(options, "typescript"),
|
|
1862
|
-
componentExts
|
|
1870
|
+
componentExts,
|
|
1871
|
+
overrides: getOverrides(options, "typescript")
|
|
1863
1872
|
}));
|
|
1864
1873
|
}
|
|
1865
1874
|
if (stylisticOptions) {
|
|
@@ -1877,6 +1886,7 @@ async function antfu(options = {}, ...userConfigs) {
|
|
|
1877
1886
|
if (enableVue) {
|
|
1878
1887
|
configs.push(vue({
|
|
1879
1888
|
...resolveSubOptions(options, "vue"),
|
|
1889
|
+
overrides: getOverrides(options, "vue"),
|
|
1880
1890
|
stylistic: stylisticOptions,
|
|
1881
1891
|
typescript: !!enableTypeScript
|
|
1882
1892
|
}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.6.
|
|
5
|
-
"packageManager": "pnpm@8.
|
|
4
|
+
"version": "2.6.2",
|
|
5
|
+
"packageManager": "pnpm@8.14.0",
|
|
6
6
|
"description": "Anthony's ESLint config",
|
|
7
7
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
"@antfu/eslint-define-config": "^1.23.0-2",
|
|
62
62
|
"@antfu/install-pkg": "^0.3.1",
|
|
63
63
|
"@eslint-types/jsdoc": "46.8.2-1",
|
|
64
|
-
"@eslint-types/typescript-eslint": "^6.
|
|
65
|
-
"@eslint-types/unicorn": "^
|
|
66
|
-
"@stylistic/eslint-plugin": "^1.5.
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
68
|
-
"@typescript-eslint/parser": "^6.
|
|
64
|
+
"@eslint-types/typescript-eslint": "^6.17.0",
|
|
65
|
+
"@eslint-types/unicorn": "^50.0.1",
|
|
66
|
+
"@stylistic/eslint-plugin": "^1.5.3",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
|
68
|
+
"@typescript-eslint/parser": "^6.18.0",
|
|
69
69
|
"eslint-config-flat-gitignore": "^0.1.2",
|
|
70
70
|
"eslint-merge-processors": "^0.1.0",
|
|
71
|
-
"eslint-plugin-antfu": "^2.1.
|
|
71
|
+
"eslint-plugin-antfu": "^2.1.1",
|
|
72
72
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
73
73
|
"eslint-plugin-i": "^2.29.1",
|
|
74
|
-
"eslint-plugin-jsdoc": "^
|
|
74
|
+
"eslint-plugin-jsdoc": "^48.0.2",
|
|
75
75
|
"eslint-plugin-jsonc": "^2.11.2",
|
|
76
76
|
"eslint-plugin-markdown": "^3.0.1",
|
|
77
|
-
"eslint-plugin-n": "^16.
|
|
77
|
+
"eslint-plugin-n": "^16.6.1",
|
|
78
78
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
79
79
|
"eslint-plugin-perfectionist": "^2.5.0",
|
|
80
80
|
"eslint-plugin-toml": "^0.8.0",
|
|
@@ -98,22 +98,22 @@
|
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
|
|
100
100
|
"@antfu/ni": "^0.21.12",
|
|
101
|
-
"@stylistic/eslint-plugin-migrate": "^1.5.
|
|
102
|
-
"@types/eslint": "^8.56.
|
|
101
|
+
"@stylistic/eslint-plugin-migrate": "^1.5.3",
|
|
102
|
+
"@types/eslint": "^8.56.1",
|
|
103
103
|
"@types/fs-extra": "^11.0.4",
|
|
104
|
-
"@types/node": "^20.10.
|
|
104
|
+
"@types/node": "^20.10.7",
|
|
105
105
|
"@types/prompts": "^2.4.9",
|
|
106
106
|
"@types/yargs": "^17.0.32",
|
|
107
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
107
|
+
"@unocss/eslint-plugin": "^0.58.3",
|
|
108
108
|
"bumpp": "^9.2.1",
|
|
109
|
-
"eslint": "npm:eslint-ts-patch@^8.
|
|
110
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
109
|
+
"eslint": "npm:eslint-ts-patch@^8.56.0-0",
|
|
110
|
+
"eslint-flat-config-viewer": "^0.1.4",
|
|
111
111
|
"eslint-plugin-format": "^0.1.0",
|
|
112
112
|
"eslint-plugin-react": "^7.33.2",
|
|
113
113
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
114
114
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
115
115
|
"eslint-plugin-svelte": "^2.35.1",
|
|
116
|
-
"eslint-ts-patch": "^8.
|
|
116
|
+
"eslint-ts-patch": "^8.56.0-0",
|
|
117
117
|
"esno": "^4.0.0",
|
|
118
118
|
"execa": "^8.0.1",
|
|
119
119
|
"fast-glob": "^3.3.2",
|
|
@@ -121,12 +121,13 @@
|
|
|
121
121
|
"lint-staged": "^15.2.0",
|
|
122
122
|
"rimraf": "^5.0.5",
|
|
123
123
|
"simple-git-hooks": "^2.9.0",
|
|
124
|
+
"svelte": "^4.2.8",
|
|
124
125
|
"svelte-eslint-parser": "^0.33.1",
|
|
125
126
|
"tsup": "^8.0.1",
|
|
126
127
|
"typescript": "^5.3.3",
|
|
127
|
-
"vitest": "^1.1.
|
|
128
|
-
"vue": "^3.
|
|
129
|
-
"@antfu/eslint-config": "2.6.
|
|
128
|
+
"vitest": "^1.1.3",
|
|
129
|
+
"vue": "^3.4.5",
|
|
130
|
+
"@antfu/eslint-config": "2.6.2"
|
|
130
131
|
},
|
|
131
132
|
"simple-git-hooks": {
|
|
132
133
|
"pre-commit": "pnpm lint-staged"
|