@lntvow/eslint-config 9.5.2 → 9.5.3
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/index.cjs +53 -4
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +53 -4
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -312,7 +312,8 @@ async function ignores() {
|
|
|
312
312
|
|
|
313
313
|
// src/configs/imports.ts
|
|
314
314
|
var import_eslint_plugin_import_x = __toESM(require("eslint-plugin-import-x"), 1);
|
|
315
|
-
async function imports() {
|
|
315
|
+
async function imports(options) {
|
|
316
|
+
const { typescript: typescript2 } = options;
|
|
316
317
|
return [
|
|
317
318
|
{
|
|
318
319
|
name: "lntvow/imports/rules",
|
|
@@ -320,8 +321,56 @@ async function imports() {
|
|
|
320
321
|
import: import_eslint_plugin_import_x.default
|
|
321
322
|
},
|
|
322
323
|
rules: {
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
// Update to eslint-plugin-import-x v0.5.2
|
|
325
|
+
// Helpful warnings
|
|
326
|
+
// 'import/export': 'error',
|
|
327
|
+
// 'import/no-deprecated': 'error',
|
|
328
|
+
// 'import/no-empty-named-blocks': 'error',
|
|
329
|
+
// // 幽灵依赖
|
|
330
|
+
// 'import/no-extraneous-dependencies': 'off',
|
|
331
|
+
// 'import/no-mutable-exports': 'error',
|
|
332
|
+
// 'import/no-named-as-default': 'error',
|
|
333
|
+
// 'import/no-named-as-default-member': 'error',
|
|
334
|
+
// 'import/no-unused-modules': 'error',
|
|
335
|
+
// Module systems
|
|
336
|
+
// 'import/no-amd': 'off',
|
|
337
|
+
// 'import/no-commonjs': 'off',
|
|
338
|
+
// 'import/no-import-module-exports': 'off',
|
|
339
|
+
// 'import/no-nodejs-modules': 'off',
|
|
340
|
+
// 'import/unambiguous': 'off',
|
|
341
|
+
// Static analysis
|
|
342
|
+
// 'import/default': 'error',
|
|
343
|
+
// 'import/named': 'error',
|
|
344
|
+
// 'import/namespace': 'error',
|
|
345
|
+
// 'import/no-absolute-path': 'error',
|
|
346
|
+
// 'import/no-cycle': 'off',
|
|
347
|
+
// 'import/no-dynamic-require': 'off',
|
|
348
|
+
// 'import/no-internal-modules': 'off',
|
|
349
|
+
// 'import/no-relative-packages': 'off',
|
|
350
|
+
// 'import/no-relative-parent-imports': 'off',
|
|
351
|
+
// 'import/no-restricted-paths': 'off',
|
|
352
|
+
// 'import/no-self-import': 'off',
|
|
353
|
+
"import/no-unresolved": "error",
|
|
354
|
+
// 'import/no-useless-path-segments': 'error',
|
|
355
|
+
// 'import/no-webpack-loader-syntax': 'error',
|
|
356
|
+
// Style guide
|
|
357
|
+
// 'import/consistent-type-specifier-style': 'off',
|
|
358
|
+
// 'import/dynamic-import-chunkname': 'off',
|
|
359
|
+
// 'import/exports-last': 'off',
|
|
360
|
+
// 'import/extensions': 'off',
|
|
361
|
+
"import/first": "error",
|
|
362
|
+
// 'import/group-exports': 'off',
|
|
363
|
+
// 'import/max-dependencies': 'off',
|
|
364
|
+
"import/newline-after-import": "error",
|
|
365
|
+
// 'import/no-anonymous-default-export': 'off',
|
|
366
|
+
// 'import/no-default-export': 'off',
|
|
367
|
+
"import/no-duplicates": "error",
|
|
368
|
+
// 'import/no-named-default': 'off',
|
|
369
|
+
// 'import/no-named-export': 'off',
|
|
370
|
+
// 'import/no-namespace': 'off',
|
|
371
|
+
// 'import/no-unassigned-import': 'off',
|
|
372
|
+
"import/order": "error"
|
|
373
|
+
// 'import/prefer-default-export': 'off',
|
|
325
374
|
}
|
|
326
375
|
}
|
|
327
376
|
];
|
|
@@ -997,7 +1046,7 @@ function lntvow(options = {}, ...userConfigs) {
|
|
|
997
1046
|
javascript({
|
|
998
1047
|
...resolveSubOptions(options, "javascript")
|
|
999
1048
|
}),
|
|
1000
|
-
imports()
|
|
1049
|
+
imports({ typescript: !!enableTypeScript })
|
|
1001
1050
|
// comments(),
|
|
1002
1051
|
// node(),
|
|
1003
1052
|
// jsdoc({
|
package/dist/index.d.cts
CHANGED
|
@@ -15244,7 +15244,9 @@ declare function gitignore(options: FlatGitignoreOptions): Promise<TypedFlatConf
|
|
|
15244
15244
|
|
|
15245
15245
|
declare function ignores(): Promise<TypedFlatConfigItem[]>;
|
|
15246
15246
|
|
|
15247
|
-
declare function imports(
|
|
15247
|
+
declare function imports(options: {
|
|
15248
|
+
typescript: boolean;
|
|
15249
|
+
}): Promise<TypedFlatConfigItem[]>;
|
|
15248
15250
|
|
|
15249
15251
|
declare function javascript(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
15250
15252
|
|
package/dist/index.d.ts
CHANGED
|
@@ -15244,7 +15244,9 @@ declare function gitignore(options: FlatGitignoreOptions): Promise<TypedFlatConf
|
|
|
15244
15244
|
|
|
15245
15245
|
declare function ignores(): Promise<TypedFlatConfigItem[]>;
|
|
15246
15246
|
|
|
15247
|
-
declare function imports(
|
|
15247
|
+
declare function imports(options: {
|
|
15248
|
+
typescript: boolean;
|
|
15249
|
+
}): Promise<TypedFlatConfigItem[]>;
|
|
15248
15250
|
|
|
15249
15251
|
declare function javascript(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
15250
15252
|
|
package/dist/index.mjs
CHANGED
|
@@ -232,7 +232,8 @@ async function ignores() {
|
|
|
232
232
|
|
|
233
233
|
// src/configs/imports.ts
|
|
234
234
|
import pluginImport from "eslint-plugin-import-x";
|
|
235
|
-
async function imports() {
|
|
235
|
+
async function imports(options) {
|
|
236
|
+
const { typescript: typescript2 } = options;
|
|
236
237
|
return [
|
|
237
238
|
{
|
|
238
239
|
name: "lntvow/imports/rules",
|
|
@@ -240,8 +241,56 @@ async function imports() {
|
|
|
240
241
|
import: pluginImport
|
|
241
242
|
},
|
|
242
243
|
rules: {
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
// Update to eslint-plugin-import-x v0.5.2
|
|
245
|
+
// Helpful warnings
|
|
246
|
+
// 'import/export': 'error',
|
|
247
|
+
// 'import/no-deprecated': 'error',
|
|
248
|
+
// 'import/no-empty-named-blocks': 'error',
|
|
249
|
+
// // 幽灵依赖
|
|
250
|
+
// 'import/no-extraneous-dependencies': 'off',
|
|
251
|
+
// 'import/no-mutable-exports': 'error',
|
|
252
|
+
// 'import/no-named-as-default': 'error',
|
|
253
|
+
// 'import/no-named-as-default-member': 'error',
|
|
254
|
+
// 'import/no-unused-modules': 'error',
|
|
255
|
+
// Module systems
|
|
256
|
+
// 'import/no-amd': 'off',
|
|
257
|
+
// 'import/no-commonjs': 'off',
|
|
258
|
+
// 'import/no-import-module-exports': 'off',
|
|
259
|
+
// 'import/no-nodejs-modules': 'off',
|
|
260
|
+
// 'import/unambiguous': 'off',
|
|
261
|
+
// Static analysis
|
|
262
|
+
// 'import/default': 'error',
|
|
263
|
+
// 'import/named': 'error',
|
|
264
|
+
// 'import/namespace': 'error',
|
|
265
|
+
// 'import/no-absolute-path': 'error',
|
|
266
|
+
// 'import/no-cycle': 'off',
|
|
267
|
+
// 'import/no-dynamic-require': 'off',
|
|
268
|
+
// 'import/no-internal-modules': 'off',
|
|
269
|
+
// 'import/no-relative-packages': 'off',
|
|
270
|
+
// 'import/no-relative-parent-imports': 'off',
|
|
271
|
+
// 'import/no-restricted-paths': 'off',
|
|
272
|
+
// 'import/no-self-import': 'off',
|
|
273
|
+
"import/no-unresolved": "error",
|
|
274
|
+
// 'import/no-useless-path-segments': 'error',
|
|
275
|
+
// 'import/no-webpack-loader-syntax': 'error',
|
|
276
|
+
// Style guide
|
|
277
|
+
// 'import/consistent-type-specifier-style': 'off',
|
|
278
|
+
// 'import/dynamic-import-chunkname': 'off',
|
|
279
|
+
// 'import/exports-last': 'off',
|
|
280
|
+
// 'import/extensions': 'off',
|
|
281
|
+
"import/first": "error",
|
|
282
|
+
// 'import/group-exports': 'off',
|
|
283
|
+
// 'import/max-dependencies': 'off',
|
|
284
|
+
"import/newline-after-import": "error",
|
|
285
|
+
// 'import/no-anonymous-default-export': 'off',
|
|
286
|
+
// 'import/no-default-export': 'off',
|
|
287
|
+
"import/no-duplicates": "error",
|
|
288
|
+
// 'import/no-named-default': 'off',
|
|
289
|
+
// 'import/no-named-export': 'off',
|
|
290
|
+
// 'import/no-namespace': 'off',
|
|
291
|
+
// 'import/no-unassigned-import': 'off',
|
|
292
|
+
"import/order": "error"
|
|
293
|
+
// 'import/prefer-default-export': 'off',
|
|
245
294
|
}
|
|
246
295
|
}
|
|
247
296
|
];
|
|
@@ -917,7 +966,7 @@ function lntvow(options = {}, ...userConfigs) {
|
|
|
917
966
|
javascript({
|
|
918
967
|
...resolveSubOptions(options, "javascript")
|
|
919
968
|
}),
|
|
920
|
-
imports()
|
|
969
|
+
imports({ typescript: !!enableTypeScript })
|
|
921
970
|
// comments(),
|
|
922
971
|
// node(),
|
|
923
972
|
// jsdoc({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/eslint-config",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.3",
|
|
4
4
|
"author": "lntvow",
|
|
5
5
|
"description": "eslint-config",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"eslint": "^9.5.0",
|
|
43
43
|
"eslint-config-prettier": "^9.1.0",
|
|
44
44
|
"eslint-flat-config-utils": "^0.2.5",
|
|
45
|
-
"eslint-plugin-import-x": "^0.5.
|
|
45
|
+
"eslint-plugin-import-x": "^0.5.2",
|
|
46
46
|
"eslint-plugin-prettier": "^5.1.3",
|
|
47
47
|
"eslint-plugin-regexp": "^2.6.0",
|
|
48
48
|
"eslint-plugin-vitest": "^0.5.4",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"tslib": "^2.6.3",
|
|
55
55
|
"typescript": "^5.5.2",
|
|
56
56
|
"vue-eslint-parser": "^9.4.3",
|
|
57
|
-
"@lntvow/eslint-plugin": "^9.5.
|
|
57
|
+
"@lntvow/eslint-plugin": "^9.5.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"dev": "pnpm build --format esm --watch",
|