@ntnyq/eslint-config 5.0.0-beta.8 → 5.0.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/README.md +3 -0
- package/dist/index.d.ts +74 -47
- package/dist/index.js +1 -3
- package/package.json +19 -18
package/README.md
CHANGED
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
- NodeJS v20.11.0+
|
|
16
16
|
- ESLint v9.20.0+
|
|
17
17
|
|
|
18
|
+
> [!TIP]
|
|
19
|
+
> For NodeJS v18 support, please use [v4](https://github.com/ntnyq/eslint-config/tree/v4)
|
|
20
|
+
|
|
18
21
|
## Features
|
|
19
22
|
|
|
20
23
|
- Designed to work alongside with [Prettier](https://prettier.io) and [TypeScript](https://www.typescriptlang.org/)
|
package/dist/index.d.ts
CHANGED
|
@@ -2610,233 +2610,238 @@ interface RuleOptions {
|
|
|
2610
2610
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>;
|
|
2611
2611
|
/**
|
|
2612
2612
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
2613
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2613
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/consistent-type-specifier-style.md
|
|
2614
2614
|
*/
|
|
2615
2615
|
'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>;
|
|
2616
2616
|
/**
|
|
2617
2617
|
* Ensure a default export is present, given a default import.
|
|
2618
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2618
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/default.md
|
|
2619
2619
|
*/
|
|
2620
2620
|
'import-x/default'?: Linter.RuleEntry<[]>;
|
|
2621
2621
|
/**
|
|
2622
2622
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
2623
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2623
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/dynamic-import-chunkname.md
|
|
2624
2624
|
*/
|
|
2625
2625
|
'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>;
|
|
2626
2626
|
/**
|
|
2627
2627
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
2628
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2628
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/export.md
|
|
2629
2629
|
*/
|
|
2630
2630
|
'import-x/export'?: Linter.RuleEntry<[]>;
|
|
2631
2631
|
/**
|
|
2632
2632
|
* Ensure all exports appear after other statements.
|
|
2633
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2633
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/exports-last.md
|
|
2634
2634
|
*/
|
|
2635
2635
|
'import-x/exports-last'?: Linter.RuleEntry<[]>;
|
|
2636
2636
|
/**
|
|
2637
2637
|
* Ensure consistent use of file extension within the import path.
|
|
2638
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2638
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/extensions.md
|
|
2639
2639
|
*/
|
|
2640
2640
|
'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>;
|
|
2641
2641
|
/**
|
|
2642
2642
|
* Ensure all imports appear before other statements.
|
|
2643
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2643
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/first.md
|
|
2644
2644
|
*/
|
|
2645
2645
|
'import-x/first'?: Linter.RuleEntry<ImportXFirst>;
|
|
2646
2646
|
/**
|
|
2647
2647
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
2648
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2648
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/group-exports.md
|
|
2649
2649
|
*/
|
|
2650
2650
|
'import-x/group-exports'?: Linter.RuleEntry<[]>;
|
|
2651
2651
|
/**
|
|
2652
2652
|
* Replaced by `import-x/first`.
|
|
2653
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2653
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/imports-first.md
|
|
2654
2654
|
* @deprecated
|
|
2655
2655
|
*/
|
|
2656
2656
|
'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>;
|
|
2657
2657
|
/**
|
|
2658
2658
|
* Enforce the maximum number of dependencies a module can have.
|
|
2659
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2659
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/max-dependencies.md
|
|
2660
2660
|
*/
|
|
2661
2661
|
'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>;
|
|
2662
2662
|
/**
|
|
2663
2663
|
* Ensure named imports correspond to a named export in the remote file.
|
|
2664
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2664
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/named.md
|
|
2665
2665
|
*/
|
|
2666
2666
|
'import-x/named'?: Linter.RuleEntry<ImportXNamed>;
|
|
2667
2667
|
/**
|
|
2668
2668
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
2669
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2669
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/namespace.md
|
|
2670
2670
|
*/
|
|
2671
2671
|
'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>;
|
|
2672
2672
|
/**
|
|
2673
2673
|
* Enforce a newline after import statements.
|
|
2674
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2674
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/newline-after-import.md
|
|
2675
2675
|
*/
|
|
2676
2676
|
'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>;
|
|
2677
2677
|
/**
|
|
2678
2678
|
* Forbid import of modules using absolute paths.
|
|
2679
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2679
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-absolute-path.md
|
|
2680
2680
|
*/
|
|
2681
2681
|
'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>;
|
|
2682
2682
|
/**
|
|
2683
2683
|
* Forbid AMD `require` and `define` calls.
|
|
2684
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2684
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-amd.md
|
|
2685
2685
|
*/
|
|
2686
2686
|
'import-x/no-amd'?: Linter.RuleEntry<[]>;
|
|
2687
2687
|
/**
|
|
2688
2688
|
* Forbid anonymous values as default exports.
|
|
2689
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2689
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-anonymous-default-export.md
|
|
2690
2690
|
*/
|
|
2691
2691
|
'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>;
|
|
2692
2692
|
/**
|
|
2693
2693
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
2694
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2694
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-commonjs.md
|
|
2695
2695
|
*/
|
|
2696
2696
|
'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>;
|
|
2697
2697
|
/**
|
|
2698
2698
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
2699
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2699
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-cycle.md
|
|
2700
2700
|
*/
|
|
2701
2701
|
'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>;
|
|
2702
2702
|
/**
|
|
2703
2703
|
* Forbid default exports.
|
|
2704
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2704
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-default-export.md
|
|
2705
2705
|
*/
|
|
2706
2706
|
'import-x/no-default-export'?: Linter.RuleEntry<[]>;
|
|
2707
2707
|
/**
|
|
2708
2708
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
2709
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2709
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-deprecated.md
|
|
2710
2710
|
*/
|
|
2711
2711
|
'import-x/no-deprecated'?: Linter.RuleEntry<[]>;
|
|
2712
2712
|
/**
|
|
2713
2713
|
* Forbid repeated import of the same module in multiple places.
|
|
2714
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2714
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-duplicates.md
|
|
2715
2715
|
*/
|
|
2716
2716
|
'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>;
|
|
2717
2717
|
/**
|
|
2718
2718
|
* Forbid `require()` calls with expressions.
|
|
2719
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2719
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-dynamic-require.md
|
|
2720
2720
|
*/
|
|
2721
2721
|
'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>;
|
|
2722
2722
|
/**
|
|
2723
2723
|
* Forbid empty named import blocks.
|
|
2724
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2724
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-empty-named-blocks.md
|
|
2725
2725
|
*/
|
|
2726
2726
|
'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>;
|
|
2727
2727
|
/**
|
|
2728
2728
|
* Forbid the use of extraneous packages.
|
|
2729
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2729
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-extraneous-dependencies.md
|
|
2730
2730
|
*/
|
|
2731
2731
|
'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>;
|
|
2732
2732
|
/**
|
|
2733
2733
|
* Forbid import statements with CommonJS module.exports.
|
|
2734
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2734
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-import-module-exports.md
|
|
2735
2735
|
*/
|
|
2736
2736
|
'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>;
|
|
2737
2737
|
/**
|
|
2738
2738
|
* Forbid importing the submodules of other modules.
|
|
2739
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2739
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-internal-modules.md
|
|
2740
2740
|
*/
|
|
2741
2741
|
'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>;
|
|
2742
2742
|
/**
|
|
2743
2743
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
2744
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2744
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-mutable-exports.md
|
|
2745
2745
|
*/
|
|
2746
2746
|
'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>;
|
|
2747
2747
|
/**
|
|
2748
2748
|
* Forbid use of exported name as identifier of default export.
|
|
2749
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2749
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default.md
|
|
2750
2750
|
*/
|
|
2751
2751
|
'import-x/no-named-as-default'?: Linter.RuleEntry<[]>;
|
|
2752
2752
|
/**
|
|
2753
2753
|
* Forbid use of exported name as property of default export.
|
|
2754
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2754
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default-member.md
|
|
2755
2755
|
*/
|
|
2756
2756
|
'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>;
|
|
2757
2757
|
/**
|
|
2758
2758
|
* Forbid named default exports.
|
|
2759
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2759
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-default.md
|
|
2760
2760
|
*/
|
|
2761
2761
|
'import-x/no-named-default'?: Linter.RuleEntry<[]>;
|
|
2762
2762
|
/**
|
|
2763
2763
|
* Forbid named exports.
|
|
2764
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2764
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-export.md
|
|
2765
2765
|
*/
|
|
2766
2766
|
'import-x/no-named-export'?: Linter.RuleEntry<[]>;
|
|
2767
2767
|
/**
|
|
2768
2768
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
2769
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2769
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-namespace.md
|
|
2770
2770
|
*/
|
|
2771
2771
|
'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>;
|
|
2772
2772
|
/**
|
|
2773
2773
|
* Forbid Node.js builtin modules.
|
|
2774
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2774
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-nodejs-modules.md
|
|
2775
2775
|
*/
|
|
2776
2776
|
'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>;
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Forbid importing packages through relative paths.
|
|
2779
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2779
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-packages.md
|
|
2780
2780
|
*/
|
|
2781
2781
|
'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>;
|
|
2782
2782
|
/**
|
|
2783
2783
|
* Forbid importing modules from parent directories.
|
|
2784
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2784
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-parent-imports.md
|
|
2785
2785
|
*/
|
|
2786
2786
|
'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>;
|
|
2787
2787
|
/**
|
|
2788
2788
|
* Forbid importing a default export by a different name.
|
|
2789
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2789
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-rename-default.md
|
|
2790
2790
|
*/
|
|
2791
2791
|
'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>;
|
|
2792
2792
|
/**
|
|
2793
2793
|
* Enforce which files can be imported in a given folder.
|
|
2794
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2794
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-restricted-paths.md
|
|
2795
2795
|
*/
|
|
2796
2796
|
'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>;
|
|
2797
2797
|
/**
|
|
2798
2798
|
* Forbid a module from importing itself.
|
|
2799
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2799
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-self-import.md
|
|
2800
2800
|
*/
|
|
2801
2801
|
'import-x/no-self-import'?: Linter.RuleEntry<[]>;
|
|
2802
2802
|
/**
|
|
2803
2803
|
* Forbid unassigned imports.
|
|
2804
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2804
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unassigned-import.md
|
|
2805
2805
|
*/
|
|
2806
2806
|
'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>;
|
|
2807
2807
|
/**
|
|
2808
2808
|
* Ensure imports point to a file/module that can be resolved.
|
|
2809
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2809
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unresolved.md
|
|
2810
2810
|
*/
|
|
2811
2811
|
'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>;
|
|
2812
2812
|
/**
|
|
2813
2813
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
2814
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2814
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unused-modules.md
|
|
2815
2815
|
*/
|
|
2816
2816
|
'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>;
|
|
2817
2817
|
/**
|
|
2818
2818
|
* Forbid unnecessary path segments in import and require statements.
|
|
2819
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2819
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-useless-path-segments.md
|
|
2820
2820
|
*/
|
|
2821
2821
|
'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>;
|
|
2822
2822
|
/**
|
|
2823
2823
|
* Forbid webpack loader syntax in imports.
|
|
2824
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2824
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-webpack-loader-syntax.md
|
|
2825
2825
|
*/
|
|
2826
2826
|
'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>;
|
|
2827
2827
|
/**
|
|
2828
2828
|
* Enforce a convention in module import order.
|
|
2829
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2829
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/order.md
|
|
2830
2830
|
*/
|
|
2831
2831
|
'import-x/order'?: Linter.RuleEntry<ImportXOrder>;
|
|
2832
2832
|
/**
|
|
2833
2833
|
* Prefer a default export if module exports a single name or multiple names.
|
|
2834
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2834
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/prefer-default-export.md
|
|
2835
2835
|
*/
|
|
2836
2836
|
'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>;
|
|
2837
|
+
/**
|
|
2838
|
+
* Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc.
|
|
2839
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/prefer-namespace-import.md
|
|
2840
|
+
*/
|
|
2841
|
+
'import-x/prefer-namespace-import'?: Linter.RuleEntry<ImportXPreferNamespaceImport>;
|
|
2837
2842
|
/**
|
|
2838
2843
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
2839
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2844
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md
|
|
2840
2845
|
*/
|
|
2841
2846
|
'import-x/unambiguous'?: Linter.RuleEntry<[]>;
|
|
2842
2847
|
/**
|
|
@@ -6866,6 +6871,16 @@ interface RuleOptions {
|
|
|
6866
6871
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
6867
6872
|
*/
|
|
6868
6873
|
'vitest/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
6874
|
+
/**
|
|
6875
|
+
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
6876
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
6877
|
+
*/
|
|
6878
|
+
'vitest/prefer-called-once'?: Linter.RuleEntry<[]>;
|
|
6879
|
+
/**
|
|
6880
|
+
* enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`
|
|
6881
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-times.md
|
|
6882
|
+
*/
|
|
6883
|
+
'vitest/prefer-called-times'?: Linter.RuleEntry<[]>;
|
|
6869
6884
|
/**
|
|
6870
6885
|
* enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
|
|
6871
6886
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
|
|
@@ -7031,6 +7046,11 @@ interface RuleOptions {
|
|
|
7031
7046
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
|
|
7032
7047
|
*/
|
|
7033
7048
|
'vitest/valid-title'?: Linter.RuleEntry<VitestValidTitle>;
|
|
7049
|
+
/**
|
|
7050
|
+
* disallow `.todo` usage
|
|
7051
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
|
|
7052
|
+
*/
|
|
7053
|
+
'vitest/warn-todo'?: Linter.RuleEntry<[]>;
|
|
7034
7054
|
/**
|
|
7035
7055
|
* Enforce linebreaks after opening and before closing array brackets in `<template>`
|
|
7036
7056
|
* @see https://eslint.vuejs.org/rules/array-bracket-newline.html
|
|
@@ -8992,6 +9012,7 @@ interface _TypescriptEslintNamingConvention_MatchRegexConfig {
|
|
|
8992
9012
|
}
|
|
8993
9013
|
// ----- @typescript-eslint/no-base-to-string -----
|
|
8994
9014
|
type TypescriptEslintNoBaseToString = [] | [{
|
|
9015
|
+
checkUnknown?: boolean;
|
|
8995
9016
|
ignoredTypeNames?: string[];
|
|
8996
9017
|
}];
|
|
8997
9018
|
// ----- @typescript-eslint/no-confusing-void-expression -----
|
|
@@ -10090,6 +10111,10 @@ type ImportXOrder = [] | [{
|
|
|
10090
10111
|
type ImportXPreferDefaultExport = [] | [{
|
|
10091
10112
|
target?: ("single" | "any");
|
|
10092
10113
|
}];
|
|
10114
|
+
// ----- import-x/prefer-namespace-import -----
|
|
10115
|
+
type ImportXPreferNamespaceImport = [] | [{
|
|
10116
|
+
patterns?: string[];
|
|
10117
|
+
}];
|
|
10093
10118
|
// ----- indent -----
|
|
10094
10119
|
type Indent = [] | [("tab" | number)] | [("tab" | number), {
|
|
10095
10120
|
SwitchCase?: number;
|
|
@@ -10319,6 +10344,7 @@ type JsdocMultilineBlocks = [] | [{
|
|
|
10319
10344
|
noMultilineBlocks?: boolean;
|
|
10320
10345
|
noSingleLineBlocks?: boolean;
|
|
10321
10346
|
noZeroLineText?: boolean;
|
|
10347
|
+
requireSingleLineUnderCount?: number;
|
|
10322
10348
|
singleLineTags?: string[];
|
|
10323
10349
|
}];
|
|
10324
10350
|
// ----- jsdoc/no-bad-blocks -----
|
|
@@ -11456,6 +11482,7 @@ type NoConstantCondition = [] | [{
|
|
|
11456
11482
|
// ----- no-duplicate-imports -----
|
|
11457
11483
|
type NoDuplicateImports = [] | [{
|
|
11458
11484
|
includeExports?: boolean;
|
|
11485
|
+
allowSeparateTypeImports?: boolean;
|
|
11459
11486
|
}];
|
|
11460
11487
|
// ----- no-else-return -----
|
|
11461
11488
|
type NoElseReturn = [] | [{
|
|
@@ -14433,7 +14460,7 @@ type SvgoSvgo = [] | [{
|
|
|
14433
14460
|
textStart?: string;
|
|
14434
14461
|
useShortTags?: boolean;
|
|
14435
14462
|
};
|
|
14436
|
-
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "
|
|
14463
|
+
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeAttributesBySelector" | "removeAttrs" | "removeDeprecatedAttrs" | "removeDimensions" | "removeElementsByAttr" | "removeOffCanvasPaths" | "removeRasterImages" | "removeScripts" | "removeStyleElement" | "removeTitle" | "removeViewBox" | "removeXlink" | "removeXMLNS" | "reusePaths") | {
|
|
14437
14464
|
name: "addAttributesToSVGElement";
|
|
14438
14465
|
params?: {
|
|
14439
14466
|
attribute?: (string | {
|
package/dist/index.js
CHANGED
|
@@ -1911,9 +1911,7 @@ const regexper = defineCommand({
|
|
|
1911
1911
|
name: "regexper",
|
|
1912
1912
|
match: /(\b|\s|^)(@regexper)(\s\S+)?(\b|\s|$)/,
|
|
1913
1913
|
action(ctx) {
|
|
1914
|
-
const literal = ctx.findNodeBelow((node) =>
|
|
1915
|
-
return node.type === "Literal" && "regex" in node;
|
|
1916
|
-
});
|
|
1914
|
+
const literal = ctx.findNodeBelow((node) => node.type === "Literal" && "regex" in node);
|
|
1917
1915
|
if (!literal) return ctx.reportError("Unable to find a regexp literal to generate");
|
|
1918
1916
|
const [_fullStr = "", spaceBefore = "", commandStr = "", existingUrl = "", _spaceAfter = ""] = ctx.matches;
|
|
1919
1917
|
const url = `https://regexper.com/#${encodeURIComponent(literal.raw)}`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public",
|
|
36
|
-
"tag": "
|
|
36
|
+
"tag": "latest"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@html-eslint/eslint-plugin": "^0.40.3",
|
|
@@ -88,31 +88,31 @@
|
|
|
88
88
|
"@antfu/install-pkg": "^1.1.0",
|
|
89
89
|
"@clack/prompts": "^0.11.0",
|
|
90
90
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
91
|
-
"@eslint/js": "^9.
|
|
91
|
+
"@eslint/js": "^9.30.0",
|
|
92
92
|
"@eslint/markdown": "^6.6.0",
|
|
93
|
-
"@unocss/eslint-plugin": "^66.2
|
|
94
|
-
"@vitest/eslint-plugin": "^1.
|
|
93
|
+
"@unocss/eslint-plugin": "^66.3.2",
|
|
94
|
+
"@vitest/eslint-plugin": "^1.3.3",
|
|
95
95
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
96
96
|
"eslint-flat-config-utils": "^2.1.0",
|
|
97
|
-
"eslint-import-resolver-typescript": "^4.4.
|
|
97
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
98
98
|
"eslint-merge-processors": "^2.0.0",
|
|
99
99
|
"eslint-parser-plain": "^0.1.1",
|
|
100
100
|
"eslint-plugin-antfu": "^3.1.1",
|
|
101
|
-
"eslint-plugin-command": "^3.3.
|
|
101
|
+
"eslint-plugin-command": "^3.3.1",
|
|
102
102
|
"eslint-plugin-de-morgan": "^1.3.0",
|
|
103
103
|
"eslint-plugin-depend": "^1.2.0",
|
|
104
104
|
"eslint-plugin-github-action": "^0.0.16",
|
|
105
|
-
"eslint-plugin-import-x": "^4.
|
|
106
|
-
"eslint-plugin-jsdoc": "^51.1
|
|
105
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
106
|
+
"eslint-plugin-jsdoc": "^51.3.1",
|
|
107
107
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
108
108
|
"eslint-plugin-n": "^17.20.0",
|
|
109
109
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
110
110
|
"eslint-plugin-ntnyq": "^0.11.0",
|
|
111
111
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
112
112
|
"eslint-plugin-pinia": "^0.4.1",
|
|
113
|
-
"eslint-plugin-prettier": "^5.5.
|
|
113
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
114
114
|
"eslint-plugin-regexp": "^2.9.0",
|
|
115
|
-
"eslint-plugin-svgo": "^0.
|
|
115
|
+
"eslint-plugin-svgo": "^0.9.0",
|
|
116
116
|
"eslint-plugin-toml": "^0.12.0",
|
|
117
117
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
118
118
|
"eslint-plugin-vue": "^10.2.0",
|
|
@@ -121,18 +121,19 @@
|
|
|
121
121
|
"globals": "^16.2.0",
|
|
122
122
|
"jsonc-eslint-parser": "^2.4.0",
|
|
123
123
|
"local-pkg": "^1.1.1",
|
|
124
|
-
"prettier": "^3.
|
|
124
|
+
"prettier": "^3.6.2",
|
|
125
125
|
"toml-eslint-parser": "^0.10.0",
|
|
126
|
-
"typescript-eslint": "^8.
|
|
127
|
-
"vue-eslint-parser": "^10.1.
|
|
126
|
+
"typescript-eslint": "^8.35.0",
|
|
127
|
+
"vue-eslint-parser": "^10.1.4",
|
|
128
128
|
"yaml-eslint-parser": "^1.3.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
131
|
"@ntnyq/prettier-config": "^3.0.1",
|
|
132
|
-
"@types/node": "^24.0.
|
|
132
|
+
"@types/node": "^24.0.7",
|
|
133
|
+
"@typescript-eslint/utils": "^8.35.0",
|
|
133
134
|
"bumpp": "^10.2.0",
|
|
134
135
|
"consola": "^3.4.2",
|
|
135
|
-
"eslint": "^9.
|
|
136
|
+
"eslint": "^9.30.0",
|
|
136
137
|
"eslint-plugin-eslint-plugin": "^6.5.0",
|
|
137
138
|
"eslint-typegen": "^2.2.0",
|
|
138
139
|
"husky": "^9.1.7",
|
|
@@ -140,7 +141,7 @@
|
|
|
140
141
|
"nano-staged": "^0.8.0",
|
|
141
142
|
"npm-run-all2": "^8.0.4",
|
|
142
143
|
"tinyglobby": "^0.2.14",
|
|
143
|
-
"tsdown": "^0.12.
|
|
144
|
+
"tsdown": "^0.12.9",
|
|
144
145
|
"typescript": "^5.8.3",
|
|
145
146
|
"uncase": "^0.1.0",
|
|
146
147
|
"vitest": "^3.2.4"
|
|
@@ -162,7 +163,7 @@
|
|
|
162
163
|
"lint": "eslint --cache",
|
|
163
164
|
"release": "run-s release:check release:version release:publish",
|
|
164
165
|
"release:check": "run-s build lint test typecheck",
|
|
165
|
-
"release:publish": "pnpm publish
|
|
166
|
+
"release:publish": "pnpm publish",
|
|
166
167
|
"release:version": "bumpp",
|
|
167
168
|
"test": "vitest",
|
|
168
169
|
"typecheck": "tsc --noEmit"
|