@antfu/eslint-config 3.0.0 → 3.2.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/dist/cli.cjs +16 -16
- package/dist/cli.js +16 -16
- package/dist/index.cjs +63 -46
- package/dist/index.d.cts +245 -73
- package/dist/index.d.ts +245 -73
- package/dist/index.js +61 -45
- package/package.json +17 -17
package/dist/cli.cjs
CHANGED
|
@@ -48,7 +48,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
48
48
|
var package_default = {
|
|
49
49
|
name: "@antfu/eslint-config",
|
|
50
50
|
type: "module",
|
|
51
|
-
version: "3.
|
|
51
|
+
version: "3.2.0",
|
|
52
52
|
packageManager: "pnpm@9.9.0",
|
|
53
53
|
description: "Anthony's ESLint config",
|
|
54
54
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -95,7 +95,7 @@ var package_default = {
|
|
|
95
95
|
"eslint-plugin-format": ">=0.1.0",
|
|
96
96
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
97
97
|
"eslint-plugin-react-refresh": "^0.4.4",
|
|
98
|
-
"eslint-plugin-solid": "^0.
|
|
98
|
+
"eslint-plugin-solid": "^0.14.3",
|
|
99
99
|
"eslint-plugin-svelte": ">=2.35.1",
|
|
100
100
|
"prettier-plugin-astro": "^0.13.0",
|
|
101
101
|
"prettier-plugin-slidev": "^1.0.5",
|
|
@@ -146,16 +146,16 @@ var package_default = {
|
|
|
146
146
|
"@antfu/install-pkg": "^0.4.1",
|
|
147
147
|
"@clack/prompts": "^0.7.0",
|
|
148
148
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
149
|
-
"@stylistic/eslint-plugin": "^2.
|
|
150
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
151
|
-
"@typescript-eslint/parser": "^8.
|
|
149
|
+
"@stylistic/eslint-plugin": "^2.7.2",
|
|
150
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
151
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
152
152
|
"@vitest/eslint-plugin": "^1.1.0",
|
|
153
153
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
154
154
|
"eslint-flat-config-utils": "^0.3.1",
|
|
155
155
|
"eslint-merge-processors": "^0.1.0",
|
|
156
|
-
"eslint-plugin-antfu": "^2.
|
|
156
|
+
"eslint-plugin-antfu": "^2.4.1",
|
|
157
157
|
"eslint-plugin-command": "^0.2.3",
|
|
158
|
-
"eslint-plugin-import-x": "^4.1.
|
|
158
|
+
"eslint-plugin-import-x": "^4.1.1",
|
|
159
159
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
160
160
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
161
161
|
"eslint-plugin-markdown": "^5.1.0",
|
|
@@ -166,14 +166,14 @@ var package_default = {
|
|
|
166
166
|
"eslint-plugin-toml": "^0.11.1",
|
|
167
167
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
168
168
|
"eslint-plugin-unused-imports": "^4.1.3",
|
|
169
|
-
"eslint-plugin-vue": "^9.
|
|
169
|
+
"eslint-plugin-vue": "^9.28.0",
|
|
170
170
|
"eslint-plugin-yml": "^1.14.0",
|
|
171
171
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
172
172
|
globals: "^15.9.0",
|
|
173
173
|
"jsonc-eslint-parser": "^2.4.0",
|
|
174
174
|
"local-pkg": "^0.5.0",
|
|
175
175
|
"parse-gitignore": "^2.0.0",
|
|
176
|
-
picocolors: "^1.0
|
|
176
|
+
picocolors: "^1.1.0",
|
|
177
177
|
"toml-eslint-parser": "^0.10.0",
|
|
178
178
|
"vue-eslint-parser": "^9.4.3",
|
|
179
179
|
"yaml-eslint-parser": "^1.2.3",
|
|
@@ -182,13 +182,13 @@ var package_default = {
|
|
|
182
182
|
devDependencies: {
|
|
183
183
|
"@antfu/eslint-config": "workspace:*",
|
|
184
184
|
"@antfu/ni": "^0.23.0",
|
|
185
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
185
|
+
"@eslint-react/eslint-plugin": "^1.13.0",
|
|
186
186
|
"@eslint/config-inspector": "^0.5.4",
|
|
187
187
|
"@prettier/plugin-xml": "^3.4.1",
|
|
188
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
188
|
+
"@stylistic/eslint-plugin-migrate": "^2.7.2",
|
|
189
189
|
"@types/eslint": "^9.6.1",
|
|
190
190
|
"@types/fs-extra": "^11.0.4",
|
|
191
|
-
"@types/node": "^22.5.
|
|
191
|
+
"@types/node": "^22.5.3",
|
|
192
192
|
"@types/prompts": "^2.4.9",
|
|
193
193
|
"@types/yargs": "^17.0.33",
|
|
194
194
|
"@unocss/eslint-plugin": "^0.62.3",
|
|
@@ -199,7 +199,7 @@ var package_default = {
|
|
|
199
199
|
"eslint-plugin-format": "^0.1.2",
|
|
200
200
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
201
201
|
"eslint-plugin-react-refresh": "^0.4.11",
|
|
202
|
-
"eslint-plugin-solid": "^0.14.
|
|
202
|
+
"eslint-plugin-solid": "^0.14.3",
|
|
203
203
|
"eslint-plugin-svelte": "^2.43.0",
|
|
204
204
|
"eslint-typegen": "^0.3.1",
|
|
205
205
|
esno: "^4.7.0",
|
|
@@ -207,7 +207,7 @@ var package_default = {
|
|
|
207
207
|
"fast-glob": "^3.3.2",
|
|
208
208
|
"fs-extra": "^11.2.0",
|
|
209
209
|
jiti: "^1.21.6",
|
|
210
|
-
"lint-staged": "^15.2.
|
|
210
|
+
"lint-staged": "^15.2.10",
|
|
211
211
|
"prettier-plugin-astro": "^0.14.1",
|
|
212
212
|
"prettier-plugin-slidev": "^1.0.5",
|
|
213
213
|
rimraf: "^6.0.1",
|
|
@@ -218,11 +218,11 @@ var package_default = {
|
|
|
218
218
|
tsx: "^4.19.0",
|
|
219
219
|
typescript: "^5.5.4",
|
|
220
220
|
vitest: "^2.0.5",
|
|
221
|
-
vue: "^3.
|
|
221
|
+
vue: "^3.5.0"
|
|
222
222
|
},
|
|
223
223
|
resolutions: {
|
|
224
224
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
225
|
-
"@typescript-eslint/utils": "^8.
|
|
225
|
+
"@typescript-eslint/utils": "^8.4.0",
|
|
226
226
|
eslint: "^9.9.1",
|
|
227
227
|
tsx: "^4.19.0"
|
|
228
228
|
},
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import c from "picocolors";
|
|
|
19
19
|
var package_default = {
|
|
20
20
|
name: "@antfu/eslint-config",
|
|
21
21
|
type: "module",
|
|
22
|
-
version: "3.
|
|
22
|
+
version: "3.2.0",
|
|
23
23
|
packageManager: "pnpm@9.9.0",
|
|
24
24
|
description: "Anthony's ESLint config",
|
|
25
25
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -66,7 +66,7 @@ var package_default = {
|
|
|
66
66
|
"eslint-plugin-format": ">=0.1.0",
|
|
67
67
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
68
68
|
"eslint-plugin-react-refresh": "^0.4.4",
|
|
69
|
-
"eslint-plugin-solid": "^0.
|
|
69
|
+
"eslint-plugin-solid": "^0.14.3",
|
|
70
70
|
"eslint-plugin-svelte": ">=2.35.1",
|
|
71
71
|
"prettier-plugin-astro": "^0.13.0",
|
|
72
72
|
"prettier-plugin-slidev": "^1.0.5",
|
|
@@ -117,16 +117,16 @@ var package_default = {
|
|
|
117
117
|
"@antfu/install-pkg": "^0.4.1",
|
|
118
118
|
"@clack/prompts": "^0.7.0",
|
|
119
119
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
120
|
-
"@stylistic/eslint-plugin": "^2.
|
|
121
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
122
|
-
"@typescript-eslint/parser": "^8.
|
|
120
|
+
"@stylistic/eslint-plugin": "^2.7.2",
|
|
121
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
122
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
123
123
|
"@vitest/eslint-plugin": "^1.1.0",
|
|
124
124
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
125
125
|
"eslint-flat-config-utils": "^0.3.1",
|
|
126
126
|
"eslint-merge-processors": "^0.1.0",
|
|
127
|
-
"eslint-plugin-antfu": "^2.
|
|
127
|
+
"eslint-plugin-antfu": "^2.4.1",
|
|
128
128
|
"eslint-plugin-command": "^0.2.3",
|
|
129
|
-
"eslint-plugin-import-x": "^4.1.
|
|
129
|
+
"eslint-plugin-import-x": "^4.1.1",
|
|
130
130
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
131
131
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
132
132
|
"eslint-plugin-markdown": "^5.1.0",
|
|
@@ -137,14 +137,14 @@ var package_default = {
|
|
|
137
137
|
"eslint-plugin-toml": "^0.11.1",
|
|
138
138
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
139
139
|
"eslint-plugin-unused-imports": "^4.1.3",
|
|
140
|
-
"eslint-plugin-vue": "^9.
|
|
140
|
+
"eslint-plugin-vue": "^9.28.0",
|
|
141
141
|
"eslint-plugin-yml": "^1.14.0",
|
|
142
142
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
143
143
|
globals: "^15.9.0",
|
|
144
144
|
"jsonc-eslint-parser": "^2.4.0",
|
|
145
145
|
"local-pkg": "^0.5.0",
|
|
146
146
|
"parse-gitignore": "^2.0.0",
|
|
147
|
-
picocolors: "^1.0
|
|
147
|
+
picocolors: "^1.1.0",
|
|
148
148
|
"toml-eslint-parser": "^0.10.0",
|
|
149
149
|
"vue-eslint-parser": "^9.4.3",
|
|
150
150
|
"yaml-eslint-parser": "^1.2.3",
|
|
@@ -153,13 +153,13 @@ var package_default = {
|
|
|
153
153
|
devDependencies: {
|
|
154
154
|
"@antfu/eslint-config": "workspace:*",
|
|
155
155
|
"@antfu/ni": "^0.23.0",
|
|
156
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
156
|
+
"@eslint-react/eslint-plugin": "^1.13.0",
|
|
157
157
|
"@eslint/config-inspector": "^0.5.4",
|
|
158
158
|
"@prettier/plugin-xml": "^3.4.1",
|
|
159
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
159
|
+
"@stylistic/eslint-plugin-migrate": "^2.7.2",
|
|
160
160
|
"@types/eslint": "^9.6.1",
|
|
161
161
|
"@types/fs-extra": "^11.0.4",
|
|
162
|
-
"@types/node": "^22.5.
|
|
162
|
+
"@types/node": "^22.5.3",
|
|
163
163
|
"@types/prompts": "^2.4.9",
|
|
164
164
|
"@types/yargs": "^17.0.33",
|
|
165
165
|
"@unocss/eslint-plugin": "^0.62.3",
|
|
@@ -170,7 +170,7 @@ var package_default = {
|
|
|
170
170
|
"eslint-plugin-format": "^0.1.2",
|
|
171
171
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
172
172
|
"eslint-plugin-react-refresh": "^0.4.11",
|
|
173
|
-
"eslint-plugin-solid": "^0.14.
|
|
173
|
+
"eslint-plugin-solid": "^0.14.3",
|
|
174
174
|
"eslint-plugin-svelte": "^2.43.0",
|
|
175
175
|
"eslint-typegen": "^0.3.1",
|
|
176
176
|
esno: "^4.7.0",
|
|
@@ -178,7 +178,7 @@ var package_default = {
|
|
|
178
178
|
"fast-glob": "^3.3.2",
|
|
179
179
|
"fs-extra": "^11.2.0",
|
|
180
180
|
jiti: "^1.21.6",
|
|
181
|
-
"lint-staged": "^15.2.
|
|
181
|
+
"lint-staged": "^15.2.10",
|
|
182
182
|
"prettier-plugin-astro": "^0.14.1",
|
|
183
183
|
"prettier-plugin-slidev": "^1.0.5",
|
|
184
184
|
rimraf: "^6.0.1",
|
|
@@ -189,11 +189,11 @@ var package_default = {
|
|
|
189
189
|
tsx: "^4.19.0",
|
|
190
190
|
typescript: "^5.5.4",
|
|
191
191
|
vitest: "^2.0.5",
|
|
192
|
-
vue: "^3.
|
|
192
|
+
vue: "^3.5.0"
|
|
193
193
|
},
|
|
194
194
|
resolutions: {
|
|
195
195
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
196
|
-
"@typescript-eslint/utils": "^8.
|
|
196
|
+
"@typescript-eslint/utils": "^8.4.0",
|
|
197
197
|
eslint: "^9.9.1",
|
|
198
198
|
tsx: "^4.19.0"
|
|
199
199
|
},
|
package/dist/index.cjs
CHANGED
|
@@ -68,6 +68,7 @@ __export(src_exports, {
|
|
|
68
68
|
comments: () => comments,
|
|
69
69
|
default: () => src_default,
|
|
70
70
|
defaultPluginRenaming: () => defaultPluginRenaming,
|
|
71
|
+
disables: () => disables,
|
|
71
72
|
ensurePackages: () => ensurePackages,
|
|
72
73
|
formatters: () => formatters,
|
|
73
74
|
getOverrides: () => getOverrides,
|
|
@@ -106,7 +107,7 @@ __export(src_exports, {
|
|
|
106
107
|
});
|
|
107
108
|
module.exports = __toCommonJS(src_exports);
|
|
108
109
|
|
|
109
|
-
// node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.
|
|
110
|
+
// node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.44_tsx@4.19.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
110
111
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
111
112
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
112
113
|
|
|
@@ -338,7 +339,6 @@ async function astro(options = {}) {
|
|
|
338
339
|
...stylistic2 ? {
|
|
339
340
|
"style/indent": "off",
|
|
340
341
|
"style/jsx-closing-tag-location": "off",
|
|
341
|
-
"style/jsx-indent": "off",
|
|
342
342
|
"style/jsx-one-expression-per-line": "off",
|
|
343
343
|
"style/no-multiple-empty-lines": "off"
|
|
344
344
|
} : {},
|
|
@@ -426,6 +426,7 @@ async function stylistic(options = {}) {
|
|
|
426
426
|
},
|
|
427
427
|
rules: {
|
|
428
428
|
...config.rules,
|
|
429
|
+
"antfu/consistent-chaining": "error",
|
|
429
430
|
"antfu/consistent-list-newline": "error",
|
|
430
431
|
...lessOpinionated ? {
|
|
431
432
|
curly: ["error", "all"]
|
|
@@ -762,14 +763,6 @@ async function imports(options = {}) {
|
|
|
762
763
|
"import/newline-after-import": ["error", { count: 1 }]
|
|
763
764
|
} : {}
|
|
764
765
|
}
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
768
|
-
name: "antfu/imports/disables/bin",
|
|
769
|
-
rules: {
|
|
770
|
-
"antfu/no-import-dist": "off",
|
|
771
|
-
"antfu/no-import-node-modules-by-path": "off"
|
|
772
|
-
}
|
|
773
766
|
}
|
|
774
767
|
];
|
|
775
768
|
}
|
|
@@ -985,13 +978,6 @@ async function javascript(options = {}) {
|
|
|
985
978
|
"yoda": ["error", "never"],
|
|
986
979
|
...overrides
|
|
987
980
|
}
|
|
988
|
-
},
|
|
989
|
-
{
|
|
990
|
-
files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
|
|
991
|
-
name: "antfu/javascript/disables/cli",
|
|
992
|
-
rules: {
|
|
993
|
-
"no-console": "off"
|
|
994
|
-
}
|
|
995
981
|
}
|
|
996
982
|
];
|
|
997
983
|
}
|
|
@@ -1193,7 +1179,6 @@ async function markdown(options = {}) {
|
|
|
1193
1179
|
"ts/no-unused-expressions": "off",
|
|
1194
1180
|
"ts/no-unused-vars": "off",
|
|
1195
1181
|
"ts/no-use-before-define": "off",
|
|
1196
|
-
"ts/no-var-requires": "off",
|
|
1197
1182
|
"unicode-bom": "off",
|
|
1198
1183
|
"unused-imports/no-unused-imports": "off",
|
|
1199
1184
|
"unused-imports/no-unused-vars": "off",
|
|
@@ -1838,6 +1823,7 @@ async function test(options = {}) {
|
|
|
1838
1823
|
"test/prefer-hooks-in-order": "error",
|
|
1839
1824
|
"test/prefer-lowercase-title": "error",
|
|
1840
1825
|
"ts/explicit-function-return-type": "off",
|
|
1826
|
+
"unicorn/consistent-function-scoping": "off",
|
|
1841
1827
|
...overrides
|
|
1842
1828
|
}
|
|
1843
1829
|
}
|
|
@@ -2006,7 +1992,6 @@ async function typescript(options = {}) {
|
|
|
2006
1992
|
{ "@typescript-eslint": "ts" }
|
|
2007
1993
|
),
|
|
2008
1994
|
"no-dupe-class-members": "off",
|
|
2009
|
-
"no-loss-of-precision": "off",
|
|
2010
1995
|
"no-redeclare": "off",
|
|
2011
1996
|
"no-use-before-define": "off",
|
|
2012
1997
|
"no-useless-constructor": "off",
|
|
@@ -2025,7 +2010,6 @@ async function typescript(options = {}) {
|
|
|
2025
2010
|
"ts/no-extraneous-class": "off",
|
|
2026
2011
|
"ts/no-import-type-side-effects": "error",
|
|
2027
2012
|
"ts/no-invalid-void-type": "off",
|
|
2028
|
-
"ts/no-loss-of-precision": "error",
|
|
2029
2013
|
"ts/no-non-null-assertion": "off",
|
|
2030
2014
|
"ts/no-redeclare": "error",
|
|
2031
2015
|
"ts/no-require-imports": "error",
|
|
@@ -2053,32 +2037,7 @@ async function typescript(options = {}) {
|
|
|
2053
2037
|
...typeAwareRules,
|
|
2054
2038
|
...overridesTypeAware
|
|
2055
2039
|
}
|
|
2056
|
-
}] : []
|
|
2057
|
-
{
|
|
2058
|
-
files: ["**/*.d.?([cm])ts"],
|
|
2059
|
-
name: "antfu/typescript/disables/dts",
|
|
2060
|
-
rules: {
|
|
2061
|
-
"eslint-comments/no-unlimited-disable": "off",
|
|
2062
|
-
"import/no-duplicates": "off",
|
|
2063
|
-
"no-restricted-syntax": "off",
|
|
2064
|
-
"unused-imports/no-unused-vars": "off"
|
|
2065
|
-
}
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
files: ["**/*.{test,spec}.ts?(x)"],
|
|
2069
|
-
name: "antfu/typescript/disables/test",
|
|
2070
|
-
rules: {
|
|
2071
|
-
"no-unused-expressions": "off"
|
|
2072
|
-
}
|
|
2073
|
-
},
|
|
2074
|
-
{
|
|
2075
|
-
files: ["**/*.js", "**/*.cjs"],
|
|
2076
|
-
name: "antfu/typescript/disables/cjs",
|
|
2077
|
-
rules: {
|
|
2078
|
-
"ts/no-require-imports": "off",
|
|
2079
|
-
"ts/no-var-requires": "off"
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2040
|
+
}] : []
|
|
2082
2041
|
];
|
|
2083
2042
|
}
|
|
2084
2043
|
|
|
@@ -2398,6 +2357,60 @@ async function regexp(options = {}) {
|
|
|
2398
2357
|
];
|
|
2399
2358
|
}
|
|
2400
2359
|
|
|
2360
|
+
// src/configs/disables.ts
|
|
2361
|
+
async function disables() {
|
|
2362
|
+
return [
|
|
2363
|
+
{
|
|
2364
|
+
files: [`scripts/${GLOB_SRC}`],
|
|
2365
|
+
name: "antfu/disables/scripts",
|
|
2366
|
+
rules: {
|
|
2367
|
+
"no-console": "off",
|
|
2368
|
+
"ts/explicit-function-return-type": "off",
|
|
2369
|
+
"unicorn/consistent-function-scoping": "off"
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
files: [`cli/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
|
|
2374
|
+
name: "antfu/disables/cli",
|
|
2375
|
+
rules: {
|
|
2376
|
+
"no-console": "off"
|
|
2377
|
+
}
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
2381
|
+
name: "antfu/disables/bin",
|
|
2382
|
+
rules: {
|
|
2383
|
+
"antfu/no-import-dist": "off",
|
|
2384
|
+
"antfu/no-import-node-modules-by-path": "off"
|
|
2385
|
+
}
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
files: ["**/*.d.?([cm])ts"],
|
|
2389
|
+
name: "antfu/disables/dts",
|
|
2390
|
+
rules: {
|
|
2391
|
+
"eslint-comments/no-unlimited-disable": "off",
|
|
2392
|
+
"import/no-duplicates": "off",
|
|
2393
|
+
"no-restricted-syntax": "off",
|
|
2394
|
+
"unused-imports/no-unused-vars": "off"
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
files: ["**/*.{test,spec}.([tj])s?(x)"],
|
|
2399
|
+
name: "antfu/disables/test",
|
|
2400
|
+
rules: {
|
|
2401
|
+
"no-unused-expressions": "off"
|
|
2402
|
+
}
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
files: ["**/*.js", "**/*.cjs"],
|
|
2406
|
+
name: "antfu/disables/cjs",
|
|
2407
|
+
rules: {
|
|
2408
|
+
"ts/no-require-imports": "off"
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
];
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2401
2414
|
// src/factory.ts
|
|
2402
2415
|
var flatConfigProps = [
|
|
2403
2416
|
"name",
|
|
@@ -2596,6 +2609,9 @@ function antfu(options = {}, ...userConfigs) {
|
|
|
2596
2609
|
typeof stylisticOptions === "boolean" ? {} : stylisticOptions
|
|
2597
2610
|
));
|
|
2598
2611
|
}
|
|
2612
|
+
configs2.push(
|
|
2613
|
+
disables()
|
|
2614
|
+
);
|
|
2599
2615
|
if ("files" in options) {
|
|
2600
2616
|
throw new Error('[@antfu/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');
|
|
2601
2617
|
}
|
|
@@ -2668,6 +2684,7 @@ var src_default = antfu;
|
|
|
2668
2684
|
command,
|
|
2669
2685
|
comments,
|
|
2670
2686
|
defaultPluginRenaming,
|
|
2687
|
+
disables,
|
|
2671
2688
|
ensurePackages,
|
|
2672
2689
|
formatters,
|
|
2673
2690
|
getOverrides,
|