@ntnyq/eslint-config 3.0.0-beta.2 → 3.0.0-beta.4
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 +27 -0
- package/dist/index.cjs +593 -554
- package/dist/index.d.cts +133 -110
- package/dist/index.d.ts +133 -110
- package/dist/index.js +590 -553
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,16 @@ export { vueEslintParser as parserVue };
|
|
|
26
26
|
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
27
27
|
export { jsoncEslintParser as parserJsonc };
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @file Type Utils
|
|
31
|
+
*/
|
|
32
|
+
type Arrayable<T> = T | T[];
|
|
33
|
+
type Awaitable<T> = T | Promise<T>;
|
|
34
|
+
type InteropModuleDefault<T> = T extends {
|
|
35
|
+
default: infer U;
|
|
36
|
+
} ? U : T;
|
|
37
|
+
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
38
|
+
|
|
29
39
|
interface RuleOptions {
|
|
30
40
|
/**
|
|
31
41
|
* require a `eslint-enable` comment for every `eslint-disable` comment
|
|
@@ -217,6 +227,11 @@ interface RuleOptions {
|
|
|
217
227
|
* @see https://typescript-eslint.io/rules/no-confusing-void-expression
|
|
218
228
|
*/
|
|
219
229
|
'@typescript-eslint/no-confusing-void-expression'?: Linter.RuleEntry<TypescriptEslintNoConfusingVoidExpression>;
|
|
230
|
+
/**
|
|
231
|
+
* Disallow using code marked as `@deprecated`
|
|
232
|
+
* @see https://typescript-eslint.io/rules/no-deprecated
|
|
233
|
+
*/
|
|
234
|
+
'@typescript-eslint/no-deprecated'?: Linter.RuleEntry<[]>;
|
|
220
235
|
/**
|
|
221
236
|
* Disallow duplicate class members
|
|
222
237
|
* @see https://typescript-eslint.io/rules/no-dupe-class-members
|
|
@@ -704,7 +719,7 @@ interface RuleOptions {
|
|
|
704
719
|
*/
|
|
705
720
|
'@typescript-eslint/unified-signatures'?: Linter.RuleEntry<TypescriptEslintUnifiedSignatures>;
|
|
706
721
|
/**
|
|
707
|
-
* Enforce typing arguments in
|
|
722
|
+
* Enforce typing arguments in Promise rejection callbacks as `unknown`
|
|
708
723
|
* @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
|
|
709
724
|
*/
|
|
710
725
|
'@typescript-eslint/use-unknown-in-catch-callback-variable'?: Linter.RuleEntry<[]>;
|
|
@@ -715,228 +730,233 @@ interface RuleOptions {
|
|
|
715
730
|
'command/command'?: Linter.RuleEntry<[]>;
|
|
716
731
|
/**
|
|
717
732
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
718
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
733
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/consistent-type-specifier-style.md
|
|
719
734
|
*/
|
|
720
735
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>;
|
|
721
736
|
/**
|
|
722
737
|
* Ensure a default export is present, given a default import.
|
|
723
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
738
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/default.md
|
|
724
739
|
*/
|
|
725
740
|
'import/default'?: Linter.RuleEntry<[]>;
|
|
726
741
|
/**
|
|
727
742
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
728
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
743
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/dynamic-import-chunkname.md
|
|
729
744
|
*/
|
|
730
745
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>;
|
|
731
746
|
/**
|
|
732
747
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
733
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
748
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/export.md
|
|
734
749
|
*/
|
|
735
750
|
'import/export'?: Linter.RuleEntry<[]>;
|
|
736
751
|
/**
|
|
737
752
|
* Ensure all exports appear after other statements.
|
|
738
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
753
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/exports-last.md
|
|
739
754
|
*/
|
|
740
755
|
'import/exports-last'?: Linter.RuleEntry<[]>;
|
|
741
756
|
/**
|
|
742
757
|
* Ensure consistent use of file extension within the import path.
|
|
743
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
758
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/extensions.md
|
|
744
759
|
*/
|
|
745
760
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>;
|
|
746
761
|
/**
|
|
747
762
|
* Ensure all imports appear before other statements.
|
|
748
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
763
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/first.md
|
|
749
764
|
*/
|
|
750
765
|
'import/first'?: Linter.RuleEntry<ImportFirst>;
|
|
751
766
|
/**
|
|
752
767
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
753
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
768
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/group-exports.md
|
|
754
769
|
*/
|
|
755
770
|
'import/group-exports'?: Linter.RuleEntry<[]>;
|
|
756
771
|
/**
|
|
757
772
|
* Replaced by `import-x/first`.
|
|
758
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
773
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/imports-first.md
|
|
759
774
|
* @deprecated
|
|
760
775
|
*/
|
|
761
776
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>;
|
|
762
777
|
/**
|
|
763
778
|
* Enforce the maximum number of dependencies a module can have.
|
|
764
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
779
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/max-dependencies.md
|
|
765
780
|
*/
|
|
766
781
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>;
|
|
767
782
|
/**
|
|
768
783
|
* Ensure named imports correspond to a named export in the remote file.
|
|
769
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
784
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/named.md
|
|
770
785
|
*/
|
|
771
786
|
'import/named'?: Linter.RuleEntry<ImportNamed>;
|
|
772
787
|
/**
|
|
773
788
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
774
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
789
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/namespace.md
|
|
775
790
|
*/
|
|
776
791
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>;
|
|
777
792
|
/**
|
|
778
793
|
* Enforce a newline after import statements.
|
|
779
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
794
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/newline-after-import.md
|
|
780
795
|
*/
|
|
781
796
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>;
|
|
782
797
|
/**
|
|
783
798
|
* Forbid import of modules using absolute paths.
|
|
784
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
799
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-absolute-path.md
|
|
785
800
|
*/
|
|
786
801
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>;
|
|
787
802
|
/**
|
|
788
803
|
* Forbid AMD `require` and `define` calls.
|
|
789
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
804
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-amd.md
|
|
790
805
|
*/
|
|
791
806
|
'import/no-amd'?: Linter.RuleEntry<[]>;
|
|
792
807
|
/**
|
|
793
808
|
* Forbid anonymous values as default exports.
|
|
794
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
809
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-anonymous-default-export.md
|
|
795
810
|
*/
|
|
796
811
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>;
|
|
797
812
|
/**
|
|
798
813
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
799
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
814
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-commonjs.md
|
|
800
815
|
*/
|
|
801
816
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>;
|
|
802
817
|
/**
|
|
803
818
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
804
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
819
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-cycle.md
|
|
805
820
|
*/
|
|
806
821
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>;
|
|
807
822
|
/**
|
|
808
823
|
* Forbid default exports.
|
|
809
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
824
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-default-export.md
|
|
810
825
|
*/
|
|
811
826
|
'import/no-default-export'?: Linter.RuleEntry<[]>;
|
|
812
827
|
/**
|
|
813
828
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
814
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
829
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-deprecated.md
|
|
815
830
|
*/
|
|
816
831
|
'import/no-deprecated'?: Linter.RuleEntry<[]>;
|
|
817
832
|
/**
|
|
818
833
|
* Forbid repeated import of the same module in multiple places.
|
|
819
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
834
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-duplicates.md
|
|
820
835
|
*/
|
|
821
836
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>;
|
|
822
837
|
/**
|
|
823
838
|
* Forbid `require()` calls with expressions.
|
|
824
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
839
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-dynamic-require.md
|
|
825
840
|
*/
|
|
826
841
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>;
|
|
827
842
|
/**
|
|
828
843
|
* Forbid empty named import blocks.
|
|
829
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
844
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-empty-named-blocks.md
|
|
830
845
|
*/
|
|
831
846
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>;
|
|
832
847
|
/**
|
|
833
848
|
* Forbid the use of extraneous packages.
|
|
834
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
849
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-extraneous-dependencies.md
|
|
835
850
|
*/
|
|
836
851
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>;
|
|
837
852
|
/**
|
|
838
853
|
* Forbid import statements with CommonJS module.exports.
|
|
839
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
854
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-import-module-exports.md
|
|
840
855
|
*/
|
|
841
856
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>;
|
|
842
857
|
/**
|
|
843
858
|
* Forbid importing the submodules of other modules.
|
|
844
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
859
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-internal-modules.md
|
|
845
860
|
*/
|
|
846
861
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>;
|
|
847
862
|
/**
|
|
848
863
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
849
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
864
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-mutable-exports.md
|
|
850
865
|
*/
|
|
851
866
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>;
|
|
852
867
|
/**
|
|
853
868
|
* Forbid use of exported name as identifier of default export.
|
|
854
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
869
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-as-default.md
|
|
855
870
|
*/
|
|
856
871
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>;
|
|
857
872
|
/**
|
|
858
873
|
* Forbid use of exported name as property of default export.
|
|
859
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
874
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-as-default-member.md
|
|
860
875
|
*/
|
|
861
876
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>;
|
|
862
877
|
/**
|
|
863
878
|
* Forbid named default exports.
|
|
864
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
879
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-default.md
|
|
865
880
|
*/
|
|
866
881
|
'import/no-named-default'?: Linter.RuleEntry<[]>;
|
|
867
882
|
/**
|
|
868
883
|
* Forbid named exports.
|
|
869
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
884
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-named-export.md
|
|
870
885
|
*/
|
|
871
886
|
'import/no-named-export'?: Linter.RuleEntry<[]>;
|
|
872
887
|
/**
|
|
873
888
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
874
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
889
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-namespace.md
|
|
875
890
|
*/
|
|
876
891
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>;
|
|
877
892
|
/**
|
|
878
893
|
* Forbid Node.js builtin modules.
|
|
879
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
894
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-nodejs-modules.md
|
|
880
895
|
*/
|
|
881
896
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>;
|
|
882
897
|
/**
|
|
883
898
|
* Forbid importing packages through relative paths.
|
|
884
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
899
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-relative-packages.md
|
|
885
900
|
*/
|
|
886
901
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>;
|
|
887
902
|
/**
|
|
888
903
|
* Forbid importing modules from parent directories.
|
|
889
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
904
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-relative-parent-imports.md
|
|
890
905
|
*/
|
|
891
906
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>;
|
|
907
|
+
/**
|
|
908
|
+
* Forbid importing a default export by a different name.
|
|
909
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-rename-default.md
|
|
910
|
+
*/
|
|
911
|
+
'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>;
|
|
892
912
|
/**
|
|
893
913
|
* Enforce which files can be imported in a given folder.
|
|
894
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
914
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-restricted-paths.md
|
|
895
915
|
*/
|
|
896
916
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>;
|
|
897
917
|
/**
|
|
898
918
|
* Forbid a module from importing itself.
|
|
899
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
919
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-self-import.md
|
|
900
920
|
*/
|
|
901
921
|
'import/no-self-import'?: Linter.RuleEntry<[]>;
|
|
902
922
|
/**
|
|
903
923
|
* Forbid unassigned imports.
|
|
904
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
924
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unassigned-import.md
|
|
905
925
|
*/
|
|
906
926
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>;
|
|
907
927
|
/**
|
|
908
928
|
* Ensure imports point to a file/module that can be resolved.
|
|
909
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
929
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unresolved.md
|
|
910
930
|
*/
|
|
911
931
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>;
|
|
912
932
|
/**
|
|
913
933
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
914
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
934
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-unused-modules.md
|
|
915
935
|
*/
|
|
916
936
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>;
|
|
917
937
|
/**
|
|
918
938
|
* Forbid unnecessary path segments in import and require statements.
|
|
919
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
939
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-useless-path-segments.md
|
|
920
940
|
*/
|
|
921
941
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>;
|
|
922
942
|
/**
|
|
923
943
|
* Forbid webpack loader syntax in imports.
|
|
924
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
944
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/no-webpack-loader-syntax.md
|
|
925
945
|
*/
|
|
926
946
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>;
|
|
927
947
|
/**
|
|
928
948
|
* Enforce a convention in module import order.
|
|
929
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
949
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/order.md
|
|
930
950
|
*/
|
|
931
951
|
'import/order'?: Linter.RuleEntry<ImportOrder>;
|
|
932
952
|
/**
|
|
933
953
|
* Prefer a default export if module exports a single name or multiple names.
|
|
934
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
954
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/prefer-default-export.md
|
|
935
955
|
*/
|
|
936
956
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>;
|
|
937
957
|
/**
|
|
938
958
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
939
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
959
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.1.0/docs/rules/unambiguous.md
|
|
940
960
|
*/
|
|
941
961
|
'import/unambiguous'?: Linter.RuleEntry<[]>;
|
|
942
962
|
/**
|
|
@@ -5435,6 +5455,12 @@ type ImportNoRelativeParentImports = [] | [
|
|
|
5435
5455
|
ignore?: [string, ...(string)[]];
|
|
5436
5456
|
}
|
|
5437
5457
|
];
|
|
5458
|
+
type ImportNoRenameDefault = [] | [
|
|
5459
|
+
{
|
|
5460
|
+
commonjs?: boolean;
|
|
5461
|
+
preventRenamingBindings?: boolean;
|
|
5462
|
+
}
|
|
5463
|
+
];
|
|
5438
5464
|
type ImportNoRestrictedPaths = [] | [
|
|
5439
5465
|
{
|
|
5440
5466
|
zones?: [
|
|
@@ -8773,53 +8799,21 @@ type YmlSpacedComment = [] | [("always" | "never")] | [
|
|
|
8773
8799
|
markers?: string[];
|
|
8774
8800
|
}
|
|
8775
8801
|
];
|
|
8776
|
-
type ConfigName = 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/
|
|
8802
|
+
type ConfigName = 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/scripts' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8777
8803
|
|
|
8778
|
-
/**
|
|
8779
|
-
* Parser options
|
|
8780
|
-
*/
|
|
8781
|
-
type ParserOptions = Linter.ParserOptions;
|
|
8782
|
-
/**
|
|
8783
|
-
* Rules
|
|
8784
|
-
*/
|
|
8785
|
-
type Rules = RuleOptions;
|
|
8786
8804
|
/**
|
|
8787
8805
|
* Typed flat config item
|
|
8788
8806
|
*/
|
|
8789
|
-
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord &
|
|
8807
|
+
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
|
|
8790
8808
|
/**
|
|
8791
8809
|
* Most plugin are not properly typed
|
|
8792
8810
|
*/
|
|
8793
8811
|
plugins?: Record<string, any>;
|
|
8794
8812
|
};
|
|
8795
8813
|
/**
|
|
8796
|
-
*
|
|
8797
|
-
*/
|
|
8798
|
-
type LinterConfig = TypedConfigItem;
|
|
8799
|
-
/**
|
|
8800
|
-
* ESLint rules
|
|
8801
|
-
*/
|
|
8802
|
-
type RuleRecord = Linter.RulesRecord;
|
|
8803
|
-
/**
|
|
8804
|
-
* ESLint rules entry
|
|
8805
|
-
*/
|
|
8806
|
-
type RuleRecordEntry = Record<string, RuleRecord>;
|
|
8807
|
-
|
|
8808
|
-
/**
|
|
8809
|
-
* @file Type Utils
|
|
8814
|
+
* Parser options
|
|
8810
8815
|
*/
|
|
8811
|
-
|
|
8812
|
-
type Arrayable<T> = T | T[];
|
|
8813
|
-
type Awaitable<T> = T | Promise<T>;
|
|
8814
|
-
type InteropModuleDefault<T> = T extends {
|
|
8815
|
-
default: infer U;
|
|
8816
|
-
} ? U : T;
|
|
8817
|
-
interface OverridesOptions<Rules = TypedConfigItem['rules']> {
|
|
8818
|
-
files?: TypedConfigItem['files'];
|
|
8819
|
-
rules?: Rules;
|
|
8820
|
-
parserOptions?: ParserOptions;
|
|
8821
|
-
}
|
|
8822
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
8816
|
+
type ParserOptions = Linter.ParserOptions;
|
|
8823
8817
|
|
|
8824
8818
|
/**
|
|
8825
8819
|
* @file Config options
|
|
@@ -8849,6 +8843,12 @@ interface ConfigImportsOptions extends OptionsOverrides {
|
|
|
8849
8843
|
interface ConfigNodeOptions extends OptionsOverrides {
|
|
8850
8844
|
}
|
|
8851
8845
|
interface ConfigPrettierOptions extends OptionsOverrides {
|
|
8846
|
+
/**
|
|
8847
|
+
* Prettier level
|
|
8848
|
+
*
|
|
8849
|
+
* @default 'warn'
|
|
8850
|
+
*/
|
|
8851
|
+
level?: 'warn' | 'error';
|
|
8852
8852
|
}
|
|
8853
8853
|
interface ConfigPerfectionistOptions extends OptionsOverrides {
|
|
8854
8854
|
}
|
|
@@ -8857,8 +8857,22 @@ interface ConfigCommentsOptions extends OptionsOverrides {
|
|
|
8857
8857
|
interface ConfigRegexpOptions extends OptionsOverrides {
|
|
8858
8858
|
}
|
|
8859
8859
|
interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
8860
|
+
/**
|
|
8861
|
+
* Enable strict checking for JavaScript files
|
|
8862
|
+
*
|
|
8863
|
+
* @default false
|
|
8864
|
+
*/
|
|
8865
|
+
strict?: boolean;
|
|
8860
8866
|
}
|
|
8861
8867
|
interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
8868
|
+
/**
|
|
8869
|
+
* Enable type aware check for TypeScript files
|
|
8870
|
+
*/
|
|
8871
|
+
tsconfigPath?: string;
|
|
8872
|
+
/**
|
|
8873
|
+
* Additional parser options
|
|
8874
|
+
*/
|
|
8875
|
+
parserOptions?: Partial<ParserOptions>;
|
|
8862
8876
|
}
|
|
8863
8877
|
interface ConfigJsoncOptions extends OptionsOverrides {
|
|
8864
8878
|
}
|
|
@@ -8869,6 +8883,12 @@ interface ConfigMarkdownOptions extends OptionsOverrides {
|
|
|
8869
8883
|
interface ConfigTomlOptions extends OptionsOverrides {
|
|
8870
8884
|
}
|
|
8871
8885
|
interface ConfigVueOptions extends OptionsOverrides {
|
|
8886
|
+
/**
|
|
8887
|
+
* Vue version
|
|
8888
|
+
*
|
|
8889
|
+
* @default 3
|
|
8890
|
+
*/
|
|
8891
|
+
vueVersion?: 2 | 3;
|
|
8872
8892
|
}
|
|
8873
8893
|
interface ConfigVitestOptions extends OptionsOverrides {
|
|
8874
8894
|
}
|
|
@@ -8880,6 +8900,7 @@ interface ConfigUnusedImportsOptions extends OptionsOverrides {
|
|
|
8880
8900
|
interface ConfigOptions {
|
|
8881
8901
|
command?: boolean;
|
|
8882
8902
|
sortTsConfig?: boolean;
|
|
8903
|
+
sortI18nLocale?: boolean;
|
|
8883
8904
|
sortPackageJson?: boolean;
|
|
8884
8905
|
ignores?: ConfigIgnoresOptions;
|
|
8885
8906
|
imports?: ConfigImportsOptions;
|
|
@@ -8931,7 +8952,7 @@ declare function toArray<T>(val?: Arrayable<T>): T[];
|
|
|
8931
8952
|
*/
|
|
8932
8953
|
declare function loadPlugin<T = unknown>(name: string): Promise<T>;
|
|
8933
8954
|
|
|
8934
|
-
declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<
|
|
8955
|
+
declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<TypedConfigItem['rules'] & RuleOptions>;
|
|
8935
8956
|
|
|
8936
8957
|
/**
|
|
8937
8958
|
* Interop default export from a module
|
|
@@ -8952,7 +8973,7 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
8952
8973
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
8953
8974
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
8954
8975
|
declare const GLOB_DTS = "**/*.d.?([cm])ts";
|
|
8955
|
-
declare const GLOB_TEST = "**/*.{test,spec}.?([cm])[jt]s?(x)";
|
|
8976
|
+
declare const GLOB_TEST = "**/*.{test,spec,bench,benchmark}.?([cm])[jt]s?(x)";
|
|
8956
8977
|
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
8957
8978
|
declare const GLOB_CSS = "**/*.css";
|
|
8958
8979
|
declare const GLOB_LESS = "**/*.less";
|
|
@@ -8961,10 +8982,12 @@ declare const GLOB_JSON = "**/*.json";
|
|
|
8961
8982
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
8962
8983
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
8963
8984
|
declare const GLOB_VUE = "**/*.vue";
|
|
8964
|
-
declare const GLOB_MARKDOWN = "**/*.md";
|
|
8965
8985
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
8966
8986
|
declare const GLOB_TOML = "**/*.toml";
|
|
8967
8987
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
8988
|
+
declare const GLOB_MARKDOWN = "**/*.md";
|
|
8989
|
+
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
8990
|
+
declare const GLOB_MARKDOWN_NESTED = "**/*.md/*.md";
|
|
8968
8991
|
declare const GLOB_ALL_SRC: string[];
|
|
8969
8992
|
declare const GLOB_NODE_MODULES = "**/node_modules/**";
|
|
8970
8993
|
declare const GLOB_DIST = "**/dist/**";
|
|
@@ -8974,50 +8997,50 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
8974
8997
|
/**
|
|
8975
8998
|
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
8976
8999
|
*/
|
|
8977
|
-
declare const ignores: (customIgnores?: ConfigIgnoresOptions) =>
|
|
9000
|
+
declare const ignores: (customIgnores?: ConfigIgnoresOptions) => TypedConfigItem[];
|
|
8978
9001
|
|
|
8979
|
-
declare const node: (options?: ConfigNodeOptions) =>
|
|
9002
|
+
declare const node: (options?: ConfigNodeOptions) => TypedConfigItem[];
|
|
8980
9003
|
|
|
8981
|
-
declare const jsdoc: (options?: ConfigJsdocOptions) =>
|
|
9004
|
+
declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
|
|
8982
9005
|
|
|
8983
|
-
declare const imports: (options?: ConfigImportsOptions) =>
|
|
9006
|
+
declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
|
|
8984
9007
|
|
|
8985
|
-
declare const unicorn: (options?: ConfigUnicornOptions) =>
|
|
9008
|
+
declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
|
|
8986
9009
|
|
|
8987
|
-
declare const prettier: (options?: ConfigPrettierOptions) =>
|
|
9010
|
+
declare const prettier: (options?: ConfigPrettierOptions) => TypedConfigItem[];
|
|
8988
9011
|
|
|
8989
|
-
declare const comments: (options?: ConfigCommentsOptions) =>
|
|
9012
|
+
declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
|
|
8990
9013
|
|
|
8991
|
-
declare const javascript: (
|
|
8992
|
-
declare const jsx: () =>
|
|
9014
|
+
declare const javascript: (options?: ConfigJavaScriptOptions) => TypedConfigItem[];
|
|
9015
|
+
declare const jsx: () => TypedConfigItem[];
|
|
8993
9016
|
|
|
8994
9017
|
declare const typescriptCore: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
8995
|
-
declare const typescript: (options?: ConfigTypeScriptOptions) =>
|
|
9018
|
+
declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
8996
9019
|
|
|
8997
|
-
declare const unusedImports: (options?: ConfigUnusedImportsOptions) =>
|
|
9020
|
+
declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
|
|
8998
9021
|
|
|
8999
|
-
declare const perfectionist: (options?: ConfigPerfectionistOptions) =>
|
|
9022
|
+
declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
|
|
9000
9023
|
|
|
9001
|
-
declare const regexp: (options?: ConfigRegexpOptions) =>
|
|
9024
|
+
declare const regexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
|
|
9002
9025
|
|
|
9003
|
-
declare const unocss: (options?: ConfigUnoCSSOptions) =>
|
|
9026
|
+
declare const unocss: (options?: ConfigUnoCSSOptions) => TypedConfigItem[];
|
|
9004
9027
|
|
|
9005
|
-
declare const command: () =>
|
|
9028
|
+
declare const command: () => TypedConfigItem[];
|
|
9006
9029
|
|
|
9007
|
-
declare const vitest: (options?: ConfigVitestOptions) =>
|
|
9030
|
+
declare const vitest: (options?: ConfigVitestOptions) => TypedConfigItem[];
|
|
9008
9031
|
|
|
9009
|
-
declare
|
|
9010
|
-
declare const vue: (options?: ConfigVueOptions) => LinterConfig[];
|
|
9032
|
+
declare const vue: (options?: ConfigVueOptions) => TypedConfigItem[];
|
|
9011
9033
|
|
|
9012
|
-
declare const yml: (options?: ConfigYmlOptions) =>
|
|
9034
|
+
declare const yml: (options?: ConfigYmlOptions) => TypedConfigItem[];
|
|
9013
9035
|
|
|
9014
|
-
declare const toml: (options?: ConfigTomlOptions) =>
|
|
9036
|
+
declare const toml: (options?: ConfigTomlOptions) => TypedConfigItem[];
|
|
9015
9037
|
|
|
9016
|
-
declare const sortPackageJson: () =>
|
|
9017
|
-
declare const sortTsConfig: () =>
|
|
9038
|
+
declare const sortPackageJson: () => TypedConfigItem[];
|
|
9039
|
+
declare const sortTsConfig: () => TypedConfigItem[];
|
|
9040
|
+
declare const sortI18nLocale: () => TypedConfigItem[];
|
|
9018
9041
|
|
|
9019
|
-
declare const jsonc: (options?: ConfigJsoncOptions) =>
|
|
9042
|
+
declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
|
|
9020
9043
|
|
|
9021
|
-
declare const markdown: (options?: ConfigMarkdownOptions) =>
|
|
9044
|
+
declare const markdown: (options?: ConfigMarkdownOptions) => TypedConfigItem[];
|
|
9022
9045
|
|
|
9023
|
-
export { type Arrayable, type Awaitable, type ConfigCommentsOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigName, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type
|
|
9046
|
+
export { type Arrayable, type Awaitable, type ConfigCommentsOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigName, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsFiles, type OptionsOverrides, type ParserOptions, type ResolvedOptions, type RuleOptions, type TypedConfigItem, command, comments, getOverrides, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
|