@antfu/eslint-config 2.8.0 → 2.8.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/dist/cli.cjs +6 -6
- package/dist/cli.js +6 -6
- package/dist/index.cjs +22 -1
- package/dist/index.js +22 -1
- package/package.json +14 -14
package/dist/cli.cjs
CHANGED
|
@@ -46,15 +46,15 @@ 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.8.
|
|
49
|
+
var version = "2.8.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.
|
|
54
|
+
"@stylistic/eslint-plugin-migrate": "^1.7.0",
|
|
55
55
|
"@types/eslint": "^8.56.5",
|
|
56
56
|
"@types/fs-extra": "^11.0.4",
|
|
57
|
-
"@types/node": "^20.11.
|
|
57
|
+
"@types/node": "^20.11.27",
|
|
58
58
|
"@types/prompts": "^2.4.9",
|
|
59
59
|
"@types/yargs": "^17.0.32",
|
|
60
60
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
@@ -66,7 +66,7 @@ var devDependencies = {
|
|
|
66
66
|
"eslint-plugin-format": "^0.1.0",
|
|
67
67
|
"eslint-plugin-react": "^7.34.0",
|
|
68
68
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
69
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
69
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
70
70
|
"eslint-plugin-svelte": "^2.35.1",
|
|
71
71
|
"eslint-ts-patch": "^8.57.0-0",
|
|
72
72
|
esno: "^4.7.0",
|
|
@@ -81,7 +81,7 @@ var devDependencies = {
|
|
|
81
81
|
svelte: "^4.2.12",
|
|
82
82
|
"svelte-eslint-parser": "^0.33.1",
|
|
83
83
|
tsup: "^8.0.2",
|
|
84
|
-
typescript: "^5.
|
|
84
|
+
typescript: "^5.4.2",
|
|
85
85
|
vitest: "^1.3.1",
|
|
86
86
|
vue: "^3.4.21"
|
|
87
87
|
};
|
|
@@ -216,7 +216,7 @@ ${antfuConfig}
|
|
|
216
216
|
const files = import_node_fs.default.readdirSync(cwd);
|
|
217
217
|
const legacyConfig = [];
|
|
218
218
|
files.forEach((file) => {
|
|
219
|
-
if (file
|
|
219
|
+
if (/eslint|prettier/.test(file) && !/eslint.config./.test(file))
|
|
220
220
|
legacyConfig.push(file);
|
|
221
221
|
});
|
|
222
222
|
if (legacyConfig.length) {
|
package/dist/cli.js
CHANGED
|
@@ -17,15 +17,15 @@ import parse from "parse-gitignore";
|
|
|
17
17
|
import c from "picocolors";
|
|
18
18
|
|
|
19
19
|
// package.json
|
|
20
|
-
var version = "2.8.
|
|
20
|
+
var version = "2.8.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.
|
|
25
|
+
"@stylistic/eslint-plugin-migrate": "^1.7.0",
|
|
26
26
|
"@types/eslint": "^8.56.5",
|
|
27
27
|
"@types/fs-extra": "^11.0.4",
|
|
28
|
-
"@types/node": "^20.11.
|
|
28
|
+
"@types/node": "^20.11.27",
|
|
29
29
|
"@types/prompts": "^2.4.9",
|
|
30
30
|
"@types/yargs": "^17.0.32",
|
|
31
31
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
@@ -37,7 +37,7 @@ var devDependencies = {
|
|
|
37
37
|
"eslint-plugin-format": "^0.1.0",
|
|
38
38
|
"eslint-plugin-react": "^7.34.0",
|
|
39
39
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
40
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
40
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
41
41
|
"eslint-plugin-svelte": "^2.35.1",
|
|
42
42
|
"eslint-ts-patch": "^8.57.0-0",
|
|
43
43
|
esno: "^4.7.0",
|
|
@@ -52,7 +52,7 @@ var devDependencies = {
|
|
|
52
52
|
svelte: "^4.2.12",
|
|
53
53
|
"svelte-eslint-parser": "^0.33.1",
|
|
54
54
|
tsup: "^8.0.2",
|
|
55
|
-
typescript: "^5.
|
|
55
|
+
typescript: "^5.4.2",
|
|
56
56
|
vitest: "^1.3.1",
|
|
57
57
|
vue: "^3.4.21"
|
|
58
58
|
};
|
|
@@ -187,7 +187,7 @@ ${antfuConfig}
|
|
|
187
187
|
const files = fs.readdirSync(cwd);
|
|
188
188
|
const legacyConfig = [];
|
|
189
189
|
files.forEach((file) => {
|
|
190
|
-
if (file
|
|
190
|
+
if (/eslint|prettier/.test(file) && !/eslint.config./.test(file))
|
|
191
191
|
legacyConfig.push(file);
|
|
192
192
|
});
|
|
193
193
|
if (legacyConfig.length) {
|
package/dist/index.cjs
CHANGED
|
@@ -190,6 +190,7 @@ var GLOB_EXCLUDE = [
|
|
|
190
190
|
"**/.cache",
|
|
191
191
|
"**/.output",
|
|
192
192
|
"**/.vite-inspect",
|
|
193
|
+
"**/.yarn",
|
|
193
194
|
"**/CHANGELOG*.md",
|
|
194
195
|
"**/*.min.*",
|
|
195
196
|
"**/LICENSE*",
|
|
@@ -231,7 +232,7 @@ async function imports(options = {}) {
|
|
|
231
232
|
"import/no-webpack-loader-syntax": "error",
|
|
232
233
|
"import/order": "error",
|
|
233
234
|
...stylistic2 ? {
|
|
234
|
-
"import/newline-after-import": ["error", {
|
|
235
|
+
"import/newline-after-import": ["error", { count: 1 }]
|
|
235
236
|
} : {}
|
|
236
237
|
}
|
|
237
238
|
},
|
|
@@ -1732,6 +1733,26 @@ async function vue(options = {}) {
|
|
|
1732
1733
|
]);
|
|
1733
1734
|
return [
|
|
1734
1735
|
{
|
|
1736
|
+
// This allows Vue plugin to work with auto imports
|
|
1737
|
+
// https://github.com/vuejs/eslint-plugin-vue/pull/2422
|
|
1738
|
+
languageOptions: {
|
|
1739
|
+
globals: {
|
|
1740
|
+
computed: "readonly",
|
|
1741
|
+
defineEmits: "readonly",
|
|
1742
|
+
defineExpose: "readonly",
|
|
1743
|
+
defineProps: "readonly",
|
|
1744
|
+
onMounted: "readonly",
|
|
1745
|
+
onUnmounted: "readonly",
|
|
1746
|
+
reactive: "readonly",
|
|
1747
|
+
ref: "readonly",
|
|
1748
|
+
shallowReactive: "readonly",
|
|
1749
|
+
shallowRef: "readonly",
|
|
1750
|
+
toRef: "readonly",
|
|
1751
|
+
toRefs: "readonly",
|
|
1752
|
+
watch: "readonly",
|
|
1753
|
+
watchEffect: "readonly"
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1735
1756
|
name: "antfu:vue:setup",
|
|
1736
1757
|
plugins: {
|
|
1737
1758
|
vue: pluginVue
|
package/dist/index.js
CHANGED
|
@@ -95,6 +95,7 @@ var GLOB_EXCLUDE = [
|
|
|
95
95
|
"**/.cache",
|
|
96
96
|
"**/.output",
|
|
97
97
|
"**/.vite-inspect",
|
|
98
|
+
"**/.yarn",
|
|
98
99
|
"**/CHANGELOG*.md",
|
|
99
100
|
"**/*.min.*",
|
|
100
101
|
"**/LICENSE*",
|
|
@@ -136,7 +137,7 @@ async function imports(options = {}) {
|
|
|
136
137
|
"import/no-webpack-loader-syntax": "error",
|
|
137
138
|
"import/order": "error",
|
|
138
139
|
...stylistic2 ? {
|
|
139
|
-
"import/newline-after-import": ["error", {
|
|
140
|
+
"import/newline-after-import": ["error", { count: 1 }]
|
|
140
141
|
} : {}
|
|
141
142
|
}
|
|
142
143
|
},
|
|
@@ -1637,6 +1638,26 @@ async function vue(options = {}) {
|
|
|
1637
1638
|
]);
|
|
1638
1639
|
return [
|
|
1639
1640
|
{
|
|
1641
|
+
// This allows Vue plugin to work with auto imports
|
|
1642
|
+
// https://github.com/vuejs/eslint-plugin-vue/pull/2422
|
|
1643
|
+
languageOptions: {
|
|
1644
|
+
globals: {
|
|
1645
|
+
computed: "readonly",
|
|
1646
|
+
defineEmits: "readonly",
|
|
1647
|
+
defineExpose: "readonly",
|
|
1648
|
+
defineProps: "readonly",
|
|
1649
|
+
onMounted: "readonly",
|
|
1650
|
+
onUnmounted: "readonly",
|
|
1651
|
+
reactive: "readonly",
|
|
1652
|
+
ref: "readonly",
|
|
1653
|
+
shallowReactive: "readonly",
|
|
1654
|
+
shallowRef: "readonly",
|
|
1655
|
+
toRef: "readonly",
|
|
1656
|
+
toRefs: "readonly",
|
|
1657
|
+
watch: "readonly",
|
|
1658
|
+
watchEffect: "readonly"
|
|
1659
|
+
}
|
|
1660
|
+
},
|
|
1640
1661
|
name: "antfu:vue:setup",
|
|
1641
1662
|
plugins: {
|
|
1642
1663
|
vue: pluginVue
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.2",
|
|
5
5
|
"packageManager": "pnpm@8.15.4",
|
|
6
6
|
"description": "Anthony's ESLint config",
|
|
7
7
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -79,25 +79,25 @@
|
|
|
79
79
|
"@eslint-types/jsdoc": "46.8.2-1",
|
|
80
80
|
"@eslint-types/typescript-eslint": "^7.0.2",
|
|
81
81
|
"@eslint-types/unicorn": "^51.0.1",
|
|
82
|
-
"@stylistic/eslint-plugin": "^1.
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
84
|
-
"@typescript-eslint/parser": "^7.
|
|
82
|
+
"@stylistic/eslint-plugin": "^1.7.0",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
84
|
+
"@typescript-eslint/parser": "^7.2.0",
|
|
85
85
|
"eslint-config-flat-gitignore": "^0.1.3",
|
|
86
86
|
"eslint-merge-processors": "^0.1.0",
|
|
87
87
|
"eslint-plugin-antfu": "^2.1.2",
|
|
88
88
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
89
89
|
"eslint-plugin-i": "^2.29.1",
|
|
90
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
90
|
+
"eslint-plugin-jsdoc": "^48.2.1",
|
|
91
91
|
"eslint-plugin-jsonc": "^2.13.0",
|
|
92
|
-
"eslint-plugin-markdown": "^
|
|
92
|
+
"eslint-plugin-markdown": "^4.0.1",
|
|
93
93
|
"eslint-plugin-n": "^16.6.2",
|
|
94
94
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
95
|
-
"eslint-plugin-perfectionist": "^2.
|
|
95
|
+
"eslint-plugin-perfectionist": "^2.6.0",
|
|
96
96
|
"eslint-plugin-toml": "^0.9.2",
|
|
97
97
|
"eslint-plugin-unicorn": "^51.0.1",
|
|
98
98
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
99
|
-
"eslint-plugin-vitest": "^0.3.
|
|
100
|
-
"eslint-plugin-vue": "^9.
|
|
99
|
+
"eslint-plugin-vitest": "^0.3.26",
|
|
100
|
+
"eslint-plugin-vue": "^9.23.0",
|
|
101
101
|
"eslint-plugin-yml": "^1.12.2",
|
|
102
102
|
"eslint-processor-vue-blocks": "^0.1.1",
|
|
103
103
|
"globals": "^14.0.0",
|
|
@@ -114,10 +114,10 @@
|
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
|
|
116
116
|
"@antfu/ni": "^0.21.12",
|
|
117
|
-
"@stylistic/eslint-plugin-migrate": "^1.
|
|
117
|
+
"@stylistic/eslint-plugin-migrate": "^1.7.0",
|
|
118
118
|
"@types/eslint": "^8.56.5",
|
|
119
119
|
"@types/fs-extra": "^11.0.4",
|
|
120
|
-
"@types/node": "^20.11.
|
|
120
|
+
"@types/node": "^20.11.27",
|
|
121
121
|
"@types/prompts": "^2.4.9",
|
|
122
122
|
"@types/yargs": "^17.0.32",
|
|
123
123
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"eslint-plugin-format": "^0.1.0",
|
|
130
130
|
"eslint-plugin-react": "^7.34.0",
|
|
131
131
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
132
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
132
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
133
133
|
"eslint-plugin-svelte": "^2.35.1",
|
|
134
134
|
"eslint-ts-patch": "^8.57.0-0",
|
|
135
135
|
"esno": "^4.7.0",
|
|
@@ -144,10 +144,10 @@
|
|
|
144
144
|
"svelte": "^4.2.12",
|
|
145
145
|
"svelte-eslint-parser": "^0.33.1",
|
|
146
146
|
"tsup": "^8.0.2",
|
|
147
|
-
"typescript": "^5.
|
|
147
|
+
"typescript": "^5.4.2",
|
|
148
148
|
"vitest": "^1.3.1",
|
|
149
149
|
"vue": "^3.4.21",
|
|
150
|
-
"@antfu/eslint-config": "2.8.
|
|
150
|
+
"@antfu/eslint-config": "2.8.2"
|
|
151
151
|
},
|
|
152
152
|
"simple-git-hooks": {
|
|
153
153
|
"pre-commit": "pnpm lint-staged"
|