@vinicunca/eslint-config 2.9.7 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -112,7 +112,7 @@ __export(src_exports, {
112
112
  });
113
113
  module.exports = __toCommonJS(src_exports);
114
114
 
115
- // ../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.41_tsx@4.17.1_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
115
+ // ../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.41_tsx@4.19.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
116
116
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
117
117
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
118
118
 
@@ -779,10 +779,14 @@ async function formatters(options = {}, stylistic2 = {}) {
779
779
  }
780
780
 
781
781
  // src/configs/ignores.ts
782
- async function ignores() {
782
+ async function ignores(userIgnores = []) {
783
783
  return [
784
784
  {
785
- ignores: GLOB_EXCLUDE
785
+ ignores: [
786
+ ...GLOB_EXCLUDE,
787
+ ...userIgnores
788
+ ],
789
+ name: "vinicunca/ignores"
786
790
  }
787
791
  ];
788
792
  }
@@ -993,10 +997,7 @@ async function javascript(options = {}) {
993
997
  ],
994
998
  "no-restricted-syntax": [
995
999
  ERROR,
996
- "DebuggerStatement",
997
1000
  "ForInStatement",
998
- "LabeledStatement",
999
- "WithStatement",
1000
1001
  "TSEnumDeclaration[const=true]",
1001
1002
  "TSExportAssignment"
1002
1003
  ],
@@ -2244,7 +2245,7 @@ async function typescript(options = {}) {
2244
2245
  }
2245
2246
 
2246
2247
  // src/configs/unicorn.ts
2247
- async function unicorn() {
2248
+ async function unicorn(options = {}) {
2248
2249
  return [
2249
2250
  {
2250
2251
  name: "vinicunca/unicorn/rules",
@@ -2252,19 +2253,21 @@ async function unicorn() {
2252
2253
  unicorn: import_eslint_plugin_unicorn.default
2253
2254
  },
2254
2255
  rules: {
2255
- "unicorn/error-message": ERROR,
2256
- "unicorn/escape-case": ERROR,
2257
- "unicorn/no-instanceof-array": ERROR,
2258
- "unicorn/no-new-array": ERROR,
2259
- "unicorn/no-new-buffer": ERROR,
2260
- "unicorn/number-literal-case": ERROR,
2261
- "unicorn/prefer-dom-node-text-content": ERROR,
2262
- "unicorn/prefer-includes": ERROR,
2263
- "unicorn/prefer-node-protocol": ERROR,
2264
- "unicorn/prefer-number-properties": ERROR,
2265
- "unicorn/prefer-string-starts-ends-with": ERROR,
2266
- "unicorn/prefer-type-error": ERROR,
2267
- "unicorn/throw-new-error": ERROR
2256
+ ...options.allRecommended ? import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules : {
2257
+ "unicorn/error-message": ERROR,
2258
+ "unicorn/escape-case": ERROR,
2259
+ "unicorn/no-instanceof-array": ERROR,
2260
+ "unicorn/no-new-array": ERROR,
2261
+ "unicorn/no-new-buffer": ERROR,
2262
+ "unicorn/number-literal-case": ERROR,
2263
+ "unicorn/prefer-dom-node-text-content": ERROR,
2264
+ "unicorn/prefer-includes": ERROR,
2265
+ "unicorn/prefer-node-protocol": ERROR,
2266
+ "unicorn/prefer-number-properties": ERROR,
2267
+ "unicorn/prefer-string-starts-ends-with": ERROR,
2268
+ "unicorn/prefer-type-error": ERROR,
2269
+ "unicorn/throw-new-error": ERROR
2270
+ }
2268
2271
  }
2269
2272
  }
2270
2273
  ];
@@ -2534,8 +2537,6 @@ async function yaml(options = {}) {
2534
2537
  // src/base.ts
2535
2538
  var flatConfigProps = [
2536
2539
  "name",
2537
- "files",
2538
- "ignores",
2539
2540
  "languageOptions",
2540
2541
  "linterOptions",
2541
2542
  "processor",
@@ -2574,6 +2575,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2574
2575
  solid: enableSolid = false,
2575
2576
  svelte: enableSvelte = false,
2576
2577
  typescript: enableTypeScript = (0, import_local_pkg4.isPackageExists)("typescript"),
2578
+ unicorn: enableUnicorn = true,
2577
2579
  unocss: enableUnoCSS = false,
2578
2580
  vue: enableVue = VuePackages.some((i) => (0, import_local_pkg4.isPackageExists)(i))
2579
2581
  } = options;
@@ -2598,15 +2600,21 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2598
2600
  const configs2 = [];
2599
2601
  if (enableGitignore) {
2600
2602
  if (!e(enableGitignore)) {
2601
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2(enableGitignore)]));
2603
+ configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
2604
+ name: "vinicunca/gitignore",
2605
+ ...enableGitignore
2606
+ })]));
2602
2607
  } else {
2603
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({ strict: false })]));
2608
+ configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
2609
+ name: "vinicunca/gitignore",
2610
+ strict: false
2611
+ })]));
2604
2612
  }
2605
2613
  }
2606
2614
  const typescriptOptions = resolveSubOptions(options, "typescript");
2607
2615
  const tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
2608
2616
  configs2.push(
2609
- ignores(),
2617
+ ignores(options.ignores),
2610
2618
  javascript({
2611
2619
  isInEditor,
2612
2620
  overrides: getOverrides(options, "javascript")
@@ -2619,11 +2627,15 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2619
2627
  imports({
2620
2628
  stylistic: stylisticOptions
2621
2629
  }),
2622
- unicorn(),
2623
2630
  command(),
2624
2631
  perfectionist(),
2625
2632
  sonar()
2626
2633
  );
2634
+ if (enableUnicorn) {
2635
+ configs2.push(
2636
+ unicorn(enableUnicorn === true ? {} : enableUnicorn)
2637
+ );
2638
+ }
2627
2639
  if (enableVue) {
2628
2640
  componentExts.push("vue");
2629
2641
  }
@@ -2731,6 +2743,9 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2731
2743
  e(stylisticOptions) ? {} : stylisticOptions
2732
2744
  ));
