@lincy/eslint-config 4.6.0 → 4.6.1

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 CHANGED
@@ -204,6 +204,12 @@ export default lincy({
204
204
  * @example 可选: false | { files?: string[] }
205
205
  */
206
206
  markdown: false,
207
+ /**
208
+ * 是否启用 regexp 规则
209
+ * @default 默认值: true,
210
+ * @example 可选: false | { level?: 'error' | 'warn' }
211
+ */
212
+ regexp: true,
207
213
  /**
208
214
  * 是否启用 formatters 规则
209
215
  * @default 默认值: false,
@@ -249,6 +255,9 @@ export default lincy({
249
255
  },
250
256
  unocss: {
251
257
  // unocss 规则
258
+ },
259
+ regexp: {
260
+ // regexp 规则
252
261
  }
253
262
  },
254
263
 
@@ -321,6 +330,7 @@ import {
321
330
  node,
322
331
  perfectionist,
323
332
  react,
333
+ regexp,
324
334
  sortPackageJson,
325
335
  sortTsconfig,
326
336
  stylistic,
@@ -350,6 +360,7 @@ export default combine(
350
360
  yaml(),
351
361
  toml(),
352
362
  markdown(),
363
+ regexp(),
353
364
  )
354
365
  ```
355
366
 
@@ -397,6 +408,7 @@ export default lincy(
397
408
  jsonc: true,
398
409
  yaml: true,
399
410
  markdown: true,
411
+ regexp: true,
400
412
  overrides: {}
401
413
  },
402
414
  {
@@ -450,6 +462,7 @@ export default lincy({
450
462
  jsonc: {},
451
463
  markdown: {},
452
464
  test: {},
465
+ regexp: {},
453
466
 
454
467
  // 追加自定义排除文件(夹)
455
468
  ignores: [
package/dist/index.cjs CHANGED
@@ -796,9 +796,9 @@ async function stylistic(options = {}) {
796
796
  ...lessOpinionated ? {
797
797
  curly: ["error", "all"]
798
798
  } : {
799
+ "antfu/curly": "error",
799
800
  "antfu/if-newline": "error",
800
- "antfu/top-level-function": "error",
801
- "curly": ["error", "multi-or-nest", "consistent"]
801
+ "antfu/top-level-function": "error"
802
802
  },
803
803
  // 覆盖`stylistic`默认规则
804
804
  "style/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
package/dist/index.d.cts CHANGED
@@ -119,6 +119,11 @@ interface RuleOptions {
119
119
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
120
120
  */
121
121
  'antfu/consistent-list-newline'?: Linter.RuleEntry<AntfuConsistentListNewline>
122
+ /**
123
+ * Enforce Anthony's style of curly bracket
124
+ * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.test.ts
125
+ */
126
+ 'antfu/curly'?: Linter.RuleEntry<[]>
122
127
  /**
123
128
  * Newline after if
124
129
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
@@ -471,42 +476,42 @@ interface RuleOptions {
471
476
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
472
477
  /**
473
478
  * Enforce or ban the use of inline type-only markers for named imports.
474
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/consistent-type-specifier-style.md
479
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/consistent-type-specifier-style.md
475
480
  */
476
481
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
477
482
  /**
478
483
  * Ensure a default export is present, given a default import.
479
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/default.md
484
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/default.md
480
485
  */
481
486
  'import/default'?: Linter.RuleEntry<[]>
482
487
  /**
483
488
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
484
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/dynamic-import-chunkname.md
489
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/dynamic-import-chunkname.md
485
490
  */
486
491
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
487
492
  /**
488
493
  * Forbid any invalid exports, i.e. re-export of the same name.
489
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/export.md
494
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/export.md
490
495
  */
491
496
  'import/export'?: Linter.RuleEntry<[]>
492
497
  /**
493
498
  * Ensure all exports appear after other statements.
494
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/exports-last.md
499
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/exports-last.md
495
500
  */
496
501
  'import/exports-last'?: Linter.RuleEntry<[]>
497
502
  /**
498
503
  * Ensure consistent use of file extension within the import path.
499
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/extensions.md
504
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/extensions.md
500
505
  */
501
506
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
502
507
  /**
503
508
  * Ensure all imports appear before other statements.
504
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/first.md
509
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/first.md
505
510
  */
506
511
  'import/first'?: Linter.RuleEntry<ImportFirst>
507
512
  /**
508
513
  * Prefer named exports to be grouped together in a single export declaration.
509
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/group-exports.md
514
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/group-exports.md
510
515
  */
511
516
  'import/group-exports'?: Linter.RuleEntry<[]>
512
517
  /**
@@ -517,182 +522,182 @@ interface RuleOptions {
517
522
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
518
523
  /**
519
524
  * Enforce the maximum number of dependencies a module can have.
520
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/max-dependencies.md
525
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/max-dependencies.md
521
526
  */
522
527
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
523
528
  /**
524
529
  * Ensure named imports correspond to a named export in the remote file.
525
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/named.md
530
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/named.md
526
531
  */
527
532
  'import/named'?: Linter.RuleEntry<ImportNamed>
528
533
  /**
529
534
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
530
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/namespace.md
535
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/namespace.md
531
536
  */
532
537
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
533
538
  /**
534
539
  * Enforce a newline after import statements.
535
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/newline-after-import.md
540
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/newline-after-import.md
536
541
  */
537
542
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
538
543
  /**
539
544
  * Forbid import of modules using absolute paths.
540
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-absolute-path.md
545
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-absolute-path.md
541
546
  */
542
547
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
543
548
  /**
544
549
  * Forbid AMD `require` and `define` calls.
545
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-amd.md
550
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-amd.md
546
551
  */
547
552
  'import/no-amd'?: Linter.RuleEntry<[]>
548
553
  /**
549
554
  * Forbid anonymous values as default exports.
550
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-anonymous-default-export.md
555
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-anonymous-default-export.md
551
556
  */
552
557
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
553
558
  /**
554
559
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
555
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-commonjs.md
560
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-commonjs.md
556
561
  */
557
562
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
558
563
  /**
559
564
  * Forbid a module from importing a module with a dependency path back to itself.
560
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-cycle.md
565
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-cycle.md
561
566
  */
562
567
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
563
568
  /**
564
569
  * Forbid default exports.
565
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-default-export.md
570
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-default-export.md
566
571
  */
567
572
  'import/no-default-export'?: Linter.RuleEntry<[]>
568
573
  /**
569
574
  * Forbid imported names marked with `@deprecated` documentation tag.
570
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-deprecated.md
575
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-deprecated.md
571
576
  */
572
577
  'import/no-deprecated'?: Linter.RuleEntry<[]>
573
578
  /**
574
579
  * Forbid repeated import of the same module in multiple places.
575
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-duplicates.md
580
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-duplicates.md
576
581
  */
577
582
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
578
583
  /**
579
584
  * Forbid `require()` calls with expressions.
580
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-dynamic-require.md
585
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-dynamic-require.md
581
586
  */
582
587
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
583
588
  /**
584
589
  * Forbid empty named import blocks.
585
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-empty-named-blocks.md
590
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-empty-named-blocks.md
586
591
  */
587
592
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
588
593
  /**
589
594
  * Forbid the use of extraneous packages.
590
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-extraneous-dependencies.md
595
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-extraneous-dependencies.md
591
596
  */
592
597
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
593
598
  /**
594
599
  * Forbid import statements with CommonJS module.exports.
595
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-import-module-exports.md
600
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-import-module-exports.md
596
601
  */
597
602
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
598
603
  /**
599
604
  * Forbid importing the submodules of other modules.
600
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-internal-modules.md
605
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-internal-modules.md
601
606
  */
602
607
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
603
608
  /**
604
609
  * Forbid the use of mutable exports with `var` or `let`.
605
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-mutable-exports.md
610
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-mutable-exports.md
606
611
  */
607
612
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
608
613
  /**
609
614
  * Forbid use of exported name as identifier of default export.
610
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default.md
615
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default.md
611
616
  */
612
617
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
613
618
  /**
614
619
  * Forbid use of exported name as property of default export.
615
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default-member.md
620
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default-member.md
616
621
  */
617
622
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
618
623
  /**
619
624
  * Forbid named default exports.
620
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-default.md
625
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-default.md
621
626
  */
622
627
  'import/no-named-default'?: Linter.RuleEntry<[]>
623
628
  /**
624
629
  * Forbid named exports.
625
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-export.md
630
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-export.md
626
631
  */
627
632
  'import/no-named-export'?: Linter.RuleEntry<[]>
628
633
  /**
629
634
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
630
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-namespace.md
635
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-namespace.md
631
636
  */
632
637
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
633
638
  /**
634
639
  * Forbid Node.js builtin modules.
635
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-nodejs-modules.md
640
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-nodejs-modules.md
636
641
  */
637
642
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
638
643
  /**
639
644
  * Forbid importing packages through relative paths.
640
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-packages.md
645
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-packages.md
641
646
  */
642
647
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
643
648
  /**
644
649
  * Forbid importing modules from parent directories.
645
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-parent-imports.md
650
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-parent-imports.md
646
651
  */
647
652
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
648
653
  /**
649
654
  * Enforce which files can be imported in a given folder.
650
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-restricted-paths.md
655
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-restricted-paths.md
651
656
  */
652
657
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
653
658
  /**
654
659
  * Forbid a module from importing itself.
655
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-self-import.md
660
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-self-import.md
656
661
  */
657
662
  'import/no-self-import'?: Linter.RuleEntry<[]>
658
663
  /**
659
664
  * Forbid unassigned imports.
660
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unassigned-import.md
665
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unassigned-import.md
661
666
  */
662
667
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
663
668
  /**
664
669
  * Ensure imports point to a file/module that can be resolved.
665
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unresolved.md
670
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unresolved.md
666
671
  */
667
672
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
668
673
  /**
669
674
  * Forbid modules without exports, or exports without matching import in another module.
670
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unused-modules.md
675
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unused-modules.md
671
676
  */
672
677
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
673
678
  /**
674
679
  * Forbid unnecessary path segments in import and require statements.
675
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-useless-path-segments.md
680
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-useless-path-segments.md
676
681
  */
677
682
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
678
683
  /**
679
684
  * Forbid webpack loader syntax in imports.
680
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-webpack-loader-syntax.md
685
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-webpack-loader-syntax.md
681
686
  */
682
687
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
683
688
  /**
684
689
  * Enforce a convention in module import order.
685
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/order.md
690
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/order.md
686
691
  */
687
692
  'import/order'?: Linter.RuleEntry<ImportOrder>
688
693
  /**
689
694
  * Prefer a default export if module exports a single name or multiple names.
690
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/prefer-default-export.md
695
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/prefer-default-export.md
691
696
  */
692
697
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
693
698
  /**
694
699
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
695
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/unambiguous.md
700
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/unambiguous.md
696
701
  */
697
702
  'import/unambiguous'?: Linter.RuleEntry<[]>
698
703
  /**
@@ -1216,6 +1221,7 @@ interface RuleOptions {
1216
1221
  /**
1217
1222
  * Enforce position of line comments
1218
1223
  * @see https://eslint.org/docs/latest/rules/line-comment-position
1224
+ * @deprecated
1219
1225
  */
1220
1226
  'line-comment-position'?: Linter.RuleEntry<LineCommentPosition>
1221
1227
  /**
@@ -1297,6 +1303,7 @@ interface RuleOptions {
1297
1303
  /**
1298
1304
  * Enforce a particular style for multiline comments
1299
1305
  * @see https://eslint.org/docs/latest/rules/multiline-comment-style
1306
+ * @deprecated
1300
1307
  */
1301
1308
  'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle>
1302
1309
  /**
@@ -1669,7 +1676,7 @@ interface RuleOptions {
1669
1676
  * Disallow characters which are made with multiple code points in character class syntax
1670
1677
  * @see https://eslint.org/docs/latest/rules/no-misleading-character-class
1671
1678
  */
1672
- 'no-misleading-character-class'?: Linter.RuleEntry<[]>
1679
+ 'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass>
1673
1680
  /**
1674
1681
  * Disallow mixed binary operators
1675
1682
  * @see https://eslint.org/docs/latest/rules/no-mixed-operators
@@ -5709,21 +5716,11 @@ interface RuleOptions {
5709
5716
  * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5710
5717
  */
5711
5718
  'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>
5712
- /**
5713
- * Disallow unused variables
5714
- * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5715
- */
5716
- 'unused-imports/no-unused-imports-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedImportsTs>
5717
5719
  /**
5718
5720
  * Disallow unused variables
5719
5721
  * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5720
5722
  */
5721
5723
  'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>
5722
- /**
5723
- * Disallow unused variables
5724
- * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5725
- */
5726
- 'unused-imports/no-unused-vars-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedVarsTs>
5727
5724
  /**
5728
5725
  * Require calls to `isNaN()` when checking for `NaN`
5729
5726
  * @see https://eslint.org/docs/latest/rules/use-isnan
@@ -7141,6 +7138,8 @@ type AntfuConsistentListNewline = []|[{
7141
7138
  ObjectPattern?: boolean
7142
7139
  ArrayPattern?: boolean
7143
7140
  JSXOpeningElement?: boolean
7141
+ JSONArrayExpression?: boolean
7142
+ JSONObjectExpression?: boolean
7144
7143
  }]
7145
7144
  // ----- antfu/indent-unindent -----
7146
7145
  type AntfuIndentUnindent = []|[{
@@ -7327,6 +7326,9 @@ type _FuncNamesValue = ("always" | "as-needed" | "never")
7327
7326
  // ----- func-style -----
7328
7327
  type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), {
7329
7328
  allowArrowFunctions?: boolean
7329
+ overrides?: {
7330
+ namedExports?: ("declaration" | "expression" | "ignore")
7331
+ }
7330
7332
  }]
7331
7333
  // ----- function-call-argument-newline -----
7332
7334
  type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
@@ -8936,9 +8938,11 @@ type NoExtendNative = []|[{
8936
8938
  exceptions?: string[]
8937
8939
  }]
8938
8940
  // ----- no-extra-boolean-cast -----
8939
- type NoExtraBooleanCast = []|[{
8941
+ type NoExtraBooleanCast = []|[({
8942
+ enforceForInnerExpressions?: boolean
8943
+ } | {
8940
8944
  enforceForLogicalOperands?: boolean
8941
- }]
8945
+ })]
8942
8946
  // ----- no-extra-parens -----
8943
8947
  type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
8944
8948
  conditionalAssign?: boolean
@@ -9012,6 +9016,10 @@ type NoMagicNumbers = []|[{
9012
9016
  ignoreDefaultValues?: boolean
9013
9017
  ignoreClassFieldInitialValues?: boolean
9014
9018
  }]
9019
+ // ----- no-misleading-character-class -----
9020
+ type NoMisleadingCharacterClass = []|[{
9021
+ allowEscape?: boolean
9022
+ }]
9015
9023
  // ----- no-mixed-operators -----
9016
9024
  type NoMixedOperators = []|[{
9017
9025
  groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][]
@@ -9068,8 +9076,10 @@ type NoRedeclare = []|[{
9068
9076
  // ----- no-restricted-exports -----
9069
9077
  type NoRestrictedExports = []|[({
9070
9078
  restrictedNamedExports?: string[]
9079
+ restrictedNamedExportsPattern?: string
9071
9080
  } | {
9072
9081
  restrictedNamedExports?: string[]
9082
+ restrictedNamedExportsPattern?: string
9073
9083
  restrictDefaultExports?: {
9074
9084
  direct?: boolean
9075
9085
  named?: boolean
@@ -12654,6 +12664,8 @@ type TsSortTypeConstituents = []|[{
12654
12664
 
12655
12665
  checkUnions?: boolean
12656
12666
 
12667
+ caseSensitive?: boolean
12668
+
12657
12669
  groupOrder?: ("conditional" | "function" | "import" | "intersection" | "keyword" | "nullish" | "literal" | "named" | "object" | "operator" | "tuple" | "union")[]
12658
12670
  }]
12659
12671
  // ----- ts/space-before-blocks -----
@@ -12951,17 +12963,6 @@ type UnusedImportsNoUnusedImports = []|[(("all" | "local") | {
12951
12963
  caughtErrorsIgnorePattern?: string
12952
12964
  destructuredArrayIgnorePattern?: string
12953
12965
  })]
12954
- // ----- unused-imports/no-unused-imports-ts -----
12955
- type UnusedImportsNoUnusedImportsTs = []|[(("all" | "local") | {
12956
- vars?: ("all" | "local")
12957
- varsIgnorePattern?: string
12958
- args?: ("all" | "after-used" | "none")
12959
- ignoreRestSiblings?: boolean
12960
- argsIgnorePattern?: string
12961
- caughtErrors?: ("all" | "none")
12962
- caughtErrorsIgnorePattern?: string
12963
- destructuredArrayIgnorePattern?: string
12964
- })]
12965
12966
  // ----- unused-imports/no-unused-vars -----
12966
12967
  type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
12967
12968
  vars?: ("all" | "local")
@@ -12973,17 +12974,6 @@ type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
12973
12974
  caughtErrorsIgnorePattern?: string
12974
12975
  destructuredArrayIgnorePattern?: string
12975
12976
  })]
12976
- // ----- unused-imports/no-unused-vars-ts -----
12977
- type UnusedImportsNoUnusedVarsTs = []|[(("all" | "local") | {
12978
- vars?: ("all" | "local")
12979
- varsIgnorePattern?: string
12980
- args?: ("all" | "after-used" | "none")
12981
- ignoreRestSiblings?: boolean
12982
- argsIgnorePattern?: string
12983
- caughtErrors?: ("all" | "none")
12984
- caughtErrorsIgnorePattern?: string
12985
- destructuredArrayIgnorePattern?: string
12986
- })]
12987
12977
  // ----- use-isnan -----
12988
12978
  type UseIsnan = []|[{
12989
12979
  enforceForSwitchCase?: boolean
package/dist/index.d.ts CHANGED
@@ -119,6 +119,11 @@ interface RuleOptions {
119
119
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
120
120
  */
121
121
  'antfu/consistent-list-newline'?: Linter.RuleEntry<AntfuConsistentListNewline>
122
+ /**
123
+ * Enforce Anthony's style of curly bracket
124
+ * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.test.ts
125
+ */
126
+ 'antfu/curly'?: Linter.RuleEntry<[]>
122
127
  /**
123
128
  * Newline after if
124
129
  * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
@@ -471,42 +476,42 @@ interface RuleOptions {
471
476
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
472
477
  /**
473
478
  * Enforce or ban the use of inline type-only markers for named imports.
474
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/consistent-type-specifier-style.md
479
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/consistent-type-specifier-style.md
475
480
  */
476
481
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
477
482
  /**
478
483
  * Ensure a default export is present, given a default import.
479
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/default.md
484
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/default.md
480
485
  */
481
486
  'import/default'?: Linter.RuleEntry<[]>
482
487
  /**
483
488
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
484
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/dynamic-import-chunkname.md
489
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/dynamic-import-chunkname.md
485
490
  */
486
491
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
487
492
  /**
488
493
  * Forbid any invalid exports, i.e. re-export of the same name.
489
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/export.md
494
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/export.md
490
495
  */
491
496
  'import/export'?: Linter.RuleEntry<[]>
492
497
  /**
493
498
  * Ensure all exports appear after other statements.
494
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/exports-last.md
499
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/exports-last.md
495
500
  */
496
501
  'import/exports-last'?: Linter.RuleEntry<[]>
497
502
  /**
498
503
  * Ensure consistent use of file extension within the import path.
499
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/extensions.md
504
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/extensions.md
500
505
  */
501
506
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
502
507
  /**
503
508
  * Ensure all imports appear before other statements.
504
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/first.md
509
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/first.md
505
510
  */
506
511
  'import/first'?: Linter.RuleEntry<ImportFirst>
507
512
  /**
508
513
  * Prefer named exports to be grouped together in a single export declaration.
509
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/group-exports.md
514
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/group-exports.md
510
515
  */
511
516
  'import/group-exports'?: Linter.RuleEntry<[]>
512
517
  /**
@@ -517,182 +522,182 @@ interface RuleOptions {
517
522
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
518
523
  /**
519
524
  * Enforce the maximum number of dependencies a module can have.
520
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/max-dependencies.md
525
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/max-dependencies.md
521
526
  */
522
527
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
523
528
  /**
524
529
  * Ensure named imports correspond to a named export in the remote file.
525
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/named.md
530
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/named.md
526
531
  */
527
532
  'import/named'?: Linter.RuleEntry<ImportNamed>
528
533
  /**
529
534
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
530
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/namespace.md
535
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/namespace.md
531
536
  */
532
537
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
533
538
  /**
534
539
  * Enforce a newline after import statements.
535
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/newline-after-import.md
540
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/newline-after-import.md
536
541
  */
537
542
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
538
543
  /**
539
544
  * Forbid import of modules using absolute paths.
540
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-absolute-path.md
545
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-absolute-path.md
541
546
  */
542
547
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
543
548
  /**
544
549
  * Forbid AMD `require` and `define` calls.
545
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-amd.md
550
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-amd.md
546
551
  */
547
552
  'import/no-amd'?: Linter.RuleEntry<[]>
548
553
  /**
549
554
  * Forbid anonymous values as default exports.
550
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-anonymous-default-export.md
555
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-anonymous-default-export.md
551
556
  */
552
557
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
553
558
  /**
554
559
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
555
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-commonjs.md
560
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-commonjs.md
556
561
  */
557
562
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
558
563
  /**
559
564
  * Forbid a module from importing a module with a dependency path back to itself.
560
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-cycle.md
565
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-cycle.md
561
566
  */
562
567
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
563
568
  /**
564
569
  * Forbid default exports.
565
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-default-export.md
570
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-default-export.md
566
571
  */
567
572
  'import/no-default-export'?: Linter.RuleEntry<[]>
568
573
  /**
569
574
  * Forbid imported names marked with `@deprecated` documentation tag.
570
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-deprecated.md
575
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-deprecated.md
571
576
  */
572
577
  'import/no-deprecated'?: Linter.RuleEntry<[]>
573
578
  /**
574
579
  * Forbid repeated import of the same module in multiple places.
575
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-duplicates.md
580
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-duplicates.md
576
581
  */
577
582
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
578
583
  /**
579
584
  * Forbid `require()` calls with expressions.
580
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-dynamic-require.md
585
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-dynamic-require.md
581
586
  */
582
587
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
583
588
  /**
584
589
  * Forbid empty named import blocks.
585
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-empty-named-blocks.md
590
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-empty-named-blocks.md
586
591
  */
587
592
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
588
593
  /**
589
594
  * Forbid the use of extraneous packages.
590
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-extraneous-dependencies.md
595
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-extraneous-dependencies.md
591
596
  */
592
597
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
593
598
  /**
594
599
  * Forbid import statements with CommonJS module.exports.
595
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-import-module-exports.md
600
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-import-module-exports.md
596
601
  */
597
602
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
598
603
  /**
599
604
  * Forbid importing the submodules of other modules.
600
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-internal-modules.md
605
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-internal-modules.md
601
606
  */
602
607
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
603
608
  /**
604
609
  * Forbid the use of mutable exports with `var` or `let`.
605
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-mutable-exports.md
610
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-mutable-exports.md
606
611
  */
607
612
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
608
613
  /**
609
614
  * Forbid use of exported name as identifier of default export.
610
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default.md
615
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default.md
611
616
  */
612
617
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
613
618
  /**
614
619
  * Forbid use of exported name as property of default export.
615
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default-member.md
620
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default-member.md
616
621
  */
617
622
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
618
623
  /**
619
624
  * Forbid named default exports.
620
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-default.md
625
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-default.md
621
626
  */
622
627
  'import/no-named-default'?: Linter.RuleEntry<[]>
623
628
  /**
624
629
  * Forbid named exports.
625
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-export.md
630
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-export.md
626
631
  */
627
632
  'import/no-named-export'?: Linter.RuleEntry<[]>
628
633
  /**
629
634
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
630
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-namespace.md
635
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-namespace.md
631
636
  */
632
637
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
633
638
  /**
634
639
  * Forbid Node.js builtin modules.
635
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-nodejs-modules.md
640
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-nodejs-modules.md
636
641
  */
637
642
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
638
643
  /**
639
644
  * Forbid importing packages through relative paths.
640
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-packages.md
645
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-packages.md
641
646
  */
642
647
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
643
648
  /**
644
649
  * Forbid importing modules from parent directories.
645
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-parent-imports.md
650
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-parent-imports.md
646
651
  */
647
652
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
648
653
  /**
649
654
  * Enforce which files can be imported in a given folder.
650
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-restricted-paths.md
655
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-restricted-paths.md
651
656
  */
652
657
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
653
658
  /**
654
659
  * Forbid a module from importing itself.
655
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-self-import.md
660
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-self-import.md
656
661
  */
657
662
  'import/no-self-import'?: Linter.RuleEntry<[]>
658
663
  /**
659
664
  * Forbid unassigned imports.
660
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unassigned-import.md
665
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unassigned-import.md
661
666
  */
662
667
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
663
668
  /**
664
669
  * Ensure imports point to a file/module that can be resolved.
665
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unresolved.md
670
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unresolved.md
666
671
  */
667
672
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
668
673
  /**
669
674
  * Forbid modules without exports, or exports without matching import in another module.
670
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unused-modules.md
675
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unused-modules.md
671
676
  */
672
677
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
673
678
  /**
674
679
  * Forbid unnecessary path segments in import and require statements.
675
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-useless-path-segments.md
680
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-useless-path-segments.md
676
681
  */
677
682
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
678
683
  /**
679
684
  * Forbid webpack loader syntax in imports.
680
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-webpack-loader-syntax.md
685
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-webpack-loader-syntax.md
681
686
  */
682
687
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
683
688
  /**
684
689
  * Enforce a convention in module import order.
685
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/order.md
690
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/order.md
686
691
  */
687
692
  'import/order'?: Linter.RuleEntry<ImportOrder>
688
693
  /**
689
694
  * Prefer a default export if module exports a single name or multiple names.
690
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/prefer-default-export.md
695
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/prefer-default-export.md
691
696
  */
692
697
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
693
698
  /**
694
699
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
695
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/unambiguous.md
700
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/unambiguous.md
696
701
  */
697
702
  'import/unambiguous'?: Linter.RuleEntry<[]>
698
703
  /**
@@ -1216,6 +1221,7 @@ interface RuleOptions {
1216
1221
  /**
1217
1222
  * Enforce position of line comments
1218
1223
  * @see https://eslint.org/docs/latest/rules/line-comment-position
1224
+ * @deprecated
1219
1225
  */
1220
1226
  'line-comment-position'?: Linter.RuleEntry<LineCommentPosition>
1221
1227
  /**
@@ -1297,6 +1303,7 @@ interface RuleOptions {
1297
1303
  /**
1298
1304
  * Enforce a particular style for multiline comments
1299
1305
  * @see https://eslint.org/docs/latest/rules/multiline-comment-style
1306
+ * @deprecated
1300
1307
  */
1301
1308
  'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle>
1302
1309
  /**
@@ -1669,7 +1676,7 @@ interface RuleOptions {
1669
1676
  * Disallow characters which are made with multiple code points in character class syntax
1670
1677
  * @see https://eslint.org/docs/latest/rules/no-misleading-character-class
1671
1678
  */
1672
- 'no-misleading-character-class'?: Linter.RuleEntry<[]>
1679
+ 'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass>
1673
1680
  /**
1674
1681
  * Disallow mixed binary operators
1675
1682
  * @see https://eslint.org/docs/latest/rules/no-mixed-operators
@@ -5709,21 +5716,11 @@ interface RuleOptions {
5709
5716
  * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5710
5717
  */
5711
5718
  'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>
5712
- /**
5713
- * Disallow unused variables
5714
- * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5715
- */
5716
- 'unused-imports/no-unused-imports-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedImportsTs>
5717
5719
  /**
5718
5720
  * Disallow unused variables
5719
5721
  * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5720
5722
  */
5721
5723
  'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>
5722
- /**
5723
- * Disallow unused variables
5724
- * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
5725
- */
5726
- 'unused-imports/no-unused-vars-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedVarsTs>
5727
5724
  /**
5728
5725
  * Require calls to `isNaN()` when checking for `NaN`
5729
5726
  * @see https://eslint.org/docs/latest/rules/use-isnan
@@ -7141,6 +7138,8 @@ type AntfuConsistentListNewline = []|[{
7141
7138
  ObjectPattern?: boolean
7142
7139
  ArrayPattern?: boolean
7143
7140
  JSXOpeningElement?: boolean
7141
+ JSONArrayExpression?: boolean
7142
+ JSONObjectExpression?: boolean
7144
7143
  }]
7145
7144
  // ----- antfu/indent-unindent -----
7146
7145
  type AntfuIndentUnindent = []|[{
@@ -7327,6 +7326,9 @@ type _FuncNamesValue = ("always" | "as-needed" | "never")
7327
7326
  // ----- func-style -----
7328
7327
  type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), {
7329
7328
  allowArrowFunctions?: boolean
7329
+ overrides?: {
7330
+ namedExports?: ("declaration" | "expression" | "ignore")
7331
+ }
7330
7332
  }]
7331
7333
  // ----- function-call-argument-newline -----
7332
7334
  type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
@@ -8936,9 +8938,11 @@ type NoExtendNative = []|[{
8936
8938
  exceptions?: string[]
8937
8939
  }]
8938
8940
  // ----- no-extra-boolean-cast -----
8939
- type NoExtraBooleanCast = []|[{
8941
+ type NoExtraBooleanCast = []|[({
8942
+ enforceForInnerExpressions?: boolean
8943
+ } | {
8940
8944
  enforceForLogicalOperands?: boolean
8941
- }]
8945
+ })]
8942
8946
  // ----- no-extra-parens -----
8943
8947
  type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
8944
8948
  conditionalAssign?: boolean
@@ -9012,6 +9016,10 @@ type NoMagicNumbers = []|[{
9012
9016
  ignoreDefaultValues?: boolean
9013
9017
  ignoreClassFieldInitialValues?: boolean
9014
9018
  }]
9019
+ // ----- no-misleading-character-class -----
9020
+ type NoMisleadingCharacterClass = []|[{
9021
+ allowEscape?: boolean
9022
+ }]
9015
9023
  // ----- no-mixed-operators -----
9016
9024
  type NoMixedOperators = []|[{
9017
9025
  groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][]
@@ -9068,8 +9076,10 @@ type NoRedeclare = []|[{
9068
9076
  // ----- no-restricted-exports -----
9069
9077
  type NoRestrictedExports = []|[({
9070
9078
  restrictedNamedExports?: string[]
9079
+ restrictedNamedExportsPattern?: string
9071
9080
  } | {
9072
9081
  restrictedNamedExports?: string[]
9082
+ restrictedNamedExportsPattern?: string
9073
9083
  restrictDefaultExports?: {
9074
9084
  direct?: boolean
9075
9085
  named?: boolean
@@ -12654,6 +12664,8 @@ type TsSortTypeConstituents = []|[{
12654
12664
 
12655
12665
  checkUnions?: boolean
12656
12666
 
12667
+ caseSensitive?: boolean
12668
+
12657
12669
  groupOrder?: ("conditional" | "function" | "import" | "intersection" | "keyword" | "nullish" | "literal" | "named" | "object" | "operator" | "tuple" | "union")[]
12658
12670
  }]
12659
12671
  // ----- ts/space-before-blocks -----
@@ -12951,17 +12963,6 @@ type UnusedImportsNoUnusedImports = []|[(("all" | "local") | {
12951
12963
  caughtErrorsIgnorePattern?: string
12952
12964
  destructuredArrayIgnorePattern?: string
12953
12965
  })]
12954
- // ----- unused-imports/no-unused-imports-ts -----
12955
- type UnusedImportsNoUnusedImportsTs = []|[(("all" | "local") | {
12956
- vars?: ("all" | "local")
12957
- varsIgnorePattern?: string
12958
- args?: ("all" | "after-used" | "none")
12959
- ignoreRestSiblings?: boolean
12960
- argsIgnorePattern?: string
12961
- caughtErrors?: ("all" | "none")
12962
- caughtErrorsIgnorePattern?: string
12963
- destructuredArrayIgnorePattern?: string
12964
- })]
12965
12966
  // ----- unused-imports/no-unused-vars -----
12966
12967
  type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
12967
12968
  vars?: ("all" | "local")
@@ -12973,17 +12974,6 @@ type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
12973
12974
  caughtErrorsIgnorePattern?: string
12974
12975
  destructuredArrayIgnorePattern?: string
12975
12976
  })]
12976
- // ----- unused-imports/no-unused-vars-ts -----
12977
- type UnusedImportsNoUnusedVarsTs = []|[(("all" | "local") | {
12978
- vars?: ("all" | "local")
12979
- varsIgnorePattern?: string
12980
- args?: ("all" | "after-used" | "none")
12981
- ignoreRestSiblings?: boolean
12982
- argsIgnorePattern?: string
12983
- caughtErrors?: ("all" | "none")
12984
- caughtErrorsIgnorePattern?: string
12985
- destructuredArrayIgnorePattern?: string
12986
- })]
12987
12977
  // ----- use-isnan -----
12988
12978
  type UseIsnan = []|[{
12989
12979
  enforceForSwitchCase?: boolean
package/dist/index.js CHANGED
@@ -703,9 +703,9 @@ async function stylistic(options = {}) {
703
703
  ...lessOpinionated ? {
704
704
  curly: ["error", "all"]
705
705
  } : {
706
+ "antfu/curly": "error",
706
707
  "antfu/if-newline": "error",
707
- "antfu/top-level-function": "error",
708
- "curly": ["error", "multi-or-nest", "consistent"]
708
+ "antfu/top-level-function": "error"
709
709
  },
710
710
  // 覆盖`stylistic`默认规则
711
711
  "style/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "4.6.0",
4
+ "version": "4.6.1",
5
5
  "packageManager": "pnpm@9.1.0",
6
6
  "description": "LinCenYing's ESLint config",
7
7
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
@@ -65,36 +65,36 @@
65
65
  "@antfu/eslint-define-config": "1.23.0-2",
66
66
  "@antfu/install-pkg": "^0.3.3",
67
67
  "@stylistic/eslint-plugin": "2.1.0",
68
- "@typescript-eslint/eslint-plugin": "^7.9.0",
69
- "@typescript-eslint/parser": "^7.9.0",
68
+ "@typescript-eslint/eslint-plugin": "^7.10.0",
69
+ "@typescript-eslint/parser": "^7.10.0",
70
70
  "eslint-config-flat-gitignore": "^0.1.5",
71
- "eslint-flat-config-utils": "^0.2.4",
71
+ "eslint-flat-config-utils": "^0.2.5",
72
72
  "eslint-merge-processors": "^0.1.0",
73
73
  "eslint-parser-plain": "^0.1.0",
74
- "eslint-plugin-antfu": "^2.2.0",
74
+ "eslint-plugin-antfu": "^2.3.0",
75
75
  "eslint-plugin-eslint-comments": "^3.2.0",
76
- "eslint-plugin-import-x": "^0.5.0",
77
- "eslint-plugin-jsdoc": "^48.2.5",
78
- "eslint-plugin-jsonc": "^2.15.1",
76
+ "eslint-plugin-import-x": "^0.5.1",
77
+ "eslint-plugin-jsdoc": "^48.2.6",
78
+ "eslint-plugin-jsonc": "^2.16.0",
79
79
  "eslint-plugin-markdown": "^5.0.0",
80
80
  "eslint-plugin-n": "^17.7.0",
81
81
  "eslint-plugin-no-only-tests": "^3.1.0",
82
82
  "eslint-plugin-perfectionist": "^2.10.0",
83
- "eslint-plugin-regexp": "^2.5.0",
83
+ "eslint-plugin-regexp": "^2.6.0",
84
84
  "eslint-plugin-toml": "^0.11.0",
85
85
  "eslint-plugin-unicorn": "^53.0.0",
86
- "eslint-plugin-unused-imports": "^3.2.0",
86
+ "eslint-plugin-unused-imports": "^4.0.0",
87
87
  "eslint-plugin-vitest": "^0.5.4",
88
88
  "eslint-plugin-vue": "^9.26.0",
89
89
  "eslint-plugin-yml": "^1.14.0",
90
90
  "eslint-processor-vue-blocks": "^0.1.2",
91
- "globals": "^15.2.0",
91
+ "globals": "^15.3.0",
92
92
  "jsonc-eslint-parser": "^2.4.0",
93
93
  "local-pkg": "^0.5.0",
94
94
  "prompts": "^2.4.2",
95
95
  "toml-eslint-parser": "^0.9.3",
96
96
  "vue-eslint-parser": "^9.4.2",
97
- "yaml-eslint-parser": "^1.2.2"
97
+ "yaml-eslint-parser": "^1.2.3"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@antfu/ni": "^0.21.12",
@@ -108,15 +108,15 @@
108
108
  "@types/eslint": "^8.56.10",
109
109
  "@types/node": "^20.12.12",
110
110
  "@types/prompts": "^2.4.9",
111
- "@unocss/eslint-plugin": "^0.60.2",
111
+ "@unocss/eslint-plugin": "^0.60.3",
112
112
  "bumpp": "^9.4.1",
113
- "eslint": "^9.2.0",
113
+ "eslint": "^9.3.0",
114
114
  "eslint-plugin-format": "^0.1.1",
115
115
  "eslint-plugin-react-hooks": "^4.6.2",
116
116
  "eslint-plugin-react-refresh": "^0.4.7",
117
117
  "eslint-typegen": "^0.2.4",
118
118
  "esno": "^4.7.0",
119
- "lint-staged": "^15.2.2",
119
+ "lint-staged": "^15.2.5",
120
120
  "prettier": "^3.2.5",
121
121
  "react": "^18.3.1",
122
122
  "rimraf": "^5.0.7",