@antfu/eslint-config 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +6 -6
- package/dist/cli.js +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +103 -49
- package/dist/index.d.ts +103 -49
- package/dist/index.js +1 -1
- package/package.json +7 -7
package/dist/cli.cjs
CHANGED
|
@@ -48,7 +48,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
48
48
|
var package_default = {
|
|
49
49
|
name: "@antfu/eslint-config",
|
|
50
50
|
type: "module",
|
|
51
|
-
version: "3.2.
|
|
51
|
+
version: "3.2.2",
|
|
52
52
|
packageManager: "pnpm@9.9.0",
|
|
53
53
|
description: "Anthony's ESLint config",
|
|
54
54
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -153,15 +153,15 @@ var package_default = {
|
|
|
153
153
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
154
154
|
"eslint-flat-config-utils": "^0.3.1",
|
|
155
155
|
"eslint-merge-processors": "^0.1.0",
|
|
156
|
-
"eslint-plugin-antfu": "^2.
|
|
156
|
+
"eslint-plugin-antfu": "^2.5.0",
|
|
157
157
|
"eslint-plugin-command": "^0.2.3",
|
|
158
|
-
"eslint-plugin-import-x": "^4.
|
|
158
|
+
"eslint-plugin-import-x": "^4.2.1",
|
|
159
159
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
160
160
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
161
161
|
"eslint-plugin-markdown": "^5.1.0",
|
|
162
162
|
"eslint-plugin-n": "^17.10.2",
|
|
163
163
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
164
|
-
"eslint-plugin-perfectionist": "^3.
|
|
164
|
+
"eslint-plugin-perfectionist": "^3.4.0",
|
|
165
165
|
"eslint-plugin-regexp": "^2.6.0",
|
|
166
166
|
"eslint-plugin-toml": "^0.11.1",
|
|
167
167
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
@@ -188,7 +188,7 @@ var package_default = {
|
|
|
188
188
|
"@stylistic/eslint-plugin-migrate": "^2.7.2",
|
|
189
189
|
"@types/eslint": "^9.6.1",
|
|
190
190
|
"@types/fs-extra": "^11.0.4",
|
|
191
|
-
"@types/node": "^22.5.
|
|
191
|
+
"@types/node": "^22.5.4",
|
|
192
192
|
"@types/prompts": "^2.4.9",
|
|
193
193
|
"@types/yargs": "^17.0.33",
|
|
194
194
|
"@unocss/eslint-plugin": "^0.62.3",
|
|
@@ -218,7 +218,7 @@ var package_default = {
|
|
|
218
218
|
tsx: "^4.19.0",
|
|
219
219
|
typescript: "^5.5.4",
|
|
220
220
|
vitest: "^2.0.5",
|
|
221
|
-
vue: "^3.5.
|
|
221
|
+
vue: "^3.5.2"
|
|
222
222
|
},
|
|
223
223
|
resolutions: {
|
|
224
224
|
"@eslint-community/eslint-utils": "^4.4.0",
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import c from "picocolors";
|
|
|
19
19
|
var package_default = {
|
|
20
20
|
name: "@antfu/eslint-config",
|
|
21
21
|
type: "module",
|
|
22
|
-
version: "3.2.
|
|
22
|
+
version: "3.2.2",
|
|
23
23
|
packageManager: "pnpm@9.9.0",
|
|
24
24
|
description: "Anthony's ESLint config",
|
|
25
25
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -124,15 +124,15 @@ var package_default = {
|
|
|
124
124
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
125
125
|
"eslint-flat-config-utils": "^0.3.1",
|
|
126
126
|
"eslint-merge-processors": "^0.1.0",
|
|
127
|
-
"eslint-plugin-antfu": "^2.
|
|
127
|
+
"eslint-plugin-antfu": "^2.5.0",
|
|
128
128
|
"eslint-plugin-command": "^0.2.3",
|
|
129
|
-
"eslint-plugin-import-x": "^4.
|
|
129
|
+
"eslint-plugin-import-x": "^4.2.1",
|
|
130
130
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
131
131
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
132
132
|
"eslint-plugin-markdown": "^5.1.0",
|
|
133
133
|
"eslint-plugin-n": "^17.10.2",
|
|
134
134
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
135
|
-
"eslint-plugin-perfectionist": "^3.
|
|
135
|
+
"eslint-plugin-perfectionist": "^3.4.0",
|
|
136
136
|
"eslint-plugin-regexp": "^2.6.0",
|
|
137
137
|
"eslint-plugin-toml": "^0.11.1",
|
|
138
138
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
@@ -159,7 +159,7 @@ var package_default = {
|
|
|
159
159
|
"@stylistic/eslint-plugin-migrate": "^2.7.2",
|
|
160
160
|
"@types/eslint": "^9.6.1",
|
|
161
161
|
"@types/fs-extra": "^11.0.4",
|
|
162
|
-
"@types/node": "^22.5.
|
|
162
|
+
"@types/node": "^22.5.4",
|
|
163
163
|
"@types/prompts": "^2.4.9",
|
|
164
164
|
"@types/yargs": "^17.0.33",
|
|
165
165
|
"@unocss/eslint-plugin": "^0.62.3",
|
|
@@ -189,7 +189,7 @@ var package_default = {
|
|
|
189
189
|
tsx: "^4.19.0",
|
|
190
190
|
typescript: "^5.5.4",
|
|
191
191
|
vitest: "^2.0.5",
|
|
192
|
-
vue: "^3.5.
|
|
192
|
+
vue: "^3.5.2"
|
|
193
193
|
},
|
|
194
194
|
resolutions: {
|
|
195
195
|
"@eslint-community/eslint-utils": "^4.4.0",
|
package/dist/index.cjs
CHANGED
|
@@ -2052,7 +2052,7 @@ async function unicorn(options = {}) {
|
|
|
2052
2052
|
rules: {
|
|
2053
2053
|
...options.allRecommended ? import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules : {
|
|
2054
2054
|
"unicorn/consistent-empty-array-spread": "error",
|
|
2055
|
-
"unicorn/consistent-function-scoping": "error",
|
|
2055
|
+
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
2056
2056
|
"unicorn/error-message": "error",
|
|
2057
2057
|
"unicorn/escape-case": "error",
|
|
2058
2058
|
"unicorn/new-for-builtins": "error",
|
package/dist/index.d.cts
CHANGED
|
@@ -138,7 +138,7 @@ interface RuleOptions {
|
|
|
138
138
|
* Having line breaks styles to object, array and named imports
|
|
139
139
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md
|
|
140
140
|
*/
|
|
141
|
-
'antfu/consistent-chaining'?: Linter.RuleEntry<
|
|
141
|
+
'antfu/consistent-chaining'?: Linter.RuleEntry<AntfuConsistentChaining>
|
|
142
142
|
/**
|
|
143
143
|
* Having line breaks styles to object, array and named imports
|
|
144
144
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
|
|
@@ -761,233 +761,233 @@ interface RuleOptions {
|
|
|
761
761
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
762
762
|
/**
|
|
763
763
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
764
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
764
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/consistent-type-specifier-style.md
|
|
765
765
|
*/
|
|
766
766
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
767
767
|
/**
|
|
768
768
|
* Ensure a default export is present, given a default import.
|
|
769
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
769
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/default.md
|
|
770
770
|
*/
|
|
771
771
|
'import/default'?: Linter.RuleEntry<[]>
|
|
772
772
|
/**
|
|
773
773
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
774
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
774
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/dynamic-import-chunkname.md
|
|
775
775
|
*/
|
|
776
776
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
777
777
|
/**
|
|
778
778
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
779
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
779
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/export.md
|
|
780
780
|
*/
|
|
781
781
|
'import/export'?: Linter.RuleEntry<[]>
|
|
782
782
|
/**
|
|
783
783
|
* Ensure all exports appear after other statements.
|
|
784
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
784
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/exports-last.md
|
|
785
785
|
*/
|
|
786
786
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
787
787
|
/**
|
|
788
788
|
* Ensure consistent use of file extension within the import path.
|
|
789
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
789
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/extensions.md
|
|
790
790
|
*/
|
|
791
791
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
792
792
|
/**
|
|
793
793
|
* Ensure all imports appear before other statements.
|
|
794
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
794
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/first.md
|
|
795
795
|
*/
|
|
796
796
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
797
797
|
/**
|
|
798
798
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
799
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
799
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/group-exports.md
|
|
800
800
|
*/
|
|
801
801
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
802
802
|
/**
|
|
803
803
|
* Replaced by `import-x/first`.
|
|
804
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
804
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/imports-first.md
|
|
805
805
|
* @deprecated
|
|
806
806
|
*/
|
|
807
807
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
808
808
|
/**
|
|
809
809
|
* Enforce the maximum number of dependencies a module can have.
|
|
810
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
810
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/max-dependencies.md
|
|
811
811
|
*/
|
|
812
812
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
813
813
|
/**
|
|
814
814
|
* Ensure named imports correspond to a named export in the remote file.
|
|
815
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
815
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/named.md
|
|
816
816
|
*/
|
|
817
817
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
818
818
|
/**
|
|
819
819
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
820
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
820
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/namespace.md
|
|
821
821
|
*/
|
|
822
822
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
823
823
|
/**
|
|
824
824
|
* Enforce a newline after import statements.
|
|
825
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
825
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/newline-after-import.md
|
|
826
826
|
*/
|
|
827
827
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
828
828
|
/**
|
|
829
829
|
* Forbid import of modules using absolute paths.
|
|
830
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
830
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-absolute-path.md
|
|
831
831
|
*/
|
|
832
832
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
833
833
|
/**
|
|
834
834
|
* Forbid AMD `require` and `define` calls.
|
|
835
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
835
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-amd.md
|
|
836
836
|
*/
|
|
837
837
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
838
838
|
/**
|
|
839
839
|
* Forbid anonymous values as default exports.
|
|
840
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
840
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-anonymous-default-export.md
|
|
841
841
|
*/
|
|
842
842
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
843
843
|
/**
|
|
844
844
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
845
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
845
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-commonjs.md
|
|
846
846
|
*/
|
|
847
847
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
848
848
|
/**
|
|
849
849
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
850
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
850
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-cycle.md
|
|
851
851
|
*/
|
|
852
852
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
853
853
|
/**
|
|
854
854
|
* Forbid default exports.
|
|
855
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
855
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-default-export.md
|
|
856
856
|
*/
|
|
857
857
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
858
858
|
/**
|
|
859
859
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
860
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
860
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-deprecated.md
|
|
861
861
|
*/
|
|
862
862
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
863
863
|
/**
|
|
864
864
|
* Forbid repeated import of the same module in multiple places.
|
|
865
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
865
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-duplicates.md
|
|
866
866
|
*/
|
|
867
867
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
868
868
|
/**
|
|
869
869
|
* Forbid `require()` calls with expressions.
|
|
870
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
870
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-dynamic-require.md
|
|
871
871
|
*/
|
|
872
872
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
873
873
|
/**
|
|
874
874
|
* Forbid empty named import blocks.
|
|
875
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
875
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-empty-named-blocks.md
|
|
876
876
|
*/
|
|
877
877
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
878
878
|
/**
|
|
879
879
|
* Forbid the use of extraneous packages.
|
|
880
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
880
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-extraneous-dependencies.md
|
|
881
881
|
*/
|
|
882
882
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
883
883
|
/**
|
|
884
884
|
* Forbid import statements with CommonJS module.exports.
|
|
885
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
885
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-import-module-exports.md
|
|
886
886
|
*/
|
|
887
887
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
888
888
|
/**
|
|
889
889
|
* Forbid importing the submodules of other modules.
|
|
890
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
890
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-internal-modules.md
|
|
891
891
|
*/
|
|
892
892
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
893
893
|
/**
|
|
894
894
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
895
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
895
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-mutable-exports.md
|
|
896
896
|
*/
|
|
897
897
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
898
898
|
/**
|
|
899
899
|
* Forbid use of exported name as identifier of default export.
|
|
900
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
900
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-as-default.md
|
|
901
901
|
*/
|
|
902
902
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
903
903
|
/**
|
|
904
904
|
* Forbid use of exported name as property of default export.
|
|
905
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
905
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-as-default-member.md
|
|
906
906
|
*/
|
|
907
907
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
908
908
|
/**
|
|
909
909
|
* Forbid named default exports.
|
|
910
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
910
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-default.md
|
|
911
911
|
*/
|
|
912
912
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
913
913
|
/**
|
|
914
914
|
* Forbid named exports.
|
|
915
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
915
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-export.md
|
|
916
916
|
*/
|
|
917
917
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
918
918
|
/**
|
|
919
919
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
920
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
920
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-namespace.md
|
|
921
921
|
*/
|
|
922
922
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
923
923
|
/**
|
|
924
924
|
* Forbid Node.js builtin modules.
|
|
925
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
925
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-nodejs-modules.md
|
|
926
926
|
*/
|
|
927
927
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
928
928
|
/**
|
|
929
929
|
* Forbid importing packages through relative paths.
|
|
930
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
930
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-relative-packages.md
|
|
931
931
|
*/
|
|
932
932
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
933
933
|
/**
|
|
934
934
|
* Forbid importing modules from parent directories.
|
|
935
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
935
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-relative-parent-imports.md
|
|
936
936
|
*/
|
|
937
937
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
938
938
|
/**
|
|
939
939
|
* Forbid importing a default export by a different name.
|
|
940
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
940
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-rename-default.md
|
|
941
941
|
*/
|
|
942
942
|
'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
|
|
943
943
|
/**
|
|
944
944
|
* Enforce which files can be imported in a given folder.
|
|
945
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
945
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-restricted-paths.md
|
|
946
946
|
*/
|
|
947
947
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
948
948
|
/**
|
|
949
949
|
* Forbid a module from importing itself.
|
|
950
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
950
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-self-import.md
|
|
951
951
|
*/
|
|
952
952
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
953
953
|
/**
|
|
954
954
|
* Forbid unassigned imports.
|
|
955
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
955
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unassigned-import.md
|
|
956
956
|
*/
|
|
957
957
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
958
958
|
/**
|
|
959
959
|
* Ensure imports point to a file/module that can be resolved.
|
|
960
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
960
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unresolved.md
|
|
961
961
|
*/
|
|
962
962
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
963
963
|
/**
|
|
964
964
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
965
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
965
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unused-modules.md
|
|
966
966
|
*/
|
|
967
967
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
968
968
|
/**
|
|
969
969
|
* Forbid unnecessary path segments in import and require statements.
|
|
970
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
970
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-useless-path-segments.md
|
|
971
971
|
*/
|
|
972
972
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
973
973
|
/**
|
|
974
974
|
* Forbid webpack loader syntax in imports.
|
|
975
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
975
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-webpack-loader-syntax.md
|
|
976
976
|
*/
|
|
977
977
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
978
978
|
/**
|
|
979
979
|
* Enforce a convention in module import order.
|
|
980
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
980
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/order.md
|
|
981
981
|
*/
|
|
982
982
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
983
983
|
/**
|
|
984
984
|
* Prefer a default export if module exports a single name or multiple names.
|
|
985
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
985
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/prefer-default-export.md
|
|
986
986
|
*/
|
|
987
987
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
988
988
|
/**
|
|
989
989
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
990
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
990
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/unambiguous.md
|
|
991
991
|
*/
|
|
992
992
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
993
993
|
/**
|
|
@@ -2787,6 +2787,11 @@ interface RuleOptions {
|
|
|
2787
2787
|
* @see https://perfectionist.dev/rules/sort-objects
|
|
2788
2788
|
*/
|
|
2789
2789
|
'perfectionist/sort-objects'?: Linter.RuleEntry<PerfectionistSortObjects>
|
|
2790
|
+
/**
|
|
2791
|
+
* Enforce sorted sets.
|
|
2792
|
+
* @see https://perfectionist.dev/rules/sort-sets
|
|
2793
|
+
*/
|
|
2794
|
+
'perfectionist/sort-sets'?: Linter.RuleEntry<PerfectionistSortSets>
|
|
2790
2795
|
/**
|
|
2791
2796
|
* Enforce sorted Svelte attributes.
|
|
2792
2797
|
* @see https://perfectionist.dev/rules/sort-svelte-attributes
|
|
@@ -7873,6 +7878,11 @@ type AccessorPairs = []|[{
|
|
|
7873
7878
|
setWithoutGet?: boolean
|
|
7874
7879
|
enforceForClassMembers?: boolean
|
|
7875
7880
|
}]
|
|
7881
|
+
// ----- antfu/consistent-chaining -----
|
|
7882
|
+
type AntfuConsistentChaining = []|[{
|
|
7883
|
+
|
|
7884
|
+
allowFirstPropertyAccess?: boolean
|
|
7885
|
+
}]
|
|
7876
7886
|
// ----- antfu/consistent-list-newline -----
|
|
7877
7887
|
type AntfuConsistentListNewline = []|[{
|
|
7878
7888
|
ArrayExpression?: boolean
|
|
@@ -8263,6 +8273,7 @@ type ImportNoExtraneousDependencies = []|[{
|
|
|
8263
8273
|
packageDir?: (string | unknown[])
|
|
8264
8274
|
includeInternal?: boolean
|
|
8265
8275
|
includeTypes?: boolean
|
|
8276
|
+
whitelist?: unknown[]
|
|
8266
8277
|
}]
|
|
8267
8278
|
// ----- import/no-import-module-exports -----
|
|
8268
8279
|
type ImportNoImportModuleExports = []|[{
|
|
@@ -10434,9 +10445,41 @@ type PerfectionistSortClasses = []|[{
|
|
|
10434
10445
|
|
|
10435
10446
|
groups?: (string | string[])[]
|
|
10436
10447
|
|
|
10437
|
-
customGroups?: {
|
|
10448
|
+
customGroups?: ({
|
|
10438
10449
|
[k: string]: (string | string[]) | undefined
|
|
10439
|
-
}
|
|
10450
|
+
} | ({
|
|
10451
|
+
|
|
10452
|
+
groupName?: string
|
|
10453
|
+
|
|
10454
|
+
type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
|
|
10455
|
+
|
|
10456
|
+
order?: ("desc" | "asc")
|
|
10457
|
+
anyOf?: {
|
|
10458
|
+
|
|
10459
|
+
selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method")
|
|
10460
|
+
|
|
10461
|
+
modifiers?: ("protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[]
|
|
10462
|
+
|
|
10463
|
+
elementNamePattern?: string
|
|
10464
|
+
|
|
10465
|
+
decoratorNamePattern?: string
|
|
10466
|
+
}[]
|
|
10467
|
+
} | {
|
|
10468
|
+
|
|
10469
|
+
groupName?: string
|
|
10470
|
+
|
|
10471
|
+
type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
|
|
10472
|
+
|
|
10473
|
+
order?: ("desc" | "asc")
|
|
10474
|
+
|
|
10475
|
+
selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method")
|
|
10476
|
+
|
|
10477
|
+
modifiers?: ("protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[]
|
|
10478
|
+
|
|
10479
|
+
elementNamePattern?: string
|
|
10480
|
+
|
|
10481
|
+
decoratorNamePattern?: string
|
|
10482
|
+
})[])
|
|
10440
10483
|
}]
|
|
10441
10484
|
// ----- perfectionist/sort-enums -----
|
|
10442
10485
|
type PerfectionistSortEnums = []|[{
|
|
@@ -10624,6 +10667,17 @@ type PerfectionistSortObjects = []|[{
|
|
|
10624
10667
|
[k: string]: (string | string[]) | undefined
|
|
10625
10668
|
}
|
|
10626
10669
|
}]
|
|
10670
|
+
// ----- perfectionist/sort-sets -----
|
|
10671
|
+
type PerfectionistSortSets = []|[{
|
|
10672
|
+
|
|
10673
|
+
type?: ("alphabetical" | "natural" | "line-length")
|
|
10674
|
+
|
|
10675
|
+
order?: ("asc" | "desc")
|
|
10676
|
+
|
|
10677
|
+
ignoreCase?: boolean
|
|
10678
|
+
|
|
10679
|
+
groupKind?: ("mixed" | "literals-first" | "spreads-first")
|
|
10680
|
+
}]
|
|
10627
10681
|
// ----- perfectionist/sort-svelte-attributes -----
|
|
10628
10682
|
type PerfectionistSortSvelteAttributes = []|[{
|
|
10629
10683
|
|
package/dist/index.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ interface RuleOptions {
|
|
|
138
138
|
* Having line breaks styles to object, array and named imports
|
|
139
139
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md
|
|
140
140
|
*/
|
|
141
|
-
'antfu/consistent-chaining'?: Linter.RuleEntry<
|
|
141
|
+
'antfu/consistent-chaining'?: Linter.RuleEntry<AntfuConsistentChaining>
|
|
142
142
|
/**
|
|
143
143
|
* Having line breaks styles to object, array and named imports
|
|
144
144
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
|
|
@@ -761,233 +761,233 @@ interface RuleOptions {
|
|
|
761
761
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
762
762
|
/**
|
|
763
763
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
764
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
764
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/consistent-type-specifier-style.md
|
|
765
765
|
*/
|
|
766
766
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
767
767
|
/**
|
|
768
768
|
* Ensure a default export is present, given a default import.
|
|
769
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
769
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/default.md
|
|
770
770
|
*/
|
|
771
771
|
'import/default'?: Linter.RuleEntry<[]>
|
|
772
772
|
/**
|
|
773
773
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
774
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
774
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/dynamic-import-chunkname.md
|
|
775
775
|
*/
|
|
776
776
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
777
777
|
/**
|
|
778
778
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
779
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
779
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/export.md
|
|
780
780
|
*/
|
|
781
781
|
'import/export'?: Linter.RuleEntry<[]>
|
|
782
782
|
/**
|
|
783
783
|
* Ensure all exports appear after other statements.
|
|
784
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
784
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/exports-last.md
|
|
785
785
|
*/
|
|
786
786
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
787
787
|
/**
|
|
788
788
|
* Ensure consistent use of file extension within the import path.
|
|
789
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
789
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/extensions.md
|
|
790
790
|
*/
|
|
791
791
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
792
792
|
/**
|
|
793
793
|
* Ensure all imports appear before other statements.
|
|
794
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
794
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/first.md
|
|
795
795
|
*/
|
|
796
796
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
797
797
|
/**
|
|
798
798
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
799
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
799
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/group-exports.md
|
|
800
800
|
*/
|
|
801
801
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
802
802
|
/**
|
|
803
803
|
* Replaced by `import-x/first`.
|
|
804
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
804
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/imports-first.md
|
|
805
805
|
* @deprecated
|
|
806
806
|
*/
|
|
807
807
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
808
808
|
/**
|
|
809
809
|
* Enforce the maximum number of dependencies a module can have.
|
|
810
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
810
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/max-dependencies.md
|
|
811
811
|
*/
|
|
812
812
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
813
813
|
/**
|
|
814
814
|
* Ensure named imports correspond to a named export in the remote file.
|
|
815
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
815
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/named.md
|
|
816
816
|
*/
|
|
817
817
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
818
818
|
/**
|
|
819
819
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
820
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
820
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/namespace.md
|
|
821
821
|
*/
|
|
822
822
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
823
823
|
/**
|
|
824
824
|
* Enforce a newline after import statements.
|
|
825
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
825
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/newline-after-import.md
|
|
826
826
|
*/
|
|
827
827
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
828
828
|
/**
|
|
829
829
|
* Forbid import of modules using absolute paths.
|
|
830
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
830
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-absolute-path.md
|
|
831
831
|
*/
|
|
832
832
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
833
833
|
/**
|
|
834
834
|
* Forbid AMD `require` and `define` calls.
|
|
835
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
835
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-amd.md
|
|
836
836
|
*/
|
|
837
837
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
838
838
|
/**
|
|
839
839
|
* Forbid anonymous values as default exports.
|
|
840
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
840
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-anonymous-default-export.md
|
|
841
841
|
*/
|
|
842
842
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
843
843
|
/**
|
|
844
844
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
845
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
845
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-commonjs.md
|
|
846
846
|
*/
|
|
847
847
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
848
848
|
/**
|
|
849
849
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
850
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
850
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-cycle.md
|
|
851
851
|
*/
|
|
852
852
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
853
853
|
/**
|
|
854
854
|
* Forbid default exports.
|
|
855
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
855
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-default-export.md
|
|
856
856
|
*/
|
|
857
857
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
858
858
|
/**
|
|
859
859
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
860
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
860
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-deprecated.md
|
|
861
861
|
*/
|
|
862
862
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
863
863
|
/**
|
|
864
864
|
* Forbid repeated import of the same module in multiple places.
|
|
865
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
865
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-duplicates.md
|
|
866
866
|
*/
|
|
867
867
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
868
868
|
/**
|
|
869
869
|
* Forbid `require()` calls with expressions.
|
|
870
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
870
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-dynamic-require.md
|
|
871
871
|
*/
|
|
872
872
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
873
873
|
/**
|
|
874
874
|
* Forbid empty named import blocks.
|
|
875
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
875
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-empty-named-blocks.md
|
|
876
876
|
*/
|
|
877
877
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
878
878
|
/**
|
|
879
879
|
* Forbid the use of extraneous packages.
|
|
880
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
880
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-extraneous-dependencies.md
|
|
881
881
|
*/
|
|
882
882
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
883
883
|
/**
|
|
884
884
|
* Forbid import statements with CommonJS module.exports.
|
|
885
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
885
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-import-module-exports.md
|
|
886
886
|
*/
|
|
887
887
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
888
888
|
/**
|
|
889
889
|
* Forbid importing the submodules of other modules.
|
|
890
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
890
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-internal-modules.md
|
|
891
891
|
*/
|
|
892
892
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
893
893
|
/**
|
|
894
894
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
895
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
895
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-mutable-exports.md
|
|
896
896
|
*/
|
|
897
897
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
898
898
|
/**
|
|
899
899
|
* Forbid use of exported name as identifier of default export.
|
|
900
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
900
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-as-default.md
|
|
901
901
|
*/
|
|
902
902
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
903
903
|
/**
|
|
904
904
|
* Forbid use of exported name as property of default export.
|
|
905
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
905
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-as-default-member.md
|
|
906
906
|
*/
|
|
907
907
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
908
908
|
/**
|
|
909
909
|
* Forbid named default exports.
|
|
910
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
910
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-default.md
|
|
911
911
|
*/
|
|
912
912
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
913
913
|
/**
|
|
914
914
|
* Forbid named exports.
|
|
915
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
915
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-named-export.md
|
|
916
916
|
*/
|
|
917
917
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
918
918
|
/**
|
|
919
919
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
920
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
920
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-namespace.md
|
|
921
921
|
*/
|
|
922
922
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
923
923
|
/**
|
|
924
924
|
* Forbid Node.js builtin modules.
|
|
925
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
925
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-nodejs-modules.md
|
|
926
926
|
*/
|
|
927
927
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
928
928
|
/**
|
|
929
929
|
* Forbid importing packages through relative paths.
|
|
930
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
930
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-relative-packages.md
|
|
931
931
|
*/
|
|
932
932
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
933
933
|
/**
|
|
934
934
|
* Forbid importing modules from parent directories.
|
|
935
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
935
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-relative-parent-imports.md
|
|
936
936
|
*/
|
|
937
937
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
938
938
|
/**
|
|
939
939
|
* Forbid importing a default export by a different name.
|
|
940
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
940
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-rename-default.md
|
|
941
941
|
*/
|
|
942
942
|
'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
|
|
943
943
|
/**
|
|
944
944
|
* Enforce which files can be imported in a given folder.
|
|
945
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
945
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-restricted-paths.md
|
|
946
946
|
*/
|
|
947
947
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
948
948
|
/**
|
|
949
949
|
* Forbid a module from importing itself.
|
|
950
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
950
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-self-import.md
|
|
951
951
|
*/
|
|
952
952
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
953
953
|
/**
|
|
954
954
|
* Forbid unassigned imports.
|
|
955
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
955
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unassigned-import.md
|
|
956
956
|
*/
|
|
957
957
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
958
958
|
/**
|
|
959
959
|
* Ensure imports point to a file/module that can be resolved.
|
|
960
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
960
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unresolved.md
|
|
961
961
|
*/
|
|
962
962
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
963
963
|
/**
|
|
964
964
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
965
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
965
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-unused-modules.md
|
|
966
966
|
*/
|
|
967
967
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
968
968
|
/**
|
|
969
969
|
* Forbid unnecessary path segments in import and require statements.
|
|
970
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
970
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-useless-path-segments.md
|
|
971
971
|
*/
|
|
972
972
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
973
973
|
/**
|
|
974
974
|
* Forbid webpack loader syntax in imports.
|
|
975
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
975
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/no-webpack-loader-syntax.md
|
|
976
976
|
*/
|
|
977
977
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
978
978
|
/**
|
|
979
979
|
* Enforce a convention in module import order.
|
|
980
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
980
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/order.md
|
|
981
981
|
*/
|
|
982
982
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
983
983
|
/**
|
|
984
984
|
* Prefer a default export if module exports a single name or multiple names.
|
|
985
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
985
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/prefer-default-export.md
|
|
986
986
|
*/
|
|
987
987
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
988
988
|
/**
|
|
989
989
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
990
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
990
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.2.1/docs/rules/unambiguous.md
|
|
991
991
|
*/
|
|
992
992
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
993
993
|
/**
|
|
@@ -2787,6 +2787,11 @@ interface RuleOptions {
|
|
|
2787
2787
|
* @see https://perfectionist.dev/rules/sort-objects
|
|
2788
2788
|
*/
|
|
2789
2789
|
'perfectionist/sort-objects'?: Linter.RuleEntry<PerfectionistSortObjects>
|
|
2790
|
+
/**
|
|
2791
|
+
* Enforce sorted sets.
|
|
2792
|
+
* @see https://perfectionist.dev/rules/sort-sets
|
|
2793
|
+
*/
|
|
2794
|
+
'perfectionist/sort-sets'?: Linter.RuleEntry<PerfectionistSortSets>
|
|
2790
2795
|
/**
|
|
2791
2796
|
* Enforce sorted Svelte attributes.
|
|
2792
2797
|
* @see https://perfectionist.dev/rules/sort-svelte-attributes
|
|
@@ -7873,6 +7878,11 @@ type AccessorPairs = []|[{
|
|
|
7873
7878
|
setWithoutGet?: boolean
|
|
7874
7879
|
enforceForClassMembers?: boolean
|
|
7875
7880
|
}]
|
|
7881
|
+
// ----- antfu/consistent-chaining -----
|
|
7882
|
+
type AntfuConsistentChaining = []|[{
|
|
7883
|
+
|
|
7884
|
+
allowFirstPropertyAccess?: boolean
|
|
7885
|
+
}]
|
|
7876
7886
|
// ----- antfu/consistent-list-newline -----
|
|
7877
7887
|
type AntfuConsistentListNewline = []|[{
|
|
7878
7888
|
ArrayExpression?: boolean
|
|
@@ -8263,6 +8273,7 @@ type ImportNoExtraneousDependencies = []|[{
|
|
|
8263
8273
|
packageDir?: (string | unknown[])
|
|
8264
8274
|
includeInternal?: boolean
|
|
8265
8275
|
includeTypes?: boolean
|
|
8276
|
+
whitelist?: unknown[]
|
|
8266
8277
|
}]
|
|
8267
8278
|
// ----- import/no-import-module-exports -----
|
|
8268
8279
|
type ImportNoImportModuleExports = []|[{
|
|
@@ -10434,9 +10445,41 @@ type PerfectionistSortClasses = []|[{
|
|
|
10434
10445
|
|
|
10435
10446
|
groups?: (string | string[])[]
|
|
10436
10447
|
|
|
10437
|
-
customGroups?: {
|
|
10448
|
+
customGroups?: ({
|
|
10438
10449
|
[k: string]: (string | string[]) | undefined
|
|
10439
|
-
}
|
|
10450
|
+
} | ({
|
|
10451
|
+
|
|
10452
|
+
groupName?: string
|
|
10453
|
+
|
|
10454
|
+
type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
|
|
10455
|
+
|
|
10456
|
+
order?: ("desc" | "asc")
|
|
10457
|
+
anyOf?: {
|
|
10458
|
+
|
|
10459
|
+
selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method")
|
|
10460
|
+
|
|
10461
|
+
modifiers?: ("protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[]
|
|
10462
|
+
|
|
10463
|
+
elementNamePattern?: string
|
|
10464
|
+
|
|
10465
|
+
decoratorNamePattern?: string
|
|
10466
|
+
}[]
|
|
10467
|
+
} | {
|
|
10468
|
+
|
|
10469
|
+
groupName?: string
|
|
10470
|
+
|
|
10471
|
+
type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
|
|
10472
|
+
|
|
10473
|
+
order?: ("desc" | "asc")
|
|
10474
|
+
|
|
10475
|
+
selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method")
|
|
10476
|
+
|
|
10477
|
+
modifiers?: ("protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[]
|
|
10478
|
+
|
|
10479
|
+
elementNamePattern?: string
|
|
10480
|
+
|
|
10481
|
+
decoratorNamePattern?: string
|
|
10482
|
+
})[])
|
|
10440
10483
|
}]
|
|
10441
10484
|
// ----- perfectionist/sort-enums -----
|
|
10442
10485
|
type PerfectionistSortEnums = []|[{
|
|
@@ -10624,6 +10667,17 @@ type PerfectionistSortObjects = []|[{
|
|
|
10624
10667
|
[k: string]: (string | string[]) | undefined
|
|
10625
10668
|
}
|
|
10626
10669
|
}]
|
|
10670
|
+
// ----- perfectionist/sort-sets -----
|
|
10671
|
+
type PerfectionistSortSets = []|[{
|
|
10672
|
+
|
|
10673
|
+
type?: ("alphabetical" | "natural" | "line-length")
|
|
10674
|
+
|
|
10675
|
+
order?: ("asc" | "desc")
|
|
10676
|
+
|
|
10677
|
+
ignoreCase?: boolean
|
|
10678
|
+
|
|
10679
|
+
groupKind?: ("mixed" | "literals-first" | "spreads-first")
|
|
10680
|
+
}]
|
|
10627
10681
|
// ----- perfectionist/sort-svelte-attributes -----
|
|
10628
10682
|
type PerfectionistSortSvelteAttributes = []|[{
|
|
10629
10683
|
|
package/dist/index.js
CHANGED
|
@@ -1939,7 +1939,7 @@ async function unicorn(options = {}) {
|
|
|
1939
1939
|
rules: {
|
|
1940
1940
|
...options.allRecommended ? default5.configs["flat/recommended"].rules : {
|
|
1941
1941
|
"unicorn/consistent-empty-array-spread": "error",
|
|
1942
|
-
"unicorn/consistent-function-scoping": "error",
|
|
1942
|
+
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
1943
1943
|
"unicorn/error-message": "error",
|
|
1944
1944
|
"unicorn/escape-case": "error",
|
|
1945
1945
|
"unicorn/new-for-builtins": "error",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.2",
|
|
5
5
|
"description": "Anthony's ESLint config",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -91,15 +91,15 @@
|
|
|
91
91
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
92
92
|
"eslint-flat-config-utils": "^0.3.1",
|
|
93
93
|
"eslint-merge-processors": "^0.1.0",
|
|
94
|
-
"eslint-plugin-antfu": "^2.
|
|
94
|
+
"eslint-plugin-antfu": "^2.5.0",
|
|
95
95
|
"eslint-plugin-command": "^0.2.3",
|
|
96
|
-
"eslint-plugin-import-x": "^4.
|
|
96
|
+
"eslint-plugin-import-x": "^4.2.1",
|
|
97
97
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
98
98
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
99
99
|
"eslint-plugin-markdown": "^5.1.0",
|
|
100
100
|
"eslint-plugin-n": "^17.10.2",
|
|
101
101
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
102
|
-
"eslint-plugin-perfectionist": "^3.
|
|
102
|
+
"eslint-plugin-perfectionist": "^3.4.0",
|
|
103
103
|
"eslint-plugin-regexp": "^2.6.0",
|
|
104
104
|
"eslint-plugin-toml": "^0.11.1",
|
|
105
105
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@stylistic/eslint-plugin-migrate": "^2.7.2",
|
|
126
126
|
"@types/eslint": "^9.6.1",
|
|
127
127
|
"@types/fs-extra": "^11.0.4",
|
|
128
|
-
"@types/node": "^22.5.
|
|
128
|
+
"@types/node": "^22.5.4",
|
|
129
129
|
"@types/prompts": "^2.4.9",
|
|
130
130
|
"@types/yargs": "^17.0.33",
|
|
131
131
|
"@unocss/eslint-plugin": "^0.62.3",
|
|
@@ -155,8 +155,8 @@
|
|
|
155
155
|
"tsx": "^4.19.0",
|
|
156
156
|
"typescript": "^5.5.4",
|
|
157
157
|
"vitest": "^2.0.5",
|
|
158
|
-
"vue": "^3.5.
|
|
159
|
-
"@antfu/eslint-config": "3.2.
|
|
158
|
+
"vue": "^3.5.2",
|
|
159
|
+
"@antfu/eslint-config": "3.2.2"
|
|
160
160
|
},
|
|
161
161
|
"resolutions": {
|
|
162
162
|
"@eslint-community/eslint-utils": "^4.4.0",
|