2733
2745
  }
2746
+ if ("files" in options) {
2747
+ throw new Error('[@vinicunca/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');
2748
+ }
2734
2749
  const fusedConfig = flatConfigProps.reduce((acc, key) => {
2735
2750
  if (key in options) {
2736
2751
  acc[key] = options[key];
package/dist/index.d.cts CHANGED
@@ -646,233 +646,233 @@ interface RuleOptions {
646
646
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
647
647
  /**
648
648
  * Enforce or ban the use of inline type-only markers for named imports.
649
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/consistent-type-specifier-style.md
649
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/consistent-type-specifier-style.md
650
650
  */
651
651
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
652
652
  /**
653
653
  * Ensure a default export is present, given a default import.
654
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/default.md
654
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/default.md
655
655
  */
656
656
  'import/default'?: Linter.RuleEntry<[]>
657
657
  /**
658
658
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
659
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/dynamic-import-chunkname.md
659
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/dynamic-import-chunkname.md
660
660
  */
661
661
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
662
662
  /**
663
663
  * Forbid any invalid exports, i.e. re-export of the same name.
664
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/export.md
664
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/export.md
665
665
  */
666
666
  'import/export'?: Linter.RuleEntry<[]>
667
667
  /**
668
668
  * Ensure all exports appear after other statements.
669
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/exports-last.md
669
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/exports-last.md
670
670
  */
671
671
  'import/exports-last'?: Linter.RuleEntry<[]>
672
672
  /**
673
673
  * Ensure consistent use of file extension within the import path.
674
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/extensions.md
674
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/extensions.md
675
675
  */
676
676
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
677
677
  /**
678
678
  * Ensure all imports appear before other statements.
679
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/first.md
679
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/first.md
680
680
  */
681
681
  'import/first'?: Linter.RuleEntry<ImportFirst>
682
682
  /**
683
683
  * Prefer named exports to be grouped together in a single export declaration.
684
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/group-exports.md
684
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/group-exports.md
685
685
  */
686
686
  'import/group-exports'?: Linter.RuleEntry<[]>
687
687
  /**
688
688
  * Replaced by `import-x/first`.
689
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/imports-first.md
689
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/imports-first.md
690
690
  * @deprecated
691
691
  */
692
692
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
693
693
  /**
694
694
  * Enforce the maximum number of dependencies a module can have.
695
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/max-dependencies.md
695
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/max-dependencies.md
696
696
  */
697
697
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
698
698
  /**
699
699
  * Ensure named imports correspond to a named export in the remote file.
700
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/named.md
700
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/named.md
701
701
  */
702
702
  'import/named'?: Linter.RuleEntry<ImportNamed>
703
703
  /**
704
704
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
705
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/namespace.md
705
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/namespace.md
706
706
  */
707
707
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
708
708
  /**
709
709
  * Enforce a newline after import statements.
710
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/newline-after-import.md
710
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/newline-after-import.md
711
711
  */
712
712
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
713
713
  /**
714
714
  * Forbid import of modules using absolute paths.
715
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-absolute-path.md
715
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-absolute-path.md
716
716
  */
717
717
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
718
718
  /**
719
719
  * Forbid AMD `require` and `define` calls.
720
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-amd.md
720
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-amd.md
721
721
  */
722
722
  'import/no-amd'?: Linter.RuleEntry<[]>
723
723
  /**
724
724
  * Forbid anonymous values as default exports.
725
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-anonymous-default-export.md
725
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-anonymous-default-export.md
726
726
  */
727
727
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
728
728
  /**
729
729
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
730
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-commonjs.md
730
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-commonjs.md
731
731
  */
732
732
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
733
733
  /**
734
734
  * Forbid a module from importing a module with a dependency path back to itself.
735
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-cycle.md
735
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-cycle.md
736
736
  */
737
737
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
738
738
  /**
739
739
  * Forbid default exports.
740
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-default-export.md
740
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-default-export.md
741
741
  */
742
742
  'import/no-default-export'?: Linter.RuleEntry<[]>
743
743
  /**
744
744
  * Forbid imported names marked with `@deprecated` documentation tag.
745
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-deprecated.md
745
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-deprecated.md
746
746
  */
747
747
  'import/no-deprecated'?: Linter.RuleEntry<[]>
748
748
  /**
749
749
  * Forbid repeated import of the same module in multiple places.
750
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-duplicates.md
750
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-duplicates.md
751
751
  */
752
752
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
753
753
  /**
754
754
  * Forbid `require()` calls with expressions.
755
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-dynamic-require.md
755
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-dynamic-require.md
756
756
  */
757
757
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
758
758
  /**
759
759
  * Forbid empty named import blocks.
760
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-empty-named-blocks.md
760
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-empty-named-blocks.md
761
761
  */
762
762
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
763
763
  /**
764
764
  * Forbid the use of extraneous packages.
765
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-extraneous-dependencies.md
765
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-extraneous-dependencies.md
766
766
  */
767
767
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
768
768
  /**
769
769
  * Forbid import statements with CommonJS module.exports.
770
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-import-module-exports.md
770
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-import-module-exports.md
771
771
  */
772
772
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
773
773
  /**
774
774
  * Forbid importing the submodules of other modules.
775
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-internal-modules.md
775
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-internal-modules.md
776
776
  */
777
777
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
778
778
  /**
779
779
  * Forbid the use of mutable exports with `var` or `let`.
780
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-mutable-exports.md
780
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-mutable-exports.md
781
781
  */
782
782
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
783
783
  /**
784
784
  * Forbid use of exported name as identifier of default export.
785
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-as-default.md
785
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-as-default.md
786
786
  */
787
787
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
788
788
  /**
789
789
  * Forbid use of exported name as property of default export.
790
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-as-default-member.md
790
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-as-default-member.md
791
791
  */
792
792
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
793
793
  /**
794
794
  * Forbid named default exports.
795
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-default.md
795
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-default.md
796
796
  */
797
797
  'import/no-named-default'?: Linter.RuleEntry<[]>
798
798
  /**
799
799
  * Forbid named exports.
800
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-export.md
800
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-export.md
801
801
  */
802
802
  'import/no-named-export'?: Linter.RuleEntry<[]>
803
803
  /**
804
804
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
805
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-namespace.md
805
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-namespace.md
806
806
  */
807
807
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
808
808
  /**
809
809
  * Forbid Node.js builtin modules.
810
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-nodejs-modules.md
810
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-nodejs-modules.md
811
811
  */
812
812
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
813
813
  /**
814
814
  * Forbid importing packages through relative paths.
815
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-relative-packages.md
815
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-relative-packages.md
816
816
  */
817
817
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
818
818
  /**
819
819
  * Forbid importing modules from parent directories.
820
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-relative-parent-imports.md
820
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-relative-parent-imports.md
821
821
  */
822
822
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
823
823
  /**
824
824
  * Forbid importing a default export by a different name.
825
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-rename-default.md
825
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-rename-default.md
826
826
  */
827
827
  'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
828
828
  /**
829
829
  * Enforce which files can be imported in a given folder.
830
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-restricted-paths.md
830
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-restricted-paths.md
831
831
  */
832
832
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
833
833
  /**
834
834
  * Forbid a module from importing itself.
835
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-self-import.md
835
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-self-import.md
836
836
  */
837
837
  'import/no-self-import'?: Linter.RuleEntry<[]>
838
838
  /**
839
839
  * Forbid unassigned imports.
840
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unassigned-import.md
840
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-unassigned-import.md
841
841
  */
842
842
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
843
843
  /**
844
844
  * Ensure imports point to a file/module that can be resolved.
845
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unresolved.md
845
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-unresolved.md
846
846
  */
847
847
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
848
848
  /**
849
849
  * Forbid modules without exports, or exports without matching import in another module.
850
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unused-modules.md
850
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-unused-modules.md
851
851
  */
852
852
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
853
853
  /**
854
854
  * Forbid unnecessary path segments in import and require statements.
855
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-useless-path-segments.md
855
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-useless-path-segments.md
856
856
  */
857
857
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
858
858
  /**
859
859
  * Forbid webpack loader syntax in imports.
860
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-webpack-loader-syntax.md
860
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-webpack-loader-syntax.md
861
861
  */
862
862
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
863
863
  /**
864
864
  * Enforce a convention in module import order.
865
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/order.md
865
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/order.md
866
866
  */
867
867
  'import/order'?: Linter.RuleEntry<ImportOrder>
868
868
  /**
869
869
  * Prefer a default export if module exports a single name or multiple names.
870
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/prefer-default-export.md
870
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/prefer-default-export.md
871
871
  */
872
872
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
873
873
  /**
874
874
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
875
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/unambiguous.md
875
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/unambiguous.md
876
876
  */
877
877
  'import/unambiguous'?: Linter.RuleEntry<[]>
878
878
  /**
@@ -4732,11 +4732,6 @@ interface RuleOptions {
4732
4732
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
4733
4733
  */
4734
4734
  'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
4735
- /**
4736
- * Enforce padding around afterAll blocks
4737
- * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/index.md
4738
- */
4739
- 'test/index'?: Linter.RuleEntry<[]>
4740
4735
  /**
4741
4736
  * enforce a maximum number of expect per test
4742
4737
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
@@ -4853,6 +4848,46 @@ interface RuleOptions {
4853
4848
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
4854
4849
  */
4855
4850
  'test/no-test-return-statement'?: Linter.RuleEntry<[]>
4851
+ /**
4852
+ * Enforce padding around `afterAll` blocks
4853
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
4854
+ */
4855
+ 'test/padding-around-after-all-blocks'?: Linter.RuleEntry<[]>
4856
+ /**
4857
+ * Enforce padding around `afterEach` blocks
4858
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-each-blocks.md
4859
+ */
4860
+ 'test/padding-around-after-each-blocks'?: Linter.RuleEntry<[]>
4861
+ /**
4862
+ * Enforce padding around vitest functions
4863
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-all.md
4864
+ */
4865
+ 'test/padding-around-all'?: Linter.RuleEntry<[]>
4866
+ /**
4867
+ * Enforce padding around `beforeAll` blocks
4868
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-before-all-blocks.md
4869
+ */
4870
+ 'test/padding-around-before-all-blocks'?: Linter.RuleEntry<[]>
4871
+ /**
4872
+ * Enforce padding around `beforeEach` blocks
4873
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-before-each-blocks.md
4874
+ */
4875
+ 'test/padding-around-before-each-blocks'?: Linter.RuleEntry<[]>
4876
+ /**
4877
+ * Enforce padding around `describe` blocks
4878
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-describe-blocks.md
4879
+ */
4880
+ 'test/padding-around-describe-blocks'?: Linter.RuleEntry<[]>
4881
+ /**
4882
+ * Enforce padding around `expect` groups
4883
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-expect-groups.md
4884
+ */
4885
+ 'test/padding-around-expect-groups'?: Linter.RuleEntry<[]>
4886
+ /**
4887
+ * Enforce padding around afterAll blocks
4888
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
4889
+ */
4890
+ 'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>
4856
4891
  /**
4857
4892
  * enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
4858
4893
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
@@ -6687,7 +6722,7 @@ interface RuleOptions {
6687
6722
  */
6688
6723
  'vue/jsx-uses-vars'?: Linter.RuleEntry<[]>
6689
6724
  /**
6690
- * Enforce consistent spacing between keys and values in object literal properties in `<template>`
6725
+ * Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`
6691
6726
  * @see https://eslint.vuejs.org/rules/key-spacing.html
6692
6727
  */
6693
6728
  'vue/key-spacing'?: Linter.RuleEntry<VueKeySpacing>
@@ -7360,7 +7395,7 @@ interface RuleOptions {
7360
7395
  */
7361
7396
  'vue/prop-name-casing'?: Linter.RuleEntry<VuePropNameCasing>
7362
7397
  /**
7363
- * Require quotes around object literal property names in `<template>`
7398
+ * Require quotes around object literal, type literal, interfaces and enums property names in `<template>`
7364
7399
  * @see https://eslint.vuejs.org/rules/quote-props.html
7365
7400
  */
7366
7401
  'vue/quote-props'?: Linter.RuleEntry<VueQuoteProps>
@@ -12037,6 +12072,7 @@ type StyleTypeAnnotationSpacing = []|[{
12037
12072
  parameter?: _StyleTypeAnnotationSpacing_SpacingConfig
12038
12073
  property?: _StyleTypeAnnotationSpacing_SpacingConfig
12039
12074
  returnType?: _StyleTypeAnnotationSpacing_SpacingConfig
12075
+ operator?: _StyleTypeAnnotationSpacing_SpacingConfig
12040
12076
  }
12041
12077
  }]
12042
12078
  interface _StyleTypeAnnotationSpacing_SpacingConfig {
@@ -15255,6 +15291,14 @@ interface OptionsComponentExts {
15255
15291
  */
15256
15292
  componentExts?: Array<string>;
15257
15293
  }
15294
+ interface OptionsUnicorn {
15295
+ /**
15296
+ * Include all rules recommended by `eslint-plugin-unicorn`, instead of only ones picked by Anthony.
15297
+ *
15298
+ * @default false
15299
+ */
15300
+ allRecommended?: boolean;
15301
+ }
15258
15302
  interface OptionsTypeScriptParserOptions {
15259
15303
  /**
15260
15304
  * Additional parser options for TypeScript.
@@ -15352,6 +15396,12 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
15352
15396
  * @default true
15353
15397
  */
15354
15398
  jsx?: boolean;
15399
+ /**
15400
+ * Options for eslint-plugin-unicorn.
15401
+ *
15402
+ * @default true
15403
+ */
15404
+ unicorn?: boolean | OptionsUnicorn;
15355
15405
  /**
15356
15406
  * Enable test support.
15357
15407
  *
@@ -15489,7 +15539,7 @@ declare function comments(): Promise<Array<TypedFlatConfigItem>>;
15489
15539
 
15490
15540
  declare function formatters(options?: OptionsFormatters | true, stylistic?: StylisticConfig): Promise<Array<TypedFlatConfigItem>>;
15491
15541
 
15492
- declare function ignores(): Promise<Array<TypedFlatConfigItem>>;
15542
+ declare function ignores(userIgnores?: Array<string>): Promise<Array<TypedFlatConfigItem>>;
15493
15543
 
15494
15544
  declare function imports(options?: OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
15495
15545
 
@@ -15546,7 +15596,7 @@ declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylist
15546
15596
 
15547
15597
  declare function typescript(options?: OptionsComponentExts & OptionsFiles & OptionsOverrides & OptionsProjectType & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
15548
15598
 
15549
- declare function unicorn(): Promise<Array<TypedFlatConfigItem>>;
15599
+ declare function unicorn(options?: OptionsUnicorn): Promise<Array<TypedFlatConfigItem>>;
15550
15600
 
15551
15601
  declare function unocss(options?: OptionsUnoCSS): Promise<Array<TypedFlatConfigItem>>;
15552
15602
 
@@ -15659,4 +15709,4 @@ declare function ensurePackages(packages: Array<string | undefined>): Promise<vo
15659
15709
  declare function isInEditorEnv(): boolean;
15660
15710
  declare function isInGitHooksOrLintStaged(): boolean;
15661
15711
 
15662
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, STYLISTIC_CONFIG_DEFAULTS, type StylisticConfig, type StylisticOptions, type TypedFlatConfigItem, astro, combineConfigs, command, comments, defaultPluginRenaming, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, solid, sonar, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vinicuncaESLint, vue, yaml };
15712
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, STYLISTIC_CONFIG_DEFAULTS, type StylisticConfig, type StylisticOptions, type TypedFlatConfigItem, astro, combineConfigs, command, comments, defaultPluginRenaming, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, solid, sonar, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vinicuncaESLint, vue, yaml };
package/dist/index.d.ts CHANGED
@@ -646,233 +646,233 @@ interface RuleOptions {
646
646
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
647
647
  /**
648
648
  * Enforce or ban the use of inline type-only markers for named imports.
649
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/consistent-type-specifier-style.md
649
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/consistent-type-specifier-style.md
650
650
  */
651
651
  'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
652
652
  /**
653
653
  * Ensure a default export is present, given a default import.
654
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/default.md
654
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/default.md
655
655
  */
656
656
  'import/default'?: Linter.RuleEntry<[]>
657
657
  /**
658
658
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
659
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/dynamic-import-chunkname.md
659
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/dynamic-import-chunkname.md
660
660
  */
661
661
  'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
662
662
  /**
663
663
  * Forbid any invalid exports, i.e. re-export of the same name.
664
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/export.md
664
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/export.md
665
665
  */
666
666
  'import/export'?: Linter.RuleEntry<[]>
667
667
  /**
668
668
  * Ensure all exports appear after other statements.
669
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/exports-last.md
669
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/exports-last.md
670
670
  */
671
671
  'import/exports-last'?: Linter.RuleEntry<[]>
672
672
  /**
673
673
  * Ensure consistent use of file extension within the import path.
674
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/extensions.md
674
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/extensions.md
675
675
  */
676
676
  'import/extensions'?: Linter.RuleEntry<ImportExtensions>
677
677
  /**
678
678
  * Ensure all imports appear before other statements.
679
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/first.md
679
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/first.md
680
680
  */
681
681
  'import/first'?: Linter.RuleEntry<ImportFirst>
682
682
  /**
683
683
  * Prefer named exports to be grouped together in a single export declaration.
684
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/group-exports.md
684
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/group-exports.md
685
685
  */
686
686
  'import/group-exports'?: Linter.RuleEntry<[]>
687
687
  /**
688
688
  * Replaced by `import-x/first`.
689
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/imports-first.md
689
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/imports-first.md
690
690
  * @deprecated
691
691
  */
692
692
  'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
693
693
  /**
694
694
  * Enforce the maximum number of dependencies a module can have.
695
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/max-dependencies.md
695
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/max-dependencies.md
696
696
  */
697
697
  'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
698
698
  /**
699
699
  * Ensure named imports correspond to a named export in the remote file.
700
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/named.md
700
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/named.md
701
701
  */
702
702
  'import/named'?: Linter.RuleEntry<ImportNamed>
703
703
  /**
704
704
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
705
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/namespace.md
705
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/namespace.md
706
706
  */
707
707
  'import/namespace'?: Linter.RuleEntry<ImportNamespace>
708
708
  /**
709
709
  * Enforce a newline after import statements.
710
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/newline-after-import.md
710
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/newline-after-import.md
711
711
  */
712
712
  'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
713
713
  /**
714
714
  * Forbid import of modules using absolute paths.
715
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-absolute-path.md
715
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-absolute-path.md
716
716
  */
717
717
  'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
718
718
  /**
719
719
  * Forbid AMD `require` and `define` calls.
720
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-amd.md
720
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-amd.md
721
721
  */
722
722
  'import/no-amd'?: Linter.RuleEntry<[]>
723
723
  /**
724
724
  * Forbid anonymous values as default exports.
725
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-anonymous-default-export.md
725
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-anonymous-default-export.md
726
726
  */
727
727
  'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
728
728
  /**
729
729
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
730
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-commonjs.md
730
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-commonjs.md
731
731
  */
732
732
  'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
733
733
  /**
734
734
  * Forbid a module from importing a module with a dependency path back to itself.
735
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-cycle.md
735
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-cycle.md
736
736
  */
737
737
  'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
738
738
  /**
739
739
  * Forbid default exports.
740
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-default-export.md
740
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-default-export.md
741
741
  */
742
742
  'import/no-default-export'?: Linter.RuleEntry<[]>
743
743
  /**
744
744
  * Forbid imported names marked with `@deprecated` documentation tag.
745
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-deprecated.md
745
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-deprecated.md
746
746
  */
747
747
  'import/no-deprecated'?: Linter.RuleEntry<[]>
748
748
  /**
749
749
  * Forbid repeated import of the same module in multiple places.
750
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-duplicates.md
750
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-duplicates.md
751
751
  */
752
752
  'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
753
753
  /**
754
754
  * Forbid `require()` calls with expressions.
755
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-dynamic-require.md
755
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-dynamic-require.md
756
756
  */
757
757
  'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
758
758
  /**
759
759
  * Forbid empty named import blocks.
760
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-empty-named-blocks.md
760
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-empty-named-blocks.md
761
761
  */
762
762
  'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
763
763
  /**
764
764
  * Forbid the use of extraneous packages.
765
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-extraneous-dependencies.md
765
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-extraneous-dependencies.md
766
766
  */
767
767
  'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
768
768
  /**
769
769
  * Forbid import statements with CommonJS module.exports.
770
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-import-module-exports.md
770
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-import-module-exports.md
771
771
  */
772
772
  'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
773
773
  /**
774
774
  * Forbid importing the submodules of other modules.
775
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-internal-modules.md
775
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-internal-modules.md
776
776
  */
777
777
  'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
778
778
  /**
779
779
  * Forbid the use of mutable exports with `var` or `let`.
780
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-mutable-exports.md
780
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-mutable-exports.md
781
781
  */
782
782
  'import/no-mutable-exports'?: Linter.RuleEntry<[]>
783
783
  /**
784
784
  * Forbid use of exported name as identifier of default export.
785
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-as-default.md
785
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-as-default.md
786
786
  */
787
787
  'import/no-named-as-default'?: Linter.RuleEntry<[]>
788
788
  /**
789
789
  * Forbid use of exported name as property of default export.
790
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-as-default-member.md
790
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-as-default-member.md
791
791
  */
792
792
  'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
793
793
  /**
794
794
  * Forbid named default exports.
795
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-default.md
795
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-default.md
796
796
  */
797
797
  'import/no-named-default'?: Linter.RuleEntry<[]>
798
798
  /**
799
799
  * Forbid named exports.
800
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-export.md
800
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-named-export.md
801
801
  */
802
802
  'import/no-named-export'?: Linter.RuleEntry<[]>
803
803
  /**
804
804
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
805
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-namespace.md
805
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-namespace.md
806
806
  */
807
807
  'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
808
808
  /**
809
809
  * Forbid Node.js builtin modules.
810
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-nodejs-modules.md
810
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-nodejs-modules.md
811
811
  */
812
812
  'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
813
813
  /**
814
814
  * Forbid importing packages through relative paths.
815
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-relative-packages.md
815
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-relative-packages.md
816
816
  */
817
817
  'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
818
818
  /**
819
819
  * Forbid importing modules from parent directories.
820
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-relative-parent-imports.md
820
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-relative-parent-imports.md
821
821
  */
822
822
  'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
823
823
  /**
824
824
  * Forbid importing a default export by a different name.
825
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-rename-default.md
825
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-rename-default.md
826
826
  */
827
827
  'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
828
828
  /**
829
829
  * Enforce which files can be imported in a given folder.
830
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-restricted-paths.md
830
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-restricted-paths.md
831
831
  */
832
832
  'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
833
833
  /**
834
834
  * Forbid a module from importing itself.
835
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-self-import.md
835
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-self-import.md
836
836
  */
837
837
  'import/no-self-import'?: Linter.RuleEntry<[]>
838
838
  /**
839
839
  * Forbid unassigned imports.
840
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unassigned-import.md
840
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-unassigned-import.md
841
841
  */
842
842
  'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
843
843
  /**
844
844
  * Ensure imports point to a file/module that can be resolved.
845
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unresolved.md
845
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-unresolved.md
846
846
  */
847
847
  'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
848
848
  /**
849
849
  * Forbid modules without exports, or exports without matching import in another module.
850
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unused-modules.md
850
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-unused-modules.md
851
851
  */
852
852
  'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
853
853
  /**
854
854
  * Forbid unnecessary path segments in import and require statements.
855
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-useless-path-segments.md
855
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-useless-path-segments.md
856
856
  */
857
857
  'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
858
858
  /**
859
859
  * Forbid webpack loader syntax in imports.
860
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-webpack-loader-syntax.md
860
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/no-webpack-loader-syntax.md
861
861
  */
862
862
  'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
863
863
  /**
864
864
  * Enforce a convention in module import order.
865
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/order.md
865
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/order.md
866
866
  */
867
867
  'import/order'?: Linter.RuleEntry<ImportOrder>
868
868
  /**
869
869
  * Prefer a default export if module exports a single name or multiple names.
870
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/prefer-default-export.md
870
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/prefer-default-export.md
871
871
  */
872
872
  'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
873
873
  /**
874
874
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
875
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/unambiguous.md
875
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.1/docs/rules/unambiguous.md
876
876
  */
877
877
  'import/unambiguous'?: Linter.RuleEntry<[]>
878
878
  /**
@@ -4732,11 +4732,6 @@ interface RuleOptions {
4732
4732
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
4733
4733
  */
4734
4734
  'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
4735
- /**
4736
- * Enforce padding around afterAll blocks
4737
- * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/index.md
4738
- */
4739
- 'test/index'?: Linter.RuleEntry<[]>
4740
4735
  /**
4741
4736
  * enforce a maximum number of expect per test
4742
4737
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
@@ -4853,6 +4848,46 @@ interface RuleOptions {
4853
4848
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
4854
4849
  */
4855
4850
  'test/no-test-return-statement'?: Linter.RuleEntry<[]>
4851
+ /**
4852
+ * Enforce padding around `afterAll` blocks
4853
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
4854
+ */
4855
+ 'test/padding-around-after-all-blocks'?: Linter.RuleEntry<[]>
4856
+ /**
4857
+ * Enforce padding around `afterEach` blocks
4858
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-each-blocks.md
4859
+ */
4860
+ 'test/padding-around-after-each-blocks'?: Linter.RuleEntry<[]>
4861
+ /**
4862
+ * Enforce padding around vitest functions
4863
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-all.md
4864
+ */
4865
+ 'test/padding-around-all'?: Linter.RuleEntry<[]>
4866
+ /**
4867
+ * Enforce padding around `beforeAll` blocks
4868
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-before-all-blocks.md
4869
+ */
4870
+ 'test/padding-around-before-all-blocks'?: Linter.RuleEntry<[]>
4871
+ /**
4872
+ * Enforce padding around `beforeEach` blocks
4873
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-before-each-blocks.md
4874
+ */
4875
+ 'test/padding-around-before-each-blocks'?: Linter.RuleEntry<[]>
4876
+ /**
4877
+ * Enforce padding around `describe` blocks
4878
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-describe-blocks.md
4879
+ */
4880
+ 'test/padding-around-describe-blocks'?: Linter.RuleEntry<[]>
4881
+ /**
4882
+ * Enforce padding around `expect` groups
4883
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-expect-groups.md
4884
+ */
4885
+ 'test/padding-around-expect-groups'?: Linter.RuleEntry<[]>
4886
+ /**
4887
+ * Enforce padding around afterAll blocks
4888
+ * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
4889
+ */
4890
+ 'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>
4856
4891
  /**
4857
4892
  * enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
4858
4893
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
@@ -6687,7 +6722,7 @@ interface RuleOptions {
6687
6722
  */
6688
6723
  'vue/jsx-uses-vars'?: Linter.RuleEntry<[]>
6689
6724
  /**
6690
- * Enforce consistent spacing between keys and values in object literal properties in `<template>`
6725
+ * Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`
6691
6726
  * @see https://eslint.vuejs.org/rules/key-spacing.html
6692
6727
  */
6693
6728
  'vue/key-spacing'?: Linter.RuleEntry<VueKeySpacing>
@@ -7360,7 +7395,7 @@ interface RuleOptions {
7360
7395
  */
7361
7396
  'vue/prop-name-casing'?: Linter.RuleEntry<VuePropNameCasing>
7362
7397
  /**
7363
- * Require quotes around object literal property names in `<template>`
7398
+ * Require quotes around object literal, type literal, interfaces and enums property names in `<template>`
7364
7399
  * @see https://eslint.vuejs.org/rules/quote-props.html
7365
7400
  */
7366
7401
  'vue/quote-props'?: Linter.RuleEntry<VueQuoteProps>
@@ -12037,6 +12072,7 @@ type StyleTypeAnnotationSpacing = []|[{
12037
12072
  parameter?: _StyleTypeAnnotationSpacing_SpacingConfig
12038
12073
  property?: _StyleTypeAnnotationSpacing_SpacingConfig
12039
12074
  returnType?: _StyleTypeAnnotationSpacing_SpacingConfig
12075
+ operator?: _StyleTypeAnnotationSpacing_SpacingConfig
12040
12076
  }
12041
12077
  }]
12042
12078
  interface _StyleTypeAnnotationSpacing_SpacingConfig {
@@ -15255,6 +15291,14 @@ interface OptionsComponentExts {
15255
15291
  */
15256
15292
  componentExts?: Array<string>;
15257
15293
  }
15294
+ interface OptionsUnicorn {
15295
+ /**
15296
+ * Include all rules recommended by `eslint-plugin-unicorn`, instead of only ones picked by Anthony.
15297
+ *
15298
+ * @default false
15299
+ */
15300
+ allRecommended?: boolean;
15301
+ }
15258
15302
  interface OptionsTypeScriptParserOptions {
15259
15303
  /**
15260
15304
  * Additional parser options for TypeScript.
@@ -15352,6 +15396,12 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
15352
15396
  * @default true
15353
15397
  */
15354
15398
  jsx?: boolean;
15399
+ /**
15400
+ * Options for eslint-plugin-unicorn.
15401
+ *
15402
+ * @default true
15403
+ */
15404
+ unicorn?: boolean | OptionsUnicorn;
15355
15405
  /**
15356
15406
  * Enable test support.
15357
15407
  *
@@ -15489,7 +15539,7 @@ declare function comments(): Promise<Array<TypedFlatConfigItem>>;
15489
15539
 
15490
15540
  declare function formatters(options?: OptionsFormatters | true, stylistic?: StylisticConfig): Promise<Array<TypedFlatConfigItem>>;
15491
15541
 
15492
- declare function ignores(): Promise<Array<TypedFlatConfigItem>>;
15542
+ declare function ignores(userIgnores?: Array<string>): Promise<Array<TypedFlatConfigItem>>;
15493
15543
 
15494
15544
  declare function imports(options?: OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
15495
15545
 
@@ -15546,7 +15596,7 @@ declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylist
15546
15596
 
15547
15597
  declare function typescript(options?: OptionsComponentExts & OptionsFiles & OptionsOverrides & OptionsProjectType & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
15548
15598
 
15549
- declare function unicorn(): Promise<Array<TypedFlatConfigItem>>;
15599
+ declare function unicorn(options?: OptionsUnicorn): Promise<Array<TypedFlatConfigItem>>;
15550
15600
 
15551
15601
  declare function unocss(options?: OptionsUnoCSS): Promise<Array<TypedFlatConfigItem>>;
15552
15602
 
@@ -15659,4 +15709,4 @@ declare function ensurePackages(packages: Array<string | undefined>): Promise<vo
15659
15709
  declare function isInEditorEnv(): boolean;
15660
15710
  declare function isInGitHooksOrLintStaged(): boolean;
15661
15711
 
15662
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, STYLISTIC_CONFIG_DEFAULTS, type StylisticConfig, type StylisticOptions, type TypedFlatConfigItem, astro, combineConfigs, command, comments, defaultPluginRenaming, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, solid, sonar, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vinicuncaESLint, vue, yaml };
15712
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, STYLISTIC_CONFIG_DEFAULTS, type StylisticConfig, type StylisticOptions, type TypedFlatConfigItem, astro, combineConfigs, command, comments, defaultPluginRenaming, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, solid, sonar, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vinicuncaESLint, vue, yaml };
package/dist/index.js CHANGED
@@ -661,10 +661,14 @@ async function formatters(options = {}, stylistic2 = {}) {
661
661
  }
662
662
 
663
663
  // src/configs/ignores.ts
664
- async function ignores() {
664
+ async function ignores(userIgnores = []) {
665
665
  return [
666
666
  {
667
- ignores: GLOB_EXCLUDE
667
+ ignores: [
668
+ ...GLOB_EXCLUDE,
669
+ ...userIgnores
670
+ ],
671
+ name: "vinicunca/ignores"
668
672
  }
669
673
  ];
670
674
  }
@@ -875,10 +879,7 @@ async function javascript(options = {}) {
875
879
  ],
876
880
  "no-restricted-syntax": [
877
881
  ERROR,
878
- "DebuggerStatement",
879
882
  "ForInStatement",
880
- "LabeledStatement",
881
- "WithStatement",
882
883
  "TSEnumDeclaration[const=true]",
883
884
  "TSExportAssignment"
884
885
  ],
@@ -2126,7 +2127,7 @@ async function typescript(options = {}) {
2126
2127
  }
2127
2128
 
2128
2129
  // src/configs/unicorn.ts
2129
- async function unicorn() {
2130
+ async function unicorn(options = {}) {
2130
2131
  return [
2131
2132
  {
2132
2133
  name: "vinicunca/unicorn/rules",
@@ -2134,19 +2135,21 @@ async function unicorn() {
2134
2135
  unicorn: default7
2135
2136
  },
2136
2137
  rules: {
2137
- "unicorn/error-message": ERROR,
2138
- "unicorn/escape-case": ERROR,
2139
- "unicorn/no-instanceof-array": ERROR,
2140
- "unicorn/no-new-array": ERROR,
2141
- "unicorn/no-new-buffer": ERROR,
2142
- "unicorn/number-literal-case": ERROR,
2143
- "unicorn/prefer-dom-node-text-content": ERROR,
2144
- "unicorn/prefer-includes": ERROR,
2145
- "unicorn/prefer-node-protocol": ERROR,
2146
- "unicorn/prefer-number-properties": ERROR,
2147
- "unicorn/prefer-string-starts-ends-with": ERROR,
2148
- "unicorn/prefer-type-error": ERROR,
2149
- "unicorn/throw-new-error": ERROR
2138
+ ...options.allRecommended ? default7.configs["flat/recommended"].rules : {
2139
+ "unicorn/error-message": ERROR,
2140
+ "unicorn/escape-case": ERROR,
2141
+ "unicorn/no-instanceof-array": ERROR,
2142
+ "unicorn/no-new-array": ERROR,
2143
+ "unicorn/no-new-buffer": ERROR,
2144
+ "unicorn/number-literal-case": ERROR,
2145
+ "unicorn/prefer-dom-node-text-content": ERROR,
2146
+ "unicorn/prefer-includes": ERROR,
2147
+ "unicorn/prefer-node-protocol": ERROR,
2148
+ "unicorn/prefer-number-properties": ERROR,
2149
+ "unicorn/prefer-string-starts-ends-with": ERROR,
2150
+ "unicorn/prefer-type-error": ERROR,
2151
+ "unicorn/throw-new-error": ERROR
2152
+ }
2150
2153
  }
2151
2154
  }
2152
2155
  ];
@@ -2416,8 +2419,6 @@ async function yaml(options = {}) {
2416
2419
  // src/base.ts
2417
2420
  var flatConfigProps = [
2418
2421
  "name",
2419
- "files",
2420
- "ignores",
2421
2422
  "languageOptions",
2422
2423
  "linterOptions",
2423
2424
  "processor",
@@ -2456,6 +2457,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2456
2457
  solid: enableSolid = false,
2457
2458
  svelte: enableSvelte = false,
2458
2459
  typescript: enableTypeScript = isPackageExists4("typescript"),
2460
+ unicorn: enableUnicorn = true,
2459
2461
  unocss: enableUnoCSS = false,
2460
2462
  vue: enableVue = VuePackages.some((i) => isPackageExists4(i))
2461
2463
  } = options;
@@ -2480,15 +2482,21 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2480
2482
  const configs2 = [];
2481
2483
  if (enableGitignore) {
2482
2484
  if (!e(enableGitignore)) {
2483
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2(enableGitignore)]));
2485
+ configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
2486
+ name: "vinicunca/gitignore",
2487
+ ...enableGitignore
2488
+ })]));
2484
2489
  } else {
2485
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({ strict: false })]));
2490
+ configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
2491
+ name: "vinicunca/gitignore",
2492
+ strict: false
2493
+ })]));
2486
2494
  }
2487
2495
  }
2488
2496
  const typescriptOptions = resolveSubOptions(options, "typescript");
2489
2497
  const tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
2490
2498
  configs2.push(
2491
- ignores(),
2499
+ ignores(options.ignores),
2492
2500
  javascript({
2493
2501
  isInEditor,
2494
2502
  overrides: getOverrides(options, "javascript")
@@ -2501,11 +2509,15 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2501
2509
  imports({
2502
2510
  stylistic: stylisticOptions
2503
2511
  }),
2504
- unicorn(),
2505
2512
  command(),
2506
2513
  perfectionist(),
2507
2514
  sonar()
2508
2515
  );
2516
+ if (enableUnicorn) {
2517
+ configs2.push(
2518
+ unicorn(enableUnicorn === true ? {} : enableUnicorn)
2519
+ );
2520
+ }
2509
2521
  if (enableVue) {
2510
2522
  componentExts.push("vue");
2511
2523
  }
@@ -2613,6 +2625,9 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2613
2625
  e(stylisticOptions) ? {} : stylisticOptions
2614
2626
  ));
2615
2627
  }
2628
+ if ("files" in options) {
2629
+ throw new Error('[@vinicunca/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');
2630
+ }
2616
2631
  const fusedConfig = flatConfigProps.reduce((acc, key) => {
2617
2632
  if (key in options) {
2618
2633
  acc[key] = options[key];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "2.9.7",
4
+ "version": "2.10.0",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -59,7 +59,7 @@
59
59
  "@prettier/plugin-xml": "^3.4.1",
60
60
  "@unocss/eslint-plugin": ">=0.50.0",
61
61
  "astro-eslint-parser": "^1.0.2",
62
- "eslint": ">=8.40.0",
62
+ "eslint": "^9.5.0",
63
63
  "eslint-plugin-astro": "^1.2.0",
64
64
  "eslint-plugin-react-hooks": "^4.6.0",
65
65
  "eslint-plugin-react-refresh": "^0.4.4",
@@ -111,19 +111,19 @@
111
111
  "@antfu/install-pkg": "^0.4.1",
112
112
  "@clack/prompts": "^0.7.0",
113
113
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
114
- "@eslint-react/eslint-plugin": "^1.12.2",
115
- "@stylistic/eslint-plugin": "^2.6.4",
114
+ "@eslint-react/eslint-plugin": "^1.12.3",
115
+ "@stylistic/eslint-plugin": "^2.7.1",
116
116
  "@typescript-eslint/eslint-plugin": "^8.3.0",
117
117
  "@typescript-eslint/parser": "^8.3.0",
118
118
  "@unocss/eslint-plugin": "^0.62.3",
119
- "@vitest/eslint-plugin": "^1.0.5",
120
- "eslint-config-flat-gitignore": "^0.1.8",
119
+ "@vitest/eslint-plugin": "^1.1.0",
120
+ "eslint-config-flat-gitignore": "^0.3.0",
121
121
  "eslint-flat-config-utils": "^0.3.1",
122
122
  "eslint-merge-processors": "^0.1.0",
123
123
  "eslint-plugin-antfu": "^2.3.6",
124
124
  "eslint-plugin-command": "^0.2.3",
125
125
  "eslint-plugin-format": "^0.1.2",
126
- "eslint-plugin-import-x": "^4.1.0",
126
+ "eslint-plugin-import-x": "^4.1.1",
127
127
  "eslint-plugin-jsdoc": "^50.2.2",
128
128
  "eslint-plugin-jsonc": "^2.16.0",
129
129
  "eslint-plugin-markdown": "^5.1.0",