@coderwyd/eslint-config 2.5.1 → 2.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/cli.cjs CHANGED
@@ -46,10 +46,10 @@ 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.5.1";
49
+ var version = "2.5.3";
50
50
  var devDependencies = {
51
51
  "@antfu/ni": "^0.21.12",
52
- "@eslint-react/eslint-plugin": "^1.5.12",
52
+ "@eslint-react/eslint-plugin": "^1.5.13",
53
53
  "@eslint/config-inspector": "^0.4.8",
54
54
  "@stylistic/eslint-plugin-migrate": "^2.1.0",
55
55
  "@types/eslint": "^8.56.10",
@@ -60,21 +60,20 @@ var devDependencies = {
60
60
  "@unocss/eslint-plugin": "^0.60.3",
61
61
  bumpp: "^9.4.1",
62
62
  eslint: "^9.3.0",
63
- "eslint-plugin-react": "^7.34.1",
64
63
  "eslint-plugin-react-hooks": "^4.6.2",
65
64
  "eslint-plugin-react-refresh": "^0.4.7",
66
65
  "eslint-plugin-svelte": "2.39.0",
67
- "eslint-plugin-tailwindcss": "^3.16.0",
66
+ "eslint-plugin-tailwindcss": "^3.17.0",
68
67
  execa: "^9.1.0",
69
68
  "fast-glob": "^3.3.2",
70
69
  "fs-extra": "^11.2.0",
71
- "lint-staged": "^15.2.4",
70
+ "lint-staged": "^15.2.5",
72
71
  rimraf: "^5.0.7",
73
72
  "simple-git-hooks": "^2.11.1",
74
73
  svelte: "^4.2.17",
75
74
  "svelte-eslint-parser": "^0.36.0",
76
75
  tsup: "^8.0.2",
77
- tsx: "^4.10.5",
76
+ tsx: "^4.11.0",
78
77
  typescript: "^5.4.5"
79
78
  };
80
79
 
package/dist/cli.js CHANGED
@@ -17,10 +17,10 @@ import parse from "parse-gitignore";
17
17
  import c from "picocolors";
18
18
 
19
19
  // package.json
20
- var version = "2.5.1";
20
+ var version = "2.5.3";
21
21
  var devDependencies = {
22
22
  "@antfu/ni": "^0.21.12",
23
- "@eslint-react/eslint-plugin": "^1.5.12",
23
+ "@eslint-react/eslint-plugin": "^1.5.13",
24
24
  "@eslint/config-inspector": "^0.4.8",
25
25
  "@stylistic/eslint-plugin-migrate": "^2.1.0",
26
26
  "@types/eslint": "^8.56.10",
@@ -31,21 +31,20 @@ var devDependencies = {
31
31
  "@unocss/eslint-plugin": "^0.60.3",
32
32
  bumpp: "^9.4.1",
33
33
  eslint: "^9.3.0",
34
- "eslint-plugin-react": "^7.34.1",
35
34
  "eslint-plugin-react-hooks": "^4.6.2",
36
35
  "eslint-plugin-react-refresh": "^0.4.7",
37
36
  "eslint-plugin-svelte": "2.39.0",
38
- "eslint-plugin-tailwindcss": "^3.16.0",
37
+ "eslint-plugin-tailwindcss": "^3.17.0",
39
38
  execa: "^9.1.0",
40
39
  "fast-glob": "^3.3.2",
41
40
  "fs-extra": "^11.2.0",
42
- "lint-staged": "^15.2.4",
41
+ "lint-staged": "^15.2.5",
43
42
  rimraf: "^5.0.7",
44
43
  "simple-git-hooks": "^2.11.1",
45
44
  svelte: "^4.2.17",
46
45
  "svelte-eslint-parser": "^0.36.0",
47
46
  tsup: "^8.0.2",
48
- tsx: "^4.10.5",
47
+ tsx: "^4.11.0",
49
48
  typescript: "^5.4.5"
50
49
  };
51
50
 
package/dist/index.cjs CHANGED
@@ -288,9 +288,9 @@ async function javascript(options = {}) {
288
288
  "no-new": "error",
289
289
  "no-new-func": "error",
290
290
  "no-new-native-nonconstructor": "error",
291
- "no-new-object": "error",
292
291
  "no-new-wrappers": "error",
293
292
  "no-obj-calls": "error",
293
+ "no-object-constructor": "error",
294
294
  "no-octal": "error",
295
295
  "no-octal-escape": "error",
296
296
  "no-proto": "error",
@@ -956,9 +956,9 @@ async function stylistic(options = {}) {
956
956
  rules: {
957
957
  ...config.rules,
958
958
  "antfu/consistent-list-newline": "error",
959
+ "antfu/curly": "error",
959
960
  "antfu/if-newline": "warn",
960
961
  "antfu/top-level-function": "warn",
961
- "curly": ["error", "multi-or-nest", "consistent"],
962
962
  ...overrides
963
963
  }
964
964
  }
@@ -1283,9 +1283,13 @@ async function vue(options = {}) {
1283
1283
  order: isVue3 ? ["script", "template", "style"] : ["template", "script", "style"]
1284
1284
  }
1285
1285
  ],
1286
+ // 'vue/component-api-style': ['warn', ['script-setup', 'composition']],
1286
1287
  "vue/component-name-in-template-casing": ["error", "PascalCase"],
1287
1288
  "vue/component-options-name-casing": ["error", "PascalCase"],
1289
+ // this is deprecated
1290
+ "vue/component-tags-order": "off",
1288
1291
  "vue/custom-event-name-casing": ["error", "camelCase"],
1292
+ // 'vue/define-emits-declaration': ['warn', 'type-based'],
1289
1293
  "vue/define-macros-order": [
1290
1294
  "error",
1291
1295
  {
@@ -1297,31 +1301,35 @@ async function vue(options = {}) {
1297
1301
  ]
1298
1302
  }
1299
1303
  ],
1304
+ // 'vue/define-props-declaration': ['warn', 'type-based'],
1300
1305
  "vue/dot-location": ["error", "property"],
1301
1306
  "vue/dot-notation": ["error", { allowKeywords: true }],
1302
1307
  "vue/eqeqeq": ["error", "smart"],
1303
1308
  "vue/html-indent": ["error", indent],
1309
+ // 'vue/html-self-closing': [
1310
+ // 'error',
1311
+ // {
1312
+ // html: {
1313
+ // component: 'always',
1314
+ // normal: 'always',
1315
+ // void: 'any',
1316
+ // },
1317
+ // math: 'always',
1318
+ // svg: 'always',
1319
+ // },
1304
1320
  "vue/html-quotes": ["error", "double"],
1305
- "vue/html-self-closing": [
1306
- "error",
1307
- {
1308
- html: {
1309
- component: "always",
1310
- normal: "always",
1311
- void: "any"
1312
- },
1313
- math: "always",
1314
- svg: "always"
1315
- }
1316
- ],
1321
+ // ],
1317
1322
  "vue/max-attributes-per-line": "off",
1318
1323
  "vue/multi-word-component-names": "off",
1324
+ // 'vue/next-tick-style': ['warn', 'promise'],
1319
1325
  "vue/no-constant-condition": "warn",
1320
1326
  "vue/no-dupe-keys": "off",
1327
+ "vue/no-duplicate-attr-inheritance": "warn",
1321
1328
  "vue/no-empty-pattern": "error",
1322
1329
  "vue/no-extra-parens": ["error", "functions"],
1323
1330
  "vue/no-irregular-whitespace": "error",
1324
1331
  "vue/no-loss-of-precision": "error",
1332
+ "vue/no-required-prop-with-default": "warn",
1325
1333
  "vue/no-restricted-syntax": [
1326
1334
  "error",
1327
1335
  "DebuggerStatement",
@@ -1331,9 +1339,14 @@ async function vue(options = {}) {
1331
1339
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
1332
1340
  "vue/no-setup-props-reactivity-loss": "off",
1333
1341
  "vue/no-sparse-arrays": "error",
1342
+ "vue/no-unsupported-features": "warn",
1343
+ "vue/no-unused-emit-declarations": "warn",
1334
1344
  "vue/no-unused-refs": "error",
1345
+ "vue/no-use-v-else-with-v-for": "error",
1346
+ "vue/no-useless-mustaches": "warn",
1335
1347
  "vue/no-useless-v-bind": "error",
1336
1348
  "vue/no-v-html": "off",
1349
+ "vue/no-v-text": "warn",
1337
1350
  "vue/object-shorthand": [
1338
1351
  "error",
1339
1352
  "always",
@@ -1342,10 +1355,21 @@ async function vue(options = {}) {
1342
1355
  ignoreConstructors: false
1343
1356
  }
1344
1357
  ],
1358
+ "vue/prefer-define-options": "warn",
1345
1359
  "vue/prefer-separate-static-class": "error",
1346
1360
  "vue/prefer-template": "error",
1347
1361
  "vue/prop-name-casing": ["error", "camelCase"],
1348
1362
  "vue/require-default-prop": "off",
1363
+ "vue/require-macro-variable-name": [
1364
+ "warn",
1365
+ {
1366
+ defineEmits: "emit",
1367
+ defineProps: "props",
1368
+ defineSlots: "slots",
1369
+ useAttrs: "attrs",
1370
+ useSlots: "slots"
1371
+ }
1372
+ ],
1349
1373
  "vue/require-prop-types": "off",
1350
1374
  "vue/space-infix-ops": "error",
1351
1375
  "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
@@ -1369,6 +1393,7 @@ async function vue(options = {}) {
1369
1393
  "vue/comma-dangle": ["error", "always-multiline"],
1370
1394
  "vue/comma-spacing": ["error", { after: true, before: false }],
1371
1395
  "vue/comma-style": ["error", "last"],
1396
+ "vue/html-comment-content-newline": "warn",
1372
1397
  "vue/html-comment-content-spacing": [
1373
1398
  "error",
1374
1399
  "always",
package/dist/index.d.cts CHANGED
@@ -20,6 +20,11 @@ interface RuleOptions {
20
20
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
21
21
  */
22
22
  'antfu/consistent-list-newline'?: Linter.RuleEntry<AntfuConsistentListNewline>
23
+ /**
24
+ * Enforce Anthony's style of curly bracket
25
+ * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.test.ts
26
+ */
27
+ 'antfu/curly'?: Linter.RuleEntry<[]>
23
28
  /**
24
29
  * Newline after if
25
30
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
@@ -377,42 +382,42 @@ interface RuleOptions {
377
382
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
378
383
  /**
379
384
  * Enforce or ban the use of inline type-only markers for named imports.
380
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/consistent-type-specifier-style.md
385
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/consistent-type-specifier-style.md
381
386
  */
382
387
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
383
388
  /**
384
389
  * Ensure a default export is present, given a default import.
385
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/default.md
390
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/default.md
386
391
  */
387
392
  'import/default'?: Linter.RuleEntry<[]>
388
393
  /**
389
394
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
390
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/dynamic-import-chunkname.md
395
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/dynamic-import-chunkname.md
391
396
  */
392
397
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
393
398
  /**
394
399
  * Forbid any invalid exports, i.e. re-export of the same name.
395
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/export.md
400
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/export.md
396
401
  */
397
402
  'import/export'?: Linter.RuleEntry<[]>
398
403
  /**
399
404
  * Ensure all exports appear after other statements.
400
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/exports-last.md
405
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/exports-last.md
401
406
  */
402
407
  'import/exports-last'?: Linter.RuleEntry<[]>
403
408
  /**
404
409
  * Ensure consistent use of file extension within the import path.
405
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/extensions.md
410
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/extensions.md
406
411
  */
407
412
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
408
413
  /**
409
414
  * Ensure all imports appear before other statements.
410
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/first.md
415
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/first.md
411
416
  */
412
417
  'import/first'?: Linter.RuleEntry<ImportFirst>
413
418
  /**
414
419
  * Prefer named exports to be grouped together in a single export declaration.
415
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/group-exports.md
420
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/group-exports.md
416
421
  */
417
422
  'import/group-exports'?: Linter.RuleEntry<[]>
418
423
  /**
@@ -423,182 +428,182 @@ interface RuleOptions {
423
428
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
424
429
  /**
425
430
  * Enforce the maximum number of dependencies a module can have.
426
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/max-dependencies.md
431
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/max-dependencies.md
427
432
  */
428
433
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
429
434
  /**
430
435
  * Ensure named imports correspond to a named export in the remote file.
431
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/named.md
436
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/named.md
432
437
  */
433
438
  'import/named'?: Linter.RuleEntry<ImportNamed>
434
439
  /**
435
440
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
436
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/namespace.md
441
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/namespace.md
437
442
  */
438
443
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
439
444
  /**
440
445
  * Enforce a newline after import statements.
441
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/newline-after-import.md
446
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/newline-after-import.md
442
447
  */
443
448
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
444
449
  /**
445
450
  * Forbid import of modules using absolute paths.
446
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-absolute-path.md
451
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-absolute-path.md
447
452
  */
448
453
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
449
454
  /**
450
455
  * Forbid AMD `require` and `define` calls.
451
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-amd.md
456
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-amd.md
452
457
  */
453
458
  'import/no-amd'?: Linter.RuleEntry<[]>
454
459
  /**
455
460
  * Forbid anonymous values as default exports.
456
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-anonymous-default-export.md
461
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-anonymous-default-export.md
457
462
  */
458
463
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
459
464
  /**
460
465
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
461
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-commonjs.md
466
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-commonjs.md
462
467
  */
463
468
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
464
469
  /**
465
470
  * Forbid a module from importing a module with a dependency path back to itself.
466
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-cycle.md
471
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-cycle.md
467
472
  */
468
473
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
469
474
  /**
470
475
  * Forbid default exports.
471
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-default-export.md
476
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-default-export.md
472
477
  */
473
478
  'import/no-default-export'?: Linter.RuleEntry<[]>
474
479
  /**
475
480
  * Forbid imported names marked with `@deprecated` documentation tag.
476
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-deprecated.md
481
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-deprecated.md
477
482
  */
478
483
  'import/no-deprecated'?: Linter.RuleEntry<[]>
479
484
  /**
480
485
  * Forbid repeated import of the same module in multiple places.
481
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-duplicates.md
486
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-duplicates.md
482
487
  */
483
488
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
484
489
  /**
485
490
  * Forbid `require()` calls with expressions.
486
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-dynamic-require.md
491
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-dynamic-require.md
487
492
  */
488
493
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
489
494
  /**
490
495
  * Forbid empty named import blocks.
491
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-empty-named-blocks.md
496
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-empty-named-blocks.md
492
497
  */
493
498
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
494
499
  /**
495
500
  * Forbid the use of extraneous packages.
496
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-extraneous-dependencies.md
501
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-extraneous-dependencies.md
497
502
  */
498
503
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
499
504
  /**
500
505
  * Forbid import statements with CommonJS module.exports.
501
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-import-module-exports.md
506
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-import-module-exports.md
502
507
  */
503
508
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
504
509
  /**
505
510
  * Forbid importing the submodules of other modules.
506
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-internal-modules.md
511
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-internal-modules.md
507
512
  */
508
513
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
509
514
  /**
510
515
  * Forbid the use of mutable exports with `var` or `let`.
511
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-mutable-exports.md
516
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-mutable-exports.md
512
517
  */
513
518
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
514
519
  /**
515
520
  * Forbid use of exported name as identifier of default export.
516
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default.md
521
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default.md
517
522
  */
518
523
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
519
524
  /**
520
525
  * Forbid use of exported name as property of default export.
521
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default-member.md
526
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default-member.md
522
527
  */
523
528
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
524
529
  /**
525
530
  * Forbid named default exports.
526
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-default.md
531
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-default.md
527
532
  */
528
533
  'import/no-named-default'?: Linter.RuleEntry<[]>
529
534
  /**
530
535
  * Forbid named exports.
531
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-export.md
536
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-export.md
532
537
  */
533
538
  'import/no-named-export'?: Linter.RuleEntry<[]>
534
539
  /**
535
540
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
536
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-namespace.md
541
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-namespace.md
537
542
  */
538
543
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
539
544
  /**
540
545
  * Forbid Node.js builtin modules.
541
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-nodejs-modules.md
546
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-nodejs-modules.md
542
547
  */
543
548
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
544
549
  /**
545
550
  * Forbid importing packages through relative paths.
546
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-packages.md
551
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-packages.md
547
552
  */
548
553
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
549
554
  /**
550
555
  * Forbid importing modules from parent directories.
551
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-parent-imports.md
556
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-parent-imports.md
552
557
  */
553
558
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
554
559
  /**
555
560
  * Enforce which files can be imported in a given folder.
556
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-restricted-paths.md
561
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-restricted-paths.md
557
562
  */
558
563
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
559
564
  /**
560
565
  * Forbid a module from importing itself.
561
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-self-import.md
566
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-self-import.md
562
567
  */
563
568
  'import/no-self-import'?: Linter.RuleEntry<[]>
564
569
  /**
565
570
  * Forbid unassigned imports.
566
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unassigned-import.md
571
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unassigned-import.md
567
572
  */
568
573
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
569
574
  /**
570
575
  * Ensure imports point to a file/module that can be resolved.
571
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unresolved.md
576
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unresolved.md
572
577
  */
573
578
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
574
579
  /**
575
580
  * Forbid modules without exports, or exports without matching import in another module.
576
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unused-modules.md
581
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unused-modules.md
577
582
  */
578
583
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
579
584
  /**
580
585
  * Forbid unnecessary path segments in import and require statements.
581
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-useless-path-segments.md
586
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-useless-path-segments.md
582
587
  */
583
588
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
584
589
  /**
585
590
  * Forbid webpack loader syntax in imports.
586
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-webpack-loader-syntax.md
591
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-webpack-loader-syntax.md
587
592
  */
588
593
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
589
594
  /**
590
595
  * Enforce a convention in module import order.
591
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/order.md
596
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/order.md
592
597
  */
593
598
  'import/order'?: Linter.RuleEntry<ImportOrder>
594
599
  /**
595
600
  * Prefer a default export if module exports a single name or multiple names.
596
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/prefer-default-export.md
601
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/prefer-default-export.md
597
602
  */
598
603
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
599
604
  /**
600
605
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
601
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/unambiguous.md
606
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/unambiguous.md
602
607
  */
603
608
  'import/unambiguous'?: Linter.RuleEntry<[]>
604
609
  /**
@@ -5009,6 +5014,7 @@ interface RuleOptions {
5009
5014
  /**
5010
5015
  * Enforce using `@ts-expect-error` over `@ts-ignore`
5011
5016
  * @see https://typescript-eslint.io/rules/prefer-ts-expect-error
5017
+ * @deprecated
5012
5018
  */
5013
5019
  'ts/prefer-ts-expect-error'?: Linter.RuleEntry<[]>
5014
5020
  /**
@@ -7114,6 +7120,8 @@ type AntfuConsistentListNewline = []|[{
7114
7120
  ObjectPattern?: boolean
7115
7121
  ArrayPattern?: boolean
7116
7122
  JSXOpeningElement?: boolean
7123
+ JSONArrayExpression?: boolean
7124
+ JSONObjectExpression?: boolean
7117
7125
  }]
7118
7126
  // ----- antfu/indent-unindent -----
7119
7127
  type AntfuIndentUnindent = []|[{
@@ -14781,6 +14789,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
14781
14789
  'svelte/valid-prop-names-in-kit-pages'?: eslint.Linter.RuleEntry<[]> | undefined;
14782
14790
  'accessor-pairs'?: eslint.Linter.RuleEntry<undefined> | undefined;
14783
14791
  'antfu/consistent-list-newline'?: eslint.Linter.RuleEntry<undefined> | undefined;
14792
+ 'antfu/curly'?: eslint.Linter.RuleEntry<[]> | undefined;
14784
14793
  'antfu/if-newline'?: eslint.Linter.RuleEntry<[]> | undefined;
14785
14794
  'antfu/import-dedupe'?: eslint.Linter.RuleEntry<[]> | undefined;
14786
14795
  'antfu/indent-unindent'?: eslint.Linter.RuleEntry<undefined> | undefined;
package/dist/index.d.ts CHANGED
@@ -20,6 +20,11 @@ interface RuleOptions {
20
20
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
21
21
  */
22
22
  'antfu/consistent-list-newline'?: Linter.RuleEntry<AntfuConsistentListNewline>
23
+ /**
24
+ * Enforce Anthony's style of curly bracket
25
+ * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.test.ts
26
+ */
27
+ 'antfu/curly'?: Linter.RuleEntry<[]>
23
28
  /**
24
29
  * Newline after if
25
30
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
@@ -377,42 +382,42 @@ interface RuleOptions {
377
382
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
378
383
  /**
379
384
  * Enforce or ban the use of inline type-only markers for named imports.
380
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/consistent-type-specifier-style.md
385
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/consistent-type-specifier-style.md
381
386
  */
382
387
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
383
388
  /**
384
389
  * Ensure a default export is present, given a default import.
385
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/default.md
390
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/default.md
386
391
  */
387
392
  'import/default'?: Linter.RuleEntry<[]>
388
393
  /**
389
394
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
390
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/dynamic-import-chunkname.md
395
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/dynamic-import-chunkname.md
391
396
  */
392
397
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
393
398
  /**
394
399
  * Forbid any invalid exports, i.e. re-export of the same name.
395
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/export.md
400
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/export.md
396
401
  */
397
402
  'import/export'?: Linter.RuleEntry<[]>
398
403
  /**
399
404
  * Ensure all exports appear after other statements.
400
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/exports-last.md
405
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/exports-last.md
401
406
  */
402
407
  'import/exports-last'?: Linter.RuleEntry<[]>
403
408
  /**
404
409
  * Ensure consistent use of file extension within the import path.
405
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/extensions.md
410
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/extensions.md
406
411
  */
407
412
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
408
413
  /**
409
414
  * Ensure all imports appear before other statements.
410
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/first.md
415
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/first.md
411
416
  */
412
417
  'import/first'?: Linter.RuleEntry<ImportFirst>
413
418
  /**
414
419
  * Prefer named exports to be grouped together in a single export declaration.
415
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/group-exports.md
420
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/group-exports.md
416
421
  */
417
422
  'import/group-exports'?: Linter.RuleEntry<[]>
418
423
  /**
@@ -423,182 +428,182 @@ interface RuleOptions {
423
428
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
424
429
  /**
425
430
  * Enforce the maximum number of dependencies a module can have.
426
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/max-dependencies.md
431
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/max-dependencies.md
427
432
  */
428
433
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
429
434
  /**
430
435
  * Ensure named imports correspond to a named export in the remote file.
431
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/named.md
436
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/named.md
432
437
  */
433
438
  'import/named'?: Linter.RuleEntry<ImportNamed>
434
439
  /**
435
440
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
436
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/namespace.md
441
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/namespace.md
437
442
  */
438
443
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
439
444
  /**
440
445
  * Enforce a newline after import statements.
441
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/newline-after-import.md
446
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/newline-after-import.md
442
447
  */
443
448
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
444
449
  /**
445
450
  * Forbid import of modules using absolute paths.
446
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-absolute-path.md
451
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-absolute-path.md
447
452
  */
448
453
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
449
454
  /**
450
455
  * Forbid AMD `require` and `define` calls.
451
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-amd.md
456
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-amd.md
452
457
  */
453
458
  'import/no-amd'?: Linter.RuleEntry<[]>
454
459
  /**
455
460
  * Forbid anonymous values as default exports.
456
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-anonymous-default-export.md
461
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-anonymous-default-export.md
457
462
  */
458
463
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
459
464
  /**
460
465
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
461
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-commonjs.md
466
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-commonjs.md
462
467
  */
463
468
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
464
469
  /**
465
470
  * Forbid a module from importing a module with a dependency path back to itself.
466
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-cycle.md
471
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-cycle.md
467
472
  */
468
473
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
469
474
  /**
470
475
  * Forbid default exports.
471
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-default-export.md
476
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-default-export.md
472
477
  */
473
478
  'import/no-default-export'?: Linter.RuleEntry<[]>
474
479
  /**
475
480
  * Forbid imported names marked with `@deprecated` documentation tag.
476
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-deprecated.md
481
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-deprecated.md
477
482
  */
478
483
  'import/no-deprecated'?: Linter.RuleEntry<[]>
479
484
  /**
480
485
  * Forbid repeated import of the same module in multiple places.
481
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-duplicates.md
486
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-duplicates.md
482
487
  */
483
488
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
484
489
  /**
485
490
  * Forbid `require()` calls with expressions.
486
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-dynamic-require.md
491
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-dynamic-require.md
487
492
  */
488
493
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
489
494
  /**
490
495
  * Forbid empty named import blocks.
491
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-empty-named-blocks.md
496
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-empty-named-blocks.md
492
497
  */
493
498
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
494
499
  /**
495
500
  * Forbid the use of extraneous packages.
496
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-extraneous-dependencies.md
501
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-extraneous-dependencies.md
497
502
  */
498
503
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
499
504
  /**
500
505
  * Forbid import statements with CommonJS module.exports.
501
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-import-module-exports.md
506
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-import-module-exports.md
502
507
  */
503
508
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
504
509
  /**
505
510
  * Forbid importing the submodules of other modules.
506
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-internal-modules.md
511
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-internal-modules.md
507
512
  */
508
513
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
509
514
  /**
510
515
  * Forbid the use of mutable exports with `var` or `let`.
511
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-mutable-exports.md
516
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-mutable-exports.md
512
517
  */
513
518
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
514
519
  /**
515
520
  * Forbid use of exported name as identifier of default export.
516
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default.md
521
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default.md
517
522
  */
518
523
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
519
524
  /**
520
525
  * Forbid use of exported name as property of default export.
521
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default-member.md
526
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default-member.md
522
527
  */
523
528
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
524
529
  /**
525
530
  * Forbid named default exports.
526
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-default.md
531
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-default.md
527
532
  */
528
533
  'import/no-named-default'?: Linter.RuleEntry<[]>
529
534
  /**
530
535
  * Forbid named exports.
531
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-export.md
536
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-export.md
532
537
  */
533
538
  'import/no-named-export'?: Linter.RuleEntry<[]>
534
539
  /**
535
540
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
536
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-namespace.md
541
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-namespace.md
537
542
  */
538
543
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
539
544
  /**
540
545
  * Forbid Node.js builtin modules.
541
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-nodejs-modules.md
546
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-nodejs-modules.md
542
547
  */
543
548
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
544
549
  /**
545
550
  * Forbid importing packages through relative paths.
546
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-packages.md
551
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-packages.md
547
552
  */
548
553
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
549
554
  /**
550
555
  * Forbid importing modules from parent directories.
551
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-parent-imports.md
556
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-parent-imports.md
552
557
  */
553
558
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
554
559
  /**
555
560
  * Enforce which files can be imported in a given folder.
556
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-restricted-paths.md
561
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-restricted-paths.md
557
562
  */
558
563
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
559
564
  /**
560
565
  * Forbid a module from importing itself.
561
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-self-import.md
566
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-self-import.md
562
567
  */
563
568
  'import/no-self-import'?: Linter.RuleEntry<[]>
564
569
  /**
565
570
  * Forbid unassigned imports.
566
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unassigned-import.md
571
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unassigned-import.md
567
572
  */
568
573
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
569
574
  /**
570
575
  * Ensure imports point to a file/module that can be resolved.
571
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unresolved.md
576
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unresolved.md
572
577
  */
573
578
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
574
579
  /**
575
580
  * Forbid modules without exports, or exports without matching import in another module.
576
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unused-modules.md
581
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unused-modules.md
577
582
  */
578
583
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
579
584
  /**
580
585
  * Forbid unnecessary path segments in import and require statements.
581
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-useless-path-segments.md
586
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-useless-path-segments.md
582
587
  */
583
588
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
584
589
  /**
585
590
  * Forbid webpack loader syntax in imports.
586
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-webpack-loader-syntax.md
591
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-webpack-loader-syntax.md
587
592
  */
588
593
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
589
594
  /**
590
595
  * Enforce a convention in module import order.
591
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/order.md
596
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/order.md
592
597
  */
593
598
  'import/order'?: Linter.RuleEntry<ImportOrder>
594
599
  /**
595
600
  * Prefer a default export if module exports a single name or multiple names.
596
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/prefer-default-export.md
601
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/prefer-default-export.md
597
602
  */
598
603
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
599
604
  /**
600
605
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
601
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/unambiguous.md
606
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/unambiguous.md
602
607
  */
603
608
  'import/unambiguous'?: Linter.RuleEntry<[]>
604
609
  /**
@@ -5009,6 +5014,7 @@ interface RuleOptions {
5009
5014
  /**
5010
5015
  * Enforce using `@ts-expect-error` over `@ts-ignore`
5011
5016
  * @see https://typescript-eslint.io/rules/prefer-ts-expect-error
5017
+ * @deprecated
5012
5018
  */
5013
5019
  'ts/prefer-ts-expect-error'?: Linter.RuleEntry<[]>
5014
5020
  /**
@@ -7114,6 +7120,8 @@ type AntfuConsistentListNewline = []|[{
7114
7120
  ObjectPattern?: boolean
7115
7121
  ArrayPattern?: boolean
7116
7122
  JSXOpeningElement?: boolean
7123
+ JSONArrayExpression?: boolean
7124
+ JSONObjectExpression?: boolean
7117
7125
  }]
7118
7126
  // ----- antfu/indent-unindent -----
7119
7127
  type AntfuIndentUnindent = []|[{
@@ -14781,6 +14789,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
14781
14789
  'svelte/valid-prop-names-in-kit-pages'?: eslint.Linter.RuleEntry<[]> | undefined;
14782
14790
  'accessor-pairs'?: eslint.Linter.RuleEntry<undefined> | undefined;
14783
14791
  'antfu/consistent-list-newline'?: eslint.Linter.RuleEntry<undefined> | undefined;
14792
+ 'antfu/curly'?: eslint.Linter.RuleEntry<[]> | undefined;
14784
14793
  'antfu/if-newline'?: eslint.Linter.RuleEntry<[]> | undefined;
14785
14794
  'antfu/import-dedupe'?: eslint.Linter.RuleEntry<[]> | undefined;
14786
14795
  'antfu/indent-unindent'?: eslint.Linter.RuleEntry<undefined> | undefined;
package/dist/index.js CHANGED
@@ -243,9 +243,9 @@ async function javascript(options = {}) {
243
243
  "no-new": "error",
244
244
  "no-new-func": "error",
245
245
  "no-new-native-nonconstructor": "error",
246
- "no-new-object": "error",
247
246
  "no-new-wrappers": "error",
248
247
  "no-obj-calls": "error",
248
+ "no-object-constructor": "error",
249
249
  "no-octal": "error",
250
250
  "no-octal-escape": "error",
251
251
  "no-proto": "error",
@@ -911,9 +911,9 @@ async function stylistic(options = {}) {
911
911
  rules: {
912
912
  ...config.rules,
913
913
  "antfu/consistent-list-newline": "error",
914
+ "antfu/curly": "error",
914
915
  "antfu/if-newline": "warn",
915
916
  "antfu/top-level-function": "warn",
916
- "curly": ["error", "multi-or-nest", "consistent"],
917
917
  ...overrides
918
918
  }
919
919
  }
@@ -1238,9 +1238,13 @@ async function vue(options = {}) {
1238
1238
  order: isVue3 ? ["script", "template", "style"] : ["template", "script", "style"]
1239
1239
  }
1240
1240
  ],
1241
+ // 'vue/component-api-style': ['warn', ['script-setup', 'composition']],
1241
1242
  "vue/component-name-in-template-casing": ["error", "PascalCase"],
1242
1243
  "vue/component-options-name-casing": ["error", "PascalCase"],
1244
+ // this is deprecated
1245
+ "vue/component-tags-order": "off",
1243
1246
  "vue/custom-event-name-casing": ["error", "camelCase"],
1247
+ // 'vue/define-emits-declaration': ['warn', 'type-based'],
1244
1248
  "vue/define-macros-order": [
1245
1249
  "error",
1246
1250
  {
@@ -1252,31 +1256,35 @@ async function vue(options = {}) {
1252
1256
  ]
1253
1257
  }
1254
1258
  ],
1259
+ // 'vue/define-props-declaration': ['warn', 'type-based'],
1255
1260
  "vue/dot-location": ["error", "property"],
1256
1261
  "vue/dot-notation": ["error", { allowKeywords: true }],
1257
1262
  "vue/eqeqeq": ["error", "smart"],
1258
1263
  "vue/html-indent": ["error", indent],
1264
+ // 'vue/html-self-closing': [
1265
+ // 'error',
1266
+ // {
1267
+ // html: {
1268
+ // component: 'always',
1269
+ // normal: 'always',
1270
+ // void: 'any',
1271
+ // },
1272
+ // math: 'always',
1273
+ // svg: 'always',
1274
+ // },
1259
1275
  "vue/html-quotes": ["error", "double"],
1260
- "vue/html-self-closing": [
1261
- "error",
1262
- {
1263
- html: {
1264
- component: "always",
1265
- normal: "always",
1266
- void: "any"
1267
- },
1268
- math: "always",
1269
- svg: "always"
1270
- }
1271
- ],
1276
+ // ],
1272
1277
  "vue/max-attributes-per-line": "off",
1273
1278
  "vue/multi-word-component-names": "off",
1279
+ // 'vue/next-tick-style': ['warn', 'promise'],
1274
1280
  "vue/no-constant-condition": "warn",
1275
1281
  "vue/no-dupe-keys": "off",
1282
+ "vue/no-duplicate-attr-inheritance": "warn",
1276
1283
  "vue/no-empty-pattern": "error",
1277
1284
  "vue/no-extra-parens": ["error", "functions"],
1278
1285
  "vue/no-irregular-whitespace": "error",
1279
1286
  "vue/no-loss-of-precision": "error",
1287
+ "vue/no-required-prop-with-default": "warn",
1280
1288
  "vue/no-restricted-syntax": [
1281
1289
  "error",
1282
1290
  "DebuggerStatement",
@@ -1286,9 +1294,14 @@ async function vue(options = {}) {
1286
1294
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
1287
1295
  "vue/no-setup-props-reactivity-loss": "off",
1288
1296
  "vue/no-sparse-arrays": "error",
1297
+ "vue/no-unsupported-features": "warn",
1298
+ "vue/no-unused-emit-declarations": "warn",
1289
1299
  "vue/no-unused-refs": "error",
1300
+ "vue/no-use-v-else-with-v-for": "error",
1301
+ "vue/no-useless-mustaches": "warn",
1290
1302
  "vue/no-useless-v-bind": "error",
1291
1303
  "vue/no-v-html": "off",
1304
+ "vue/no-v-text": "warn",
1292
1305
  "vue/object-shorthand": [
1293
1306
  "error",
1294
1307
  "always",
@@ -1297,10 +1310,21 @@ async function vue(options = {}) {
1297
1310
  ignoreConstructors: false
1298
1311
  }
1299
1312
  ],
1313
+ "vue/prefer-define-options": "warn",
1300
1314
  "vue/prefer-separate-static-class": "error",
1301
1315
  "vue/prefer-template": "error",
1302
1316
  "vue/prop-name-casing": ["error", "camelCase"],
1303
1317
  "vue/require-default-prop": "off",
1318
+ "vue/require-macro-variable-name": [
1319
+ "warn",
1320
+ {
1321
+ defineEmits: "emit",
1322
+ defineProps: "props",
1323
+ defineSlots: "slots",
1324
+ useAttrs: "attrs",
1325
+ useSlots: "slots"
1326
+ }
1327
+ ],
1304
1328
  "vue/require-prop-types": "off",
1305
1329
  "vue/space-infix-ops": "error",
1306
1330
  "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
@@ -1324,6 +1348,7 @@ async function vue(options = {}) {
1324
1348
  "vue/comma-dangle": ["error", "always-multiline"],
1325
1349
  "vue/comma-spacing": ["error", { after: true, before: false }],
1326
1350
  "vue/comma-style": ["error", "last"],
1351
+ "vue/html-comment-content-newline": "warn",
1327
1352
  "vue/html-comment-content-spacing": [
1328
1353
  "error",
1329
1354
  "always",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderwyd/eslint-config",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.5.3",
5
5
  "description": "Donny's ESLint config",
6
6
  "author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
7
7
  "license": "MIT",
@@ -71,17 +71,17 @@
71
71
  "@antfu/install-pkg": "^0.3.3",
72
72
  "@stylistic/eslint-plugin": "^2.1.0",
73
73
  "@toml-tools/parser": "^1.0.0",
74
- "@typescript-eslint/eslint-plugin": "^7.10.0",
75
- "@typescript-eslint/parser": "^7.10.0",
74
+ "@typescript-eslint/eslint-plugin": "^7.11.0",
75
+ "@typescript-eslint/parser": "^7.11.0",
76
76
  "eslint-config-flat-gitignore": "^0.1.5",
77
77
  "eslint-merge-processors": "^0.1.0",
78
- "eslint-plugin-antfu": "^2.2.0",
78
+ "eslint-plugin-antfu": "^2.3.3",
79
79
  "eslint-plugin-command": "^0.2.3",
80
80
  "eslint-plugin-eslint-comments": "^3.2.0",
81
81
  "eslint-plugin-format": "^0.1.1",
82
- "eslint-plugin-import-x": "^0.5.0",
83
- "eslint-plugin-jsdoc": "^48.2.5",
84
- "eslint-plugin-jsonc": "^2.15.1",
82
+ "eslint-plugin-import-x": "^0.5.1",
83
+ "eslint-plugin-jsdoc": "^48.2.6",
84
+ "eslint-plugin-jsonc": "^2.16.0",
85
85
  "eslint-plugin-n": "^17.7.0",
86
86
  "eslint-plugin-no-only-tests": "^3.1.0",
87
87
  "eslint-plugin-perfectionist": "^2.10.0",
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "devDependencies": {
106
106
  "@antfu/ni": "^0.21.12",
107
- "@eslint-react/eslint-plugin": "^1.5.12",
107
+ "@eslint-react/eslint-plugin": "^1.5.13",
108
108
  "@eslint/config-inspector": "^0.4.8",
109
109
  "@stylistic/eslint-plugin-migrate": "^2.1.0",
110
110
  "@types/eslint": "^8.56.10",
@@ -115,21 +115,20 @@
115
115
  "@unocss/eslint-plugin": "^0.60.3",
116
116
  "bumpp": "^9.4.1",
117
117
  "eslint": "^9.3.0",
118
- "eslint-plugin-react": "^7.34.1",
119
118
  "eslint-plugin-react-hooks": "^4.6.2",
120
119
  "eslint-plugin-react-refresh": "^0.4.7",
121
120
  "eslint-plugin-svelte": "2.39.0",
122
- "eslint-plugin-tailwindcss": "^3.16.0",
121
+ "eslint-plugin-tailwindcss": "^3.17.0",
123
122
  "execa": "^9.1.0",
124
123
  "fast-glob": "^3.3.2",
125
124
  "fs-extra": "^11.2.0",
126
- "lint-staged": "^15.2.4",
125
+ "lint-staged": "^15.2.5",
127
126
  "rimraf": "^5.0.7",
128
127
  "simple-git-hooks": "^2.11.1",
129
128
  "svelte": "^4.2.17",
130
129
  "svelte-eslint-parser": "^0.36.0",
131
130
  "tsup": "^8.0.2",
132
- "tsx": "^4.10.5",
131
+ "tsx": "^4.11.0",
133
132
  "typescript": "^5.4.5"
134
133
  },
135
134
  "simple-git-hooks": {