@antfu/eslint-config 3.7.1 → 3.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -647,233 +647,233 @@ interface RuleOptions {
647
647
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
648
648
  /**
649
649
  * Enforce or ban the use of inline type-only markers for named imports.
650
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/consistent-type-specifier-style.md
650
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/consistent-type-specifier-style.md
651
651
  */
652
652
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
653
653
  /**
654
654
  * Ensure a default export is present, given a default import.
655
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/default.md
655
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/default.md
656
656
  */
657
657
  'import/default'?: Linter.RuleEntry<[]>
658
658
  /**
659
659
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
660
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/dynamic-import-chunkname.md
660
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/dynamic-import-chunkname.md
661
661
  */
662
662
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
663
663
  /**
664
664
  * Forbid any invalid exports, i.e. re-export of the same name.
665
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/export.md
665
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/export.md
666
666
  */
667
667
  'import/export'?: Linter.RuleEntry<[]>
668
668
  /**
669
669
  * Ensure all exports appear after other statements.
670
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/exports-last.md
670
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/exports-last.md
671
671
  */
672
672
  'import/exports-last'?: Linter.RuleEntry<[]>
673
673
  /**
674
674
  * Ensure consistent use of file extension within the import path.
675
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/extensions.md
675
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/extensions.md
676
676
  */
677
677
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
678
678
  /**
679
679
  * Ensure all imports appear before other statements.
680
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/first.md
680
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/first.md
681
681
  */
682
682
  'import/first'?: Linter.RuleEntry<ImportFirst>
683
683
  /**
684
684
  * Prefer named exports to be grouped together in a single export declaration.
685
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/group-exports.md
685
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/group-exports.md
686
686
  */
687
687
  'import/group-exports'?: Linter.RuleEntry<[]>
688
688
  /**
689
689
  * Replaced by `import-x/first`.
690
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/imports-first.md
690
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/imports-first.md
691
691
  * @deprecated
692
692
  */
693
693
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
694
694
  /**
695
695
  * Enforce the maximum number of dependencies a module can have.
696
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/max-dependencies.md
696
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/max-dependencies.md
697
697
  */
698
698
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
699
699
  /**
700
700
  * Ensure named imports correspond to a named export in the remote file.
701
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/named.md
701
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/named.md
702
702
  */
703
703
  'import/named'?: Linter.RuleEntry<ImportNamed>
704
704
  /**
705
705
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
706
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/namespace.md
706
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/namespace.md
707
707
  */
708
708
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
709
709
  /**
710
710
  * Enforce a newline after import statements.
711
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/newline-after-import.md
711
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/newline-after-import.md
712
712
  */
713
713
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
714
714
  /**
715
715
  * Forbid import of modules using absolute paths.
716
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-absolute-path.md
716
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-absolute-path.md
717
717
  */
718
718
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
719
719
  /**
720
720
  * Forbid AMD `require` and `define` calls.
721
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-amd.md
721
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-amd.md
722
722
  */
723
723
  'import/no-amd'?: Linter.RuleEntry<[]>
724
724
  /**
725
725
  * Forbid anonymous values as default exports.
726
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-anonymous-default-export.md
726
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-anonymous-default-export.md
727
727
  */
728
728
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
729
729
  /**
730
730
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
731
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-commonjs.md
731
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-commonjs.md
732
732
  */
733
733
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
734
734
  /**
735
735
  * Forbid a module from importing a module with a dependency path back to itself.
736
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-cycle.md
736
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-cycle.md
737
737
  */
738
738
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
739
739
  /**
740
740
  * Forbid default exports.
741
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-default-export.md
741
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-default-export.md
742
742
  */
743
743
  'import/no-default-export'?: Linter.RuleEntry<[]>
744
744
  /**
745
745
  * Forbid imported names marked with `@deprecated` documentation tag.
746
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-deprecated.md
746
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-deprecated.md
747
747
  */
748
748
  'import/no-deprecated'?: Linter.RuleEntry<[]>
749
749
  /**
750
750
  * Forbid repeated import of the same module in multiple places.
751
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-duplicates.md
751
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-duplicates.md
752
752
  */
753
753
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
754
754
  /**
755
755
  * Forbid `require()` calls with expressions.
756
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-dynamic-require.md
756
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-dynamic-require.md
757
757
  */
758
758
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
759
759
  /**
760
760
  * Forbid empty named import blocks.
761
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-empty-named-blocks.md
761
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-empty-named-blocks.md
762
762
  */
763
763
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
764
764
  /**
765
765
  * Forbid the use of extraneous packages.
766
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-extraneous-dependencies.md
766
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-extraneous-dependencies.md
767
767
  */
768
768
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
769
769
  /**
770
770
  * Forbid import statements with CommonJS module.exports.
771
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-import-module-exports.md
771
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-import-module-exports.md
772
772
  */
773
773
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
774
774
  /**
775
775
  * Forbid importing the submodules of other modules.
776
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-internal-modules.md
776
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-internal-modules.md
777
777
  */
778
778
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
779
779
  /**
780
780
  * Forbid the use of mutable exports with `var` or `let`.
781
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-mutable-exports.md
781
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-mutable-exports.md
782
782
  */
783
783
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
784
784
  /**
785
785
  * Forbid use of exported name as identifier of default export.
786
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-as-default.md
786
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-named-as-default.md
787
787
  */
788
788
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
789
789
  /**
790
790
  * Forbid use of exported name as property of default export.
791
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-as-default-member.md
791
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-named-as-default-member.md
792
792
  */
793
793
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
794
794
  /**
795
795
  * Forbid named default exports.
796
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-default.md
796
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-named-default.md
797
797
  */
798
798
  'import/no-named-default'?: Linter.RuleEntry<[]>
799
799
  /**
800
800
  * Forbid named exports.
801
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-export.md
801
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-named-export.md
802
802
  */
803
803
  'import/no-named-export'?: Linter.RuleEntry<[]>
804
804
  /**
805
805
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
806
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-namespace.md
806
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-namespace.md
807
807
  */
808
808
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
809
809
  /**
810
810
  * Forbid Node.js builtin modules.
811
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-nodejs-modules.md
811
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-nodejs-modules.md
812
812
  */
813
813
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
814
814
  /**
815
815
  * Forbid importing packages through relative paths.
816
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-relative-packages.md
816
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-relative-packages.md
817
817
  */
818
818
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
819
819
  /**
820
820
  * Forbid importing modules from parent directories.
821
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-relative-parent-imports.md
821
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-relative-parent-imports.md
822
822
  */
823
823
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
824
824
  /**
825
825
  * Forbid importing a default export by a different name.
826
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-rename-default.md
826
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-rename-default.md
827
827
  */
828
828
  'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
829
829
  /**
830
830
  * Enforce which files can be imported in a given folder.
831
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-restricted-paths.md
831
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-restricted-paths.md
832
832
  */
833
833
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
834
834
  /**
835
835
  * Forbid a module from importing itself.
836
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-self-import.md
836
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-self-import.md
837
837
  */
838
838
  'import/no-self-import'?: Linter.RuleEntry<[]>
839
839
  /**
840
840
  * Forbid unassigned imports.
841
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unassigned-import.md
841
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-unassigned-import.md
842
842
  */
843
843
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
844
844
  /**
845
845
  * Ensure imports point to a file/module that can be resolved.
846
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unresolved.md
846
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-unresolved.md
847
847
  */
848
848
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
849
849
  /**
850
850
  * Forbid modules without exports, or exports without matching import in another module.
851
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unused-modules.md
851
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-unused-modules.md
852
852
  */
853
853
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
854
854
  /**
855
855
  * Forbid unnecessary path segments in import and require statements.
856
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-useless-path-segments.md
856
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-useless-path-segments.md
857
857
  */
858
858
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
859
859
  /**
860
860
  * Forbid webpack loader syntax in imports.
861
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-webpack-loader-syntax.md
861
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/no-webpack-loader-syntax.md
862
862
  */
863
863
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
864
864
  /**
865
865
  * Enforce a convention in module import order.
866
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/order.md
866
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/order.md
867
867
  */
868
868
  'import/order'?: Linter.RuleEntry<ImportOrder>
869
869
  /**
870
870
  * Prefer a default export if module exports a single name or multiple names.
871
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/prefer-default-export.md
871
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/prefer-default-export.md
872
872
  */
873
873
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
874
874
  /**
875
875
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
876
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/unambiguous.md
876
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.3.0/docs/rules/unambiguous.md
877
877
  */
878
878
  'import/unambiguous'?: Linter.RuleEntry<[]>
879
879
  /**
@@ -10338,6 +10338,10 @@ type PerfectionistSortArrayIncludes = []|[{
10338
10338
  ignoreCase?: boolean
10339
10339
 
10340
10340
  groupKind?: ("mixed" | "literals-first" | "spreads-first")
10341
+
10342
+ partitionByComment?: (string[] | boolean | string)
10343
+
10344
+ partitionByNewLine?: boolean
10341
10345
  }]
10342
10346
  // ----- perfectionist/sort-astro-attributes -----
10343
10347
  type PerfectionistSortAstroAttributes = []|[{
@@ -10417,6 +10421,8 @@ type PerfectionistSortEnums = []|[{
10417
10421
  forceNumericSort?: boolean
10418
10422
 
10419
10423
  partitionByComment?: (string[] | boolean | string)
10424
+
10425
+ partitionByNewLine?: boolean
10420
10426
  }]
10421
10427
  // ----- perfectionist/sort-exports -----
10422
10428
  type PerfectionistSortExports = []|[{
@@ -10426,6 +10432,12 @@ type PerfectionistSortExports = []|[{
10426
10432
  order?: ("asc" | "desc")
10427
10433
 
10428
10434
  ignoreCase?: boolean
10435
+
10436
+ partitionByComment?: (string[] | boolean | string)
10437
+
10438
+ partitionByNewLine?: boolean
10439
+
10440
+ groupKind?: ("mixed" | "values-first" | "types-first")
10429
10441
  }]
10430
10442
  // ----- perfectionist/sort-imports -----
10431
10443
  type PerfectionistSortImports = []|[_PerfectionistSortImportsSortImports]
@@ -10476,6 +10488,8 @@ type PerfectionistSortInterfaces = []|[{
10476
10488
 
10477
10489
  ignorePattern?: string[]
10478
10490
 
10491
+ partitionByComment?: (boolean | string | string[])
10492
+
10479
10493
  partitionByNewLine?: boolean
10480
10494
 
10481
10495
  groupKind?: ("mixed" | "optional-first" | "required-first")
@@ -10496,6 +10510,10 @@ type PerfectionistSortIntersectionTypes = []|[{
10496
10510
  ignoreCase?: boolean
10497
10511
 
10498
10512
  groups?: (string | string[])[]
10513
+
10514
+ partitionByComment?: (string[] | boolean | string)
10515
+
10516
+ partitionByNewLine?: boolean
10499
10517
  }]
10500
10518
  // ----- perfectionist/sort-jsx-props -----
10501
10519
  type PerfectionistSortJsxProps = []|[{
@@ -10522,6 +10540,10 @@ type PerfectionistSortMaps = []|[{
10522
10540
  order?: ("asc" | "desc")
10523
10541
 
10524
10542
  ignoreCase?: boolean
10543
+
10544
+ partitionByComment?: (string[] | boolean | string)
10545
+
10546
+ partitionByNewLine?: boolean
10525
10547
  }]
10526
10548
  // ----- perfectionist/sort-named-exports -----
10527
10549
  type PerfectionistSortNamedExports = []|[{
@@ -10533,6 +10555,10 @@ type PerfectionistSortNamedExports = []|[{
10533
10555
  ignoreCase?: boolean
10534
10556
 
10535
10557
  groupKind?: ("mixed" | "values-first" | "types-first")
10558
+
10559
+ partitionByComment?: (string[] | boolean | string)
10560
+
10561
+ partitionByNewLine?: boolean
10536
10562
  }]
10537
10563
  // ----- perfectionist/sort-named-imports -----
10538
10564
  type PerfectionistSortNamedImports = []|[{
@@ -10546,6 +10572,10 @@ type PerfectionistSortNamedImports = []|[{
10546
10572
  ignoreAlias?: boolean
10547
10573
 
10548
10574
  groupKind?: ("mixed" | "values-first" | "types-first")
10575
+
10576
+ partitionByComment?: (string[] | boolean | string)
10577
+
10578
+ partitionByNewLine?: boolean
10549
10579
  }]
10550
10580
  // ----- perfectionist/sort-object-types -----
10551
10581
  type PerfectionistSortObjectTypes = []|[{
@@ -10556,6 +10586,8 @@ type PerfectionistSortObjectTypes = []|[{
10556
10586
 
10557
10587
  ignoreCase?: boolean
10558
10588
 
10589
+ partitionByComment?: (string[] | boolean | string)
10590
+
10559
10591
  partitionByNewLine?: boolean
10560
10592
 
10561
10593
  groupKind?: ("mixed" | "required-first" | "optional-first")
@@ -10601,6 +10633,10 @@ type PerfectionistSortSets = []|[{
10601
10633
  ignoreCase?: boolean
10602
10634
 
10603
10635
  groupKind?: ("mixed" | "literals-first" | "spreads-first")
10636
+
10637
+ partitionByComment?: (string[] | boolean | string)
10638
+
10639
+ partitionByNewLine?: boolean
10604
10640
  }]
10605
10641
  // ----- perfectionist/sort-svelte-attributes -----
10606
10642
  type PerfectionistSortSvelteAttributes = []|[{
@@ -10636,6 +10672,10 @@ type PerfectionistSortUnionTypes = []|[{
10636
10672
  ignoreCase?: boolean
10637
10673
 
10638
10674
  groups?: (string | string[])[]
10675
+
10676
+ partitionByComment?: (string[] | boolean | string)
10677
+
10678
+ partitionByNewLine?: boolean
10639
10679
  }]
10640
10680
  // ----- perfectionist/sort-variable-declarations -----
10641
10681
  type PerfectionistSortVariableDeclarations = []|[{
@@ -10645,6 +10685,10 @@ type PerfectionistSortVariableDeclarations = []|[{
10645
10685
  order?: ("asc" | "desc")
10646
10686
 
10647
10687
  ignoreCase?: boolean
10688
+
10689
+ partitionByComment?: (string[] | boolean | string)
10690
+
10691
+ partitionByNewLine?: boolean
10648
10692
  }]
10649
10693
  // ----- perfectionist/sort-vue-attributes -----
10650
10694
  type PerfectionistSortVueAttributes = []|[{
package/dist/index.js CHANGED
@@ -394,6 +394,16 @@ async function stylistic(options = {}) {
394
394
  }
395
395
 
396
396
  // src/configs/formatters.ts
397
+ function mergePrettierOptions(options, overrides = {}) {
398
+ return {
399
+ ...options,
400
+ ...overrides,
401
+ plugins: [
402
+ ...overrides.plugins || [],
403
+ ...options.plugins || []
404
+ ]
405
+ };
406
+ }
397
407
  async function formatters(options = {}, stylistic2 = {}) {
398
408
  if (options === true) {
399
409
  const isPrettierPluginXmlInScope = isPackageInScope("@prettier/plugin-xml");
@@ -470,10 +480,9 @@ async function formatters(options = {}, stylistic2 = {}) {
470
480
  rules: {
471
481
  "format/prettier": [
472
482
  "error",
473
- {
474
- ...prettierOptions,
483
+ mergePrettierOptions(prettierOptions, {
475
484
  parser: "css"
476
- }
485
+ })
477
486
  ]
478
487
  }
479
488
  },
@@ -486,10 +495,9 @@ async function formatters(options = {}, stylistic2 = {}) {
486
495
  rules: {
487
496
  "format/prettier": [
488
497
  "error",
489
- {
490
- ...prettierOptions,
498
+ mergePrettierOptions(prettierOptions, {
491
499
  parser: "scss"
492
- }
500
+ })
493
501
  ]
494
502
  }
495
503
  },
@@ -502,10 +510,9 @@ async function formatters(options = {}, stylistic2 = {}) {
502
510
  rules: {
503
511
  "format/prettier": [
504
512
  "error",
505
- {
506
- ...prettierOptions,
513
+ mergePrettierOptions(prettierOptions, {
507
514
  parser: "less"
508
- }
515
+ })
509
516
  ]
510
517
  }
511
518
  }
@@ -521,10 +528,9 @@ async function formatters(options = {}, stylistic2 = {}) {
521
528
  rules: {
522
529
  "format/prettier": [
523
530
  "error",
524
- {
525
- ...prettierOptions,
531
+ mergePrettierOptions(prettierOptions, {
526
532
  parser: "html"
527
- }
533
+ })
528
534
  ]
529
535
  }
530
536
  });
@@ -539,14 +545,12 @@ async function formatters(options = {}, stylistic2 = {}) {
539
545
  rules: {
540
546
  "format/prettier": [
541
547
  "error",
542
- {
543
- ...prettierXmlOptions,
544
- ...prettierOptions,
548
+ mergePrettierOptions({ ...prettierXmlOptions, ...prettierOptions }, {
545
549
  parser: "xml",
546
550
  plugins: [
547
551
  "@prettier/plugin-xml"
548
552
  ]
549
- }
553
+ })
550
554
  ]
551
555
  }
552
556
  });
@@ -561,14 +565,12 @@ async function formatters(options = {}, stylistic2 = {}) {
561
565
  rules: {
562
566
  "format/prettier": [
563
567
  "error",
564
- {
565
- ...prettierXmlOptions,
566
- ...prettierOptions,
568
+ mergePrettierOptions({ ...prettierXmlOptions, ...prettierOptions }, {
567
569
  parser: "xml",
568
570
  plugins: [
569
571
  "@prettier/plugin-xml"
570
572
  ]
571
- }
573
+ })
572
574
  ]
573
575
  }
574
576
  });
@@ -586,11 +588,10 @@ async function formatters(options = {}, stylistic2 = {}) {
586
588
  rules: {
587
589
  [`format/${formater}`]: [
588
590
  "error",
589
- formater === "prettier" ? {
590
- ...prettierOptions,
591
+ formater === "prettier" ? mergePrettierOptions(prettierOptions, {
591
592
  embeddedLanguageFormatting: "off",
592
593
  parser: "markdown"
593
- } : {
594
+ }) : {
594
595
  ...dprintOptions,
595
596
  language: "markdown"
596
597
  }
@@ -607,14 +608,13 @@ async function formatters(options = {}, stylistic2 = {}) {
607
608
  rules: {
608
609
  "format/prettier": [
609
610
  "error",
610
- {
611
- ...prettierOptions,
611
+ mergePrettierOptions(prettierOptions, {
612
612
  embeddedLanguageFormatting: "off",
613
613
  parser: "slidev",
614
614
  plugins: [
615
615
  "prettier-plugin-slidev"
616
616
  ]
617
- }
617
+ })
618
618
  ]
619
619
  }
620
620
  });
@@ -630,13 +630,12 @@ async function formatters(options = {}, stylistic2 = {}) {
630
630
  rules: {
631
631
  "format/prettier": [
632
632
  "error",
633
- {
634
- ...prettierOptions,
633
+ mergePrettierOptions(prettierOptions, {
635
634
  parser: "astro",
636
635
  plugins: [
637
636
  "prettier-plugin-astro"
638
637
  ]
639
- }
638
+ })
640
639
  ]
641
640
  }
642
641
  });
@@ -664,10 +663,9 @@ async function formatters(options = {}, stylistic2 = {}) {
664
663
  rules: {
665
664
  "format/prettier": [
666
665
  "error",
667
- {
668
- ...prettierOptions,
666
+ mergePrettierOptions(prettierOptions, {
669
667
  parser: "graphql"
670
- }
668
+ })
671
669
  ]
672
670
  }
673
671
  });
@@ -1101,6 +1099,7 @@ async function markdown(options = {}) {
1101
1099
  },
1102
1100
  name: "antfu/markdown/disables",
1103
1101
  rules: {
1102
+ "antfu/no-top-level-await": "off",
1104
1103
  "import/newline-after-import": "off",
1105
1104
  "no-alert": "off",
1106
1105
  "no-console": "off",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "3.7.1",
4
+ "version": "3.7.2",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -86,20 +86,20 @@
86
86
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
87
87
  "@eslint/markdown": "^6.1.0",
88
88
  "@stylistic/eslint-plugin": "^2.8.0",
89
- "@typescript-eslint/eslint-plugin": "^8.6.0",
90
- "@typescript-eslint/parser": "^8.6.0",
89
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
90
+ "@typescript-eslint/parser": "^8.7.0",
91
91
  "@vitest/eslint-plugin": "^1.1.4",
92
92
  "eslint-config-flat-gitignore": "^0.3.0",
93
93
  "eslint-flat-config-utils": "^0.4.0",
94
94
  "eslint-merge-processors": "^0.1.0",
95
95
  "eslint-plugin-antfu": "^2.7.0",
96
96
  "eslint-plugin-command": "^0.2.5",
97
- "eslint-plugin-import-x": "^4.2.1",
98
- "eslint-plugin-jsdoc": "^50.2.4",
97
+ "eslint-plugin-import-x": "^4.3.0",
98
+ "eslint-plugin-jsdoc": "^50.2.5",
99
99
  "eslint-plugin-jsonc": "^2.16.0",
100
100
  "eslint-plugin-n": "^17.10.3",
101
101
  "eslint-plugin-no-only-tests": "^3.3.0",
102
- "eslint-plugin-perfectionist": "^3.6.0",
102
+ "eslint-plugin-perfectionist": "^3.7.0",
103
103
  "eslint-plugin-regexp": "^2.6.0",
104
104
  "eslint-plugin-toml": "^0.11.1",
105
105
  "eslint-plugin-unicorn": "^55.0.0",
@@ -124,13 +124,13 @@
124
124
  "@prettier/plugin-xml": "^3.4.1",
125
125
  "@stylistic/eslint-plugin-migrate": "^2.8.0",
126
126
  "@types/fs-extra": "^11.0.4",
127
- "@types/node": "^22.5.5",
127
+ "@types/node": "^22.7.2",
128
128
  "@types/prompts": "^2.4.9",
129
129
  "@types/yargs": "^17.0.33",
130
130
  "@unocss/eslint-plugin": "^0.62.4",
131
131
  "astro-eslint-parser": "^1.0.3",
132
132
  "bumpp": "^9.5.2",
133
- "eslint": "^9.10.0",
133
+ "eslint": "^9.11.1",
134
134
  "eslint-plugin-astro": "^1.2.4",
135
135
  "eslint-plugin-format": "^0.1.2",
136
136
  "eslint-plugin-react-hooks": "^4.6.2",
@@ -142,7 +142,7 @@
142
142
  "execa": "^9.4.0",
143
143
  "fast-glob": "^3.3.2",
144
144
  "fs-extra": "^11.2.0",
145
- "jiti": "^1.21.6",
145
+ "jiti": "^2.0.0",
146
146
  "lint-staged": "^15.2.10",
147
147
  "prettier-plugin-astro": "^0.14.1",
148
148
  "prettier-plugin-slidev": "^1.0.5",
@@ -154,13 +154,13 @@
154
154
  "tsx": "^4.19.1",
155
155
  "typescript": "^5.6.2",
156
156
  "vitest": "^2.1.1",
157
- "vue": "^3.5.6",
158
- "@antfu/eslint-config": "3.7.1"
157
+ "vue": "^3.5.8",
158
+ "@antfu/eslint-config": "3.7.2"
159
159
  },
160
160
  "resolutions": {
161
161
  "@eslint-community/eslint-utils": "^4.4.0",
162
- "@typescript-eslint/utils": "^8.6.0",
163
- "eslint": "^9.10.0",
162
+ "@typescript-eslint/utils": "^8.7.0",
163
+ "eslint": "^9.11.1",
164
164
  "tsx": "^4.19.1"
165
165
  },
166
166
  "simple-git-hooks": {