@antfu/eslint-config 2.22.0 → 2.22.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/README.md +2 -0
- package/dist/cli.cjs +10 -10
- package/dist/cli.js +10 -10
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +53 -44
- package/dist/index.d.ts +53 -44
- package/dist/index.js +2 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -323,6 +323,8 @@ export default antfu()
|
|
|
323
323
|
})
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
+
</details>
|
|
327
|
+
|
|
326
328
|
### Rules Overrides
|
|
327
329
|
|
|
328
330
|
Certain rules would only be enabled in specific files, for example, `ts/*` rules would only be enabled in `.ts` files and `vue/*` rules would only be enabled in `.vue` files. If you want to override the rules, you need to specify the file extension:
|
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: "2.22.
|
|
51
|
+
version: "2.22.2",
|
|
52
52
|
packageManager: "pnpm@9.5.0",
|
|
53
53
|
description: "Anthony's ESLint config",
|
|
54
54
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -154,10 +154,10 @@ var package_default = {
|
|
|
154
154
|
"eslint-plugin-antfu": "^2.3.4",
|
|
155
155
|
"eslint-plugin-command": "^0.2.3",
|
|
156
156
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
157
|
-
"eslint-plugin-import-x": "^0.
|
|
158
|
-
"eslint-plugin-jsdoc": "^48.
|
|
157
|
+
"eslint-plugin-import-x": "^3.0.1",
|
|
158
|
+
"eslint-plugin-jsdoc": "^48.7.0",
|
|
159
159
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
160
|
-
"eslint-plugin-markdown": "^5.
|
|
160
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
161
161
|
"eslint-plugin-n": "^17.9.0",
|
|
162
162
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
163
163
|
"eslint-plugin-perfectionist": "^2.11.0",
|
|
@@ -181,8 +181,8 @@ var package_default = {
|
|
|
181
181
|
},
|
|
182
182
|
devDependencies: {
|
|
183
183
|
"@antfu/eslint-config": "workspace:*",
|
|
184
|
-
"@antfu/ni": "^0.
|
|
185
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
184
|
+
"@antfu/ni": "^0.22.0",
|
|
185
|
+
"@eslint-react/eslint-plugin": "^1.5.25",
|
|
186
186
|
"@eslint/config-inspector": "^0.5.1",
|
|
187
187
|
"@prettier/plugin-xml": "^3.4.1",
|
|
188
188
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
@@ -200,7 +200,7 @@ var package_default = {
|
|
|
200
200
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
201
201
|
"eslint-plugin-react-refresh": "^0.4.8",
|
|
202
202
|
"eslint-plugin-solid": "^0.14.1",
|
|
203
|
-
"eslint-plugin-svelte": "^2.
|
|
203
|
+
"eslint-plugin-svelte": "^2.42.0",
|
|
204
204
|
"eslint-ts-patch": "9.5.0-0",
|
|
205
205
|
"eslint-typegen": "^0.2.4",
|
|
206
206
|
esno: "^4.7.0",
|
|
@@ -210,14 +210,14 @@ var package_default = {
|
|
|
210
210
|
"lint-staged": "^15.2.7",
|
|
211
211
|
"prettier-plugin-astro": "^0.14.0",
|
|
212
212
|
"prettier-plugin-slidev": "^1.0.5",
|
|
213
|
-
rimraf: "^6.0.
|
|
213
|
+
rimraf: "^6.0.1",
|
|
214
214
|
"simple-git-hooks": "^2.11.1",
|
|
215
215
|
svelte: "^4.2.18",
|
|
216
|
-
"svelte-eslint-parser": "^0.
|
|
216
|
+
"svelte-eslint-parser": "^0.40.0",
|
|
217
217
|
tsup: "^8.1.0",
|
|
218
218
|
tsx: "^4.16.2",
|
|
219
219
|
typescript: "^5.5.3",
|
|
220
|
-
vitest: "^2.0.
|
|
220
|
+
vitest: "^2.0.2",
|
|
221
221
|
vue: "^3.4.31"
|
|
222
222
|
},
|
|
223
223
|
resolutions: {
|
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: "2.22.
|
|
22
|
+
version: "2.22.2",
|
|
23
23
|
packageManager: "pnpm@9.5.0",
|
|
24
24
|
description: "Anthony's ESLint config",
|
|
25
25
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -125,10 +125,10 @@ var package_default = {
|
|
|
125
125
|
"eslint-plugin-antfu": "^2.3.4",
|
|
126
126
|
"eslint-plugin-command": "^0.2.3",
|
|
127
127
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
128
|
-
"eslint-plugin-import-x": "^0.
|
|
129
|
-
"eslint-plugin-jsdoc": "^48.
|
|
128
|
+
"eslint-plugin-import-x": "^3.0.1",
|
|
129
|
+
"eslint-plugin-jsdoc": "^48.7.0",
|
|
130
130
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
131
|
-
"eslint-plugin-markdown": "^5.
|
|
131
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
132
132
|
"eslint-plugin-n": "^17.9.0",
|
|
133
133
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
134
134
|
"eslint-plugin-perfectionist": "^2.11.0",
|
|
@@ -152,8 +152,8 @@ var package_default = {
|
|
|
152
152
|
},
|
|
153
153
|
devDependencies: {
|
|
154
154
|
"@antfu/eslint-config": "workspace:*",
|
|
155
|
-
"@antfu/ni": "^0.
|
|
156
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
155
|
+
"@antfu/ni": "^0.22.0",
|
|
156
|
+
"@eslint-react/eslint-plugin": "^1.5.25",
|
|
157
157
|
"@eslint/config-inspector": "^0.5.1",
|
|
158
158
|
"@prettier/plugin-xml": "^3.4.1",
|
|
159
159
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
@@ -171,7 +171,7 @@ var package_default = {
|
|
|
171
171
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
172
172
|
"eslint-plugin-react-refresh": "^0.4.8",
|
|
173
173
|
"eslint-plugin-solid": "^0.14.1",
|
|
174
|
-
"eslint-plugin-svelte": "^2.
|
|
174
|
+
"eslint-plugin-svelte": "^2.42.0",
|
|
175
175
|
"eslint-ts-patch": "9.5.0-0",
|
|
176
176
|
"eslint-typegen": "^0.2.4",
|
|
177
177
|
esno: "^4.7.0",
|
|
@@ -181,14 +181,14 @@ var package_default = {
|
|
|
181
181
|
"lint-staged": "^15.2.7",
|
|
182
182
|
"prettier-plugin-astro": "^0.14.0",
|
|
183
183
|
"prettier-plugin-slidev": "^1.0.5",
|
|
184
|
-
rimraf: "^6.0.
|
|
184
|
+
rimraf: "^6.0.1",
|
|
185
185
|
"simple-git-hooks": "^2.11.1",
|
|
186
186
|
svelte: "^4.2.18",
|
|
187
|
-
"svelte-eslint-parser": "^0.
|
|
187
|
+
"svelte-eslint-parser": "^0.40.0",
|
|
188
188
|
tsup: "^8.1.0",
|
|
189
189
|
tsx: "^4.16.2",
|
|
190
190
|
typescript: "^5.5.3",
|
|
191
|
-
vitest: "^2.0.
|
|
191
|
+
vitest: "^2.0.2",
|
|
192
192
|
vue: "^3.4.31"
|
|
193
193
|
},
|
|
194
194
|
resolutions: {
|
package/dist/index.cjs
CHANGED
|
@@ -1632,6 +1632,7 @@ function sortTsconfig() {
|
|
|
1632
1632
|
"allowSyntheticDefaultImports",
|
|
1633
1633
|
"esModuleInterop",
|
|
1634
1634
|
"forceConsistentCasingInFileNames",
|
|
1635
|
+
"isolatedDeclarations",
|
|
1635
1636
|
"isolatedModules",
|
|
1636
1637
|
"preserveSymlinks",
|
|
1637
1638
|
"verbatimModuleSyntax",
|
|
@@ -1959,7 +1960,7 @@ async function typescript(options = {}) {
|
|
|
1959
1960
|
"no-redeclare": "off",
|
|
1960
1961
|
"no-use-before-define": "off",
|
|
1961
1962
|
"no-useless-constructor": "off",
|
|
1962
|
-
"ts/ban-ts-comment": ["error", { "ts-
|
|
1963
|
+
"ts/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
|
|
1963
1964
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
1964
1965
|
"ts/consistent-type-imports": ["error", { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
1965
1966
|
"ts/method-signature-style": ["error", "property"],
|
package/dist/index.d.cts
CHANGED
|
@@ -756,42 +756,42 @@ interface RuleOptions {
|
|
|
756
756
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
757
757
|
/**
|
|
758
758
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
759
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
759
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/consistent-type-specifier-style.md
|
|
760
760
|
*/
|
|
761
761
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
762
762
|
/**
|
|
763
763
|
* Ensure a default export is present, given a default import.
|
|
764
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
764
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/default.md
|
|
765
765
|
*/
|
|
766
766
|
'import/default'?: Linter.RuleEntry<[]>
|
|
767
767
|
/**
|
|
768
768
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
769
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
769
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/dynamic-import-chunkname.md
|
|
770
770
|
*/
|
|
771
771
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
772
772
|
/**
|
|
773
773
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
774
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
774
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/export.md
|
|
775
775
|
*/
|
|
776
776
|
'import/export'?: Linter.RuleEntry<[]>
|
|
777
777
|
/**
|
|
778
778
|
* Ensure all exports appear after other statements.
|
|
779
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
779
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/exports-last.md
|
|
780
780
|
*/
|
|
781
781
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
782
782
|
/**
|
|
783
783
|
* Ensure consistent use of file extension within the import path.
|
|
784
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
784
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/extensions.md
|
|
785
785
|
*/
|
|
786
786
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
787
787
|
/**
|
|
788
788
|
* Ensure all imports appear before other statements.
|
|
789
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
789
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/first.md
|
|
790
790
|
*/
|
|
791
791
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
792
792
|
/**
|
|
793
793
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
794
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
794
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/group-exports.md
|
|
795
795
|
*/
|
|
796
796
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
797
797
|
/**
|
|
@@ -802,182 +802,182 @@ interface RuleOptions {
|
|
|
802
802
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
803
803
|
/**
|
|
804
804
|
* Enforce the maximum number of dependencies a module can have.
|
|
805
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
805
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/max-dependencies.md
|
|
806
806
|
*/
|
|
807
807
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
808
808
|
/**
|
|
809
809
|
* Ensure named imports correspond to a named export in the remote file.
|
|
810
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
810
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/named.md
|
|
811
811
|
*/
|
|
812
812
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
813
813
|
/**
|
|
814
814
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
815
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
815
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/namespace.md
|
|
816
816
|
*/
|
|
817
817
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
818
818
|
/**
|
|
819
819
|
* Enforce a newline after import statements.
|
|
820
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
820
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/newline-after-import.md
|
|
821
821
|
*/
|
|
822
822
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
823
823
|
/**
|
|
824
824
|
* Forbid import of modules using absolute paths.
|
|
825
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
825
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-absolute-path.md
|
|
826
826
|
*/
|
|
827
827
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
828
828
|
/**
|
|
829
829
|
* Forbid AMD `require` and `define` calls.
|
|
830
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
830
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-amd.md
|
|
831
831
|
*/
|
|
832
832
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
833
833
|
/**
|
|
834
834
|
* Forbid anonymous values as default exports.
|
|
835
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
835
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-anonymous-default-export.md
|
|
836
836
|
*/
|
|
837
837
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
838
838
|
/**
|
|
839
839
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
840
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
840
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-commonjs.md
|
|
841
841
|
*/
|
|
842
842
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
843
843
|
/**
|
|
844
844
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
845
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
845
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-cycle.md
|
|
846
846
|
*/
|
|
847
847
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
848
848
|
/**
|
|
849
849
|
* Forbid default exports.
|
|
850
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
850
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-default-export.md
|
|
851
851
|
*/
|
|
852
852
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
853
853
|
/**
|
|
854
854
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
855
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
855
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-deprecated.md
|
|
856
856
|
*/
|
|
857
857
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
858
858
|
/**
|
|
859
859
|
* Forbid repeated import of the same module in multiple places.
|
|
860
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
860
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-duplicates.md
|
|
861
861
|
*/
|
|
862
862
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
863
863
|
/**
|
|
864
864
|
* Forbid `require()` calls with expressions.
|
|
865
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
865
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-dynamic-require.md
|
|
866
866
|
*/
|
|
867
867
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
868
868
|
/**
|
|
869
869
|
* Forbid empty named import blocks.
|
|
870
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
870
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-empty-named-blocks.md
|
|
871
871
|
*/
|
|
872
872
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
873
873
|
/**
|
|
874
874
|
* Forbid the use of extraneous packages.
|
|
875
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
875
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-extraneous-dependencies.md
|
|
876
876
|
*/
|
|
877
877
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
878
878
|
/**
|
|
879
879
|
* Forbid import statements with CommonJS module.exports.
|
|
880
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
880
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-import-module-exports.md
|
|
881
881
|
*/
|
|
882
882
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
883
883
|
/**
|
|
884
884
|
* Forbid importing the submodules of other modules.
|
|
885
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
885
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-internal-modules.md
|
|
886
886
|
*/
|
|
887
887
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
888
888
|
/**
|
|
889
889
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
890
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
890
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-mutable-exports.md
|
|
891
891
|
*/
|
|
892
892
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
893
893
|
/**
|
|
894
894
|
* Forbid use of exported name as identifier of default export.
|
|
895
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
895
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-as-default.md
|
|
896
896
|
*/
|
|
897
897
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
898
898
|
/**
|
|
899
899
|
* Forbid use of exported name as property of default export.
|
|
900
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
900
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-as-default-member.md
|
|
901
901
|
*/
|
|
902
902
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
903
903
|
/**
|
|
904
904
|
* Forbid named default exports.
|
|
905
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
905
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-default.md
|
|
906
906
|
*/
|
|
907
907
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
908
908
|
/**
|
|
909
909
|
* Forbid named exports.
|
|
910
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
910
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-export.md
|
|
911
911
|
*/
|
|
912
912
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
913
913
|
/**
|
|
914
914
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
915
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
915
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-namespace.md
|
|
916
916
|
*/
|
|
917
917
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
918
918
|
/**
|
|
919
919
|
* Forbid Node.js builtin modules.
|
|
920
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
920
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-nodejs-modules.md
|
|
921
921
|
*/
|
|
922
922
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
923
923
|
/**
|
|
924
924
|
* Forbid importing packages through relative paths.
|
|
925
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
925
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-relative-packages.md
|
|
926
926
|
*/
|
|
927
927
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
928
928
|
/**
|
|
929
929
|
* Forbid importing modules from parent directories.
|
|
930
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
930
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-relative-parent-imports.md
|
|
931
931
|
*/
|
|
932
932
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
933
933
|
/**
|
|
934
934
|
* Enforce which files can be imported in a given folder.
|
|
935
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
935
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-restricted-paths.md
|
|
936
936
|
*/
|
|
937
937
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
938
938
|
/**
|
|
939
939
|
* Forbid a module from importing itself.
|
|
940
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
940
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-self-import.md
|
|
941
941
|
*/
|
|
942
942
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
943
943
|
/**
|
|
944
944
|
* Forbid unassigned imports.
|
|
945
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
945
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-unassigned-import.md
|
|
946
946
|
*/
|
|
947
947
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
948
948
|
/**
|
|
949
949
|
* Ensure imports point to a file/module that can be resolved.
|
|
950
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
950
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-unresolved.md
|
|
951
951
|
*/
|
|
952
952
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
953
953
|
/**
|
|
954
954
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
955
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
955
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-unused-modules.md
|
|
956
956
|
*/
|
|
957
957
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
958
958
|
/**
|
|
959
959
|
* Forbid unnecessary path segments in import and require statements.
|
|
960
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
960
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-useless-path-segments.md
|
|
961
961
|
*/
|
|
962
962
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
963
963
|
/**
|
|
964
964
|
* Forbid webpack loader syntax in imports.
|
|
965
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
965
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-webpack-loader-syntax.md
|
|
966
966
|
*/
|
|
967
967
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
968
968
|
/**
|
|
969
969
|
* Enforce a convention in module import order.
|
|
970
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
970
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/order.md
|
|
971
971
|
*/
|
|
972
972
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
973
973
|
/**
|
|
974
974
|
* Prefer a default export if module exports a single name or multiple names.
|
|
975
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
975
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/prefer-default-export.md
|
|
976
976
|
*/
|
|
977
977
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
978
978
|
/**
|
|
979
979
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
980
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
980
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/unambiguous.md
|
|
981
981
|
*/
|
|
982
982
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
983
983
|
/**
|
|
@@ -1231,6 +1231,11 @@ interface RuleOptions {
|
|
|
1231
1231
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header
|
|
1232
1232
|
*/
|
|
1233
1233
|
'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType>
|
|
1234
|
+
/**
|
|
1235
|
+
* Requires template tags for each generic type parameter
|
|
1236
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
1237
|
+
*/
|
|
1238
|
+
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>
|
|
1234
1239
|
/**
|
|
1235
1240
|
* Requires that throw statements are documented.
|
|
1236
1241
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
@@ -8681,6 +8686,10 @@ type JsdocRequireReturnsType = []|[{
|
|
|
8681
8686
|
context?: string
|
|
8682
8687
|
})[]
|
|
8683
8688
|
}]
|
|
8689
|
+
// ----- jsdoc/require-template -----
|
|
8690
|
+
type JsdocRequireTemplate = []|[{
|
|
8691
|
+
requireSeparateTemplates?: boolean
|
|
8692
|
+
}]
|
|
8684
8693
|
// ----- jsdoc/require-throws -----
|
|
8685
8694
|
type JsdocRequireThrows = []|[{
|
|
8686
8695
|
contexts?: (string | {
|
package/dist/index.d.ts
CHANGED
|
@@ -756,42 +756,42 @@ interface RuleOptions {
|
|
|
756
756
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
757
757
|
/**
|
|
758
758
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
759
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
759
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/consistent-type-specifier-style.md
|
|
760
760
|
*/
|
|
761
761
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
762
762
|
/**
|
|
763
763
|
* Ensure a default export is present, given a default import.
|
|
764
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
764
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/default.md
|
|
765
765
|
*/
|
|
766
766
|
'import/default'?: Linter.RuleEntry<[]>
|
|
767
767
|
/**
|
|
768
768
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
769
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
769
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/dynamic-import-chunkname.md
|
|
770
770
|
*/
|
|
771
771
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
772
772
|
/**
|
|
773
773
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
774
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
774
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/export.md
|
|
775
775
|
*/
|
|
776
776
|
'import/export'?: Linter.RuleEntry<[]>
|
|
777
777
|
/**
|
|
778
778
|
* Ensure all exports appear after other statements.
|
|
779
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
779
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/exports-last.md
|
|
780
780
|
*/
|
|
781
781
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
782
782
|
/**
|
|
783
783
|
* Ensure consistent use of file extension within the import path.
|
|
784
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
784
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/extensions.md
|
|
785
785
|
*/
|
|
786
786
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
787
787
|
/**
|
|
788
788
|
* Ensure all imports appear before other statements.
|
|
789
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
789
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/first.md
|
|
790
790
|
*/
|
|
791
791
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
792
792
|
/**
|
|
793
793
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
794
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
794
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/group-exports.md
|
|
795
795
|
*/
|
|
796
796
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
797
797
|
/**
|
|
@@ -802,182 +802,182 @@ interface RuleOptions {
|
|
|
802
802
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
803
803
|
/**
|
|
804
804
|
* Enforce the maximum number of dependencies a module can have.
|
|
805
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
805
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/max-dependencies.md
|
|
806
806
|
*/
|
|
807
807
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
808
808
|
/**
|
|
809
809
|
* Ensure named imports correspond to a named export in the remote file.
|
|
810
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
810
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/named.md
|
|
811
811
|
*/
|
|
812
812
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
813
813
|
/**
|
|
814
814
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
815
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
815
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/namespace.md
|
|
816
816
|
*/
|
|
817
817
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
818
818
|
/**
|
|
819
819
|
* Enforce a newline after import statements.
|
|
820
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
820
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/newline-after-import.md
|
|
821
821
|
*/
|
|
822
822
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
823
823
|
/**
|
|
824
824
|
* Forbid import of modules using absolute paths.
|
|
825
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
825
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-absolute-path.md
|
|
826
826
|
*/
|
|
827
827
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
828
828
|
/**
|
|
829
829
|
* Forbid AMD `require` and `define` calls.
|
|
830
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
830
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-amd.md
|
|
831
831
|
*/
|
|
832
832
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
833
833
|
/**
|
|
834
834
|
* Forbid anonymous values as default exports.
|
|
835
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
835
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-anonymous-default-export.md
|
|
836
836
|
*/
|
|
837
837
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
838
838
|
/**
|
|
839
839
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
840
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
840
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-commonjs.md
|
|
841
841
|
*/
|
|
842
842
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
843
843
|
/**
|
|
844
844
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
845
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
845
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-cycle.md
|
|
846
846
|
*/
|
|
847
847
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
848
848
|
/**
|
|
849
849
|
* Forbid default exports.
|
|
850
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
850
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-default-export.md
|
|
851
851
|
*/
|
|
852
852
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
853
853
|
/**
|
|
854
854
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
855
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
855
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-deprecated.md
|
|
856
856
|
*/
|
|
857
857
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
858
858
|
/**
|
|
859
859
|
* Forbid repeated import of the same module in multiple places.
|
|
860
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
860
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-duplicates.md
|
|
861
861
|
*/
|
|
862
862
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
863
863
|
/**
|
|
864
864
|
* Forbid `require()` calls with expressions.
|
|
865
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
865
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-dynamic-require.md
|
|
866
866
|
*/
|
|
867
867
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
868
868
|
/**
|
|
869
869
|
* Forbid empty named import blocks.
|
|
870
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
870
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-empty-named-blocks.md
|
|
871
871
|
*/
|
|
872
872
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
873
873
|
/**
|
|
874
874
|
* Forbid the use of extraneous packages.
|
|
875
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
875
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-extraneous-dependencies.md
|
|
876
876
|
*/
|
|
877
877
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
878
878
|
/**
|
|
879
879
|
* Forbid import statements with CommonJS module.exports.
|
|
880
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
880
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-import-module-exports.md
|
|
881
881
|
*/
|
|
882
882
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
883
883
|
/**
|
|
884
884
|
* Forbid importing the submodules of other modules.
|
|
885
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
885
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-internal-modules.md
|
|
886
886
|
*/
|
|
887
887
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
888
888
|
/**
|
|
889
889
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
890
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
890
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-mutable-exports.md
|
|
891
891
|
*/
|
|
892
892
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
893
893
|
/**
|
|
894
894
|
* Forbid use of exported name as identifier of default export.
|
|
895
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
895
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-as-default.md
|
|
896
896
|
*/
|
|
897
897
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
898
898
|
/**
|
|
899
899
|
* Forbid use of exported name as property of default export.
|
|
900
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
900
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-as-default-member.md
|
|
901
901
|
*/
|
|
902
902
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
903
903
|
/**
|
|
904
904
|
* Forbid named default exports.
|
|
905
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
905
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-default.md
|
|
906
906
|
*/
|
|
907
907
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
908
908
|
/**
|
|
909
909
|
* Forbid named exports.
|
|
910
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
910
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-named-export.md
|
|
911
911
|
*/
|
|
912
912
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
913
913
|
/**
|
|
914
914
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
915
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
915
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-namespace.md
|
|
916
916
|
*/
|
|
917
917
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
918
918
|
/**
|
|
919
919
|
* Forbid Node.js builtin modules.
|
|
920
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
920
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-nodejs-modules.md
|
|
921
921
|
*/
|
|
922
922
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
923
923
|
/**
|
|
924
924
|
* Forbid importing packages through relative paths.
|
|
925
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
925
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-relative-packages.md
|
|
926
926
|
*/
|
|
927
927
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
928
928
|
/**
|
|
929
929
|
* Forbid importing modules from parent directories.
|
|
930
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
930
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-relative-parent-imports.md
|
|
931
931
|
*/
|
|
932
932
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
933
933
|
/**
|
|
934
934
|
* Enforce which files can be imported in a given folder.
|
|
935
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
935
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-restricted-paths.md
|
|
936
936
|
*/
|
|
937
937
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
938
938
|
/**
|
|
939
939
|
* Forbid a module from importing itself.
|
|
940
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
940
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-self-import.md
|
|
941
941
|
*/
|
|
942
942
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
943
943
|
/**
|
|
944
944
|
* Forbid unassigned imports.
|
|
945
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
945
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-unassigned-import.md
|
|
946
946
|
*/
|
|
947
947
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
948
948
|
/**
|
|
949
949
|
* Ensure imports point to a file/module that can be resolved.
|
|
950
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
950
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-unresolved.md
|
|
951
951
|
*/
|
|
952
952
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
953
953
|
/**
|
|
954
954
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
955
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
955
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-unused-modules.md
|
|
956
956
|
*/
|
|
957
957
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
958
958
|
/**
|
|
959
959
|
* Forbid unnecessary path segments in import and require statements.
|
|
960
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
960
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-useless-path-segments.md
|
|
961
961
|
*/
|
|
962
962
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
963
963
|
/**
|
|
964
964
|
* Forbid webpack loader syntax in imports.
|
|
965
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
965
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/no-webpack-loader-syntax.md
|
|
966
966
|
*/
|
|
967
967
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
968
968
|
/**
|
|
969
969
|
* Enforce a convention in module import order.
|
|
970
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
970
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/order.md
|
|
971
971
|
*/
|
|
972
972
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
973
973
|
/**
|
|
974
974
|
* Prefer a default export if module exports a single name or multiple names.
|
|
975
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
975
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/prefer-default-export.md
|
|
976
976
|
*/
|
|
977
977
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
978
978
|
/**
|
|
979
979
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
980
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/
|
|
980
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v3.0.1/docs/rules/unambiguous.md
|
|
981
981
|
*/
|
|
982
982
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
983
983
|
/**
|
|
@@ -1231,6 +1231,11 @@ interface RuleOptions {
|
|
|
1231
1231
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header
|
|
1232
1232
|
*/
|
|
1233
1233
|
'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType>
|
|
1234
|
+
/**
|
|
1235
|
+
* Requires template tags for each generic type parameter
|
|
1236
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
1237
|
+
*/
|
|
1238
|
+
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>
|
|
1234
1239
|
/**
|
|
1235
1240
|
* Requires that throw statements are documented.
|
|
1236
1241
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
@@ -8681,6 +8686,10 @@ type JsdocRequireReturnsType = []|[{
|
|
|
8681
8686
|
context?: string
|
|
8682
8687
|
})[]
|
|
8683
8688
|
}]
|
|
8689
|
+
// ----- jsdoc/require-template -----
|
|
8690
|
+
type JsdocRequireTemplate = []|[{
|
|
8691
|
+
requireSeparateTemplates?: boolean
|
|
8692
|
+
}]
|
|
8684
8693
|
// ----- jsdoc/require-throws -----
|
|
8685
8694
|
type JsdocRequireThrows = []|[{
|
|
8686
8695
|
contexts?: (string | {
|
package/dist/index.js
CHANGED
|
@@ -1528,6 +1528,7 @@ function sortTsconfig() {
|
|
|
1528
1528
|
"allowSyntheticDefaultImports",
|
|
1529
1529
|
"esModuleInterop",
|
|
1530
1530
|
"forceConsistentCasingInFileNames",
|
|
1531
|
+
"isolatedDeclarations",
|
|
1531
1532
|
"isolatedModules",
|
|
1532
1533
|
"preserveSymlinks",
|
|
1533
1534
|
"verbatimModuleSyntax",
|
|
@@ -1855,7 +1856,7 @@ async function typescript(options = {}) {
|
|
|
1855
1856
|
"no-redeclare": "off",
|
|
1856
1857
|
"no-use-before-define": "off",
|
|
1857
1858
|
"no-useless-constructor": "off",
|
|
1858
|
-
"ts/ban-ts-comment": ["error", { "ts-
|
|
1859
|
+
"ts/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
|
|
1859
1860
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
1860
1861
|
"ts/consistent-type-imports": ["error", { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
1861
1862
|
"ts/method-signature-style": ["error", "property"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.22.
|
|
4
|
+
"version": "2.22.2",
|
|
5
5
|
"description": "Anthony's ESLint config",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"eslint-plugin-antfu": "^2.3.4",
|
|
93
93
|
"eslint-plugin-command": "^0.2.3",
|
|
94
94
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
95
|
-
"eslint-plugin-import-x": "^0.
|
|
96
|
-
"eslint-plugin-jsdoc": "^48.
|
|
95
|
+
"eslint-plugin-import-x": "^3.0.1",
|
|
96
|
+
"eslint-plugin-jsdoc": "^48.7.0",
|
|
97
97
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
98
|
-
"eslint-plugin-markdown": "^5.
|
|
98
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
99
99
|
"eslint-plugin-n": "^17.9.0",
|
|
100
100
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
101
101
|
"eslint-plugin-perfectionist": "^2.11.0",
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"yargs": "^17.7.2"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
|
-
"@antfu/ni": "^0.
|
|
122
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
121
|
+
"@antfu/ni": "^0.22.0",
|
|
122
|
+
"@eslint-react/eslint-plugin": "^1.5.25",
|
|
123
123
|
"@eslint/config-inspector": "^0.5.1",
|
|
124
124
|
"@prettier/plugin-xml": "^3.4.1",
|
|
125
125
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
138
138
|
"eslint-plugin-react-refresh": "^0.4.8",
|
|
139
139
|
"eslint-plugin-solid": "^0.14.1",
|
|
140
|
-
"eslint-plugin-svelte": "^2.
|
|
140
|
+
"eslint-plugin-svelte": "^2.42.0",
|
|
141
141
|
"eslint-ts-patch": "9.5.0-0",
|
|
142
142
|
"eslint-typegen": "^0.2.4",
|
|
143
143
|
"esno": "^4.7.0",
|
|
@@ -147,16 +147,16 @@
|
|
|
147
147
|
"lint-staged": "^15.2.7",
|
|
148
148
|
"prettier-plugin-astro": "^0.14.0",
|
|
149
149
|
"prettier-plugin-slidev": "^1.0.5",
|
|
150
|
-
"rimraf": "^6.0.
|
|
150
|
+
"rimraf": "^6.0.1",
|
|
151
151
|
"simple-git-hooks": "^2.11.1",
|
|
152
152
|
"svelte": "^4.2.18",
|
|
153
|
-
"svelte-eslint-parser": "^0.
|
|
153
|
+
"svelte-eslint-parser": "^0.40.0",
|
|
154
154
|
"tsup": "^8.1.0",
|
|
155
155
|
"tsx": "^4.16.2",
|
|
156
156
|
"typescript": "^5.5.3",
|
|
157
|
-
"vitest": "^2.0.
|
|
157
|
+
"vitest": "^2.0.2",
|
|
158
158
|
"vue": "^3.4.31",
|
|
159
|
-
"@antfu/eslint-config": "2.22.
|
|
159
|
+
"@antfu/eslint-config": "2.22.2"
|
|
160
160
|
},
|
|
161
161
|
"resolutions": {
|
|
162
162
|
"tsx": "~4.16.2"
|