@moso/eslint-config 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/index.d.mts +483 -461
- package/dist/index.mjs +287 -263
- package/package.json +31 -31
package/dist/index.d.mts
CHANGED
|
@@ -7,51 +7,38 @@ import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
|
7
7
|
import { Options } from "eslint-processor-vue-blocks";
|
|
8
8
|
import { SharedConfig } from "@typescript-eslint/utils/ts-eslint";
|
|
9
9
|
//#region src/globs.d.ts
|
|
10
|
-
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
11
|
-
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
12
|
-
declare const GLOB_JS = "**/*.?([cm])js";
|
|
13
|
-
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
14
|
-
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
15
|
-
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
16
|
-
declare const GLOB_DTS = "**/?(.)*.d.?([cm])ts";
|
|
17
|
-
declare const GLOB_ROOT_JS = "
|
|
18
|
-
declare const GLOB_ROOT_JSX = "
|
|
19
|
-
declare const GLOB_ROOT_TS = "
|
|
20
|
-
declare const GLOB_ROOT_TSX = "
|
|
21
|
-
declare const GLOB_ROOT_DTS = "
|
|
22
|
-
declare const GLOB_MJS = "**/*.mjs";
|
|
23
|
-
declare const
|
|
24
|
-
declare const
|
|
25
|
-
declare const
|
|
26
|
-
declare const
|
|
27
|
-
declare const
|
|
28
|
-
declare const
|
|
29
|
-
declare const
|
|
30
|
-
declare const
|
|
31
|
-
declare const
|
|
32
|
-
declare const
|
|
33
|
-
declare const
|
|
34
|
-
declare const
|
|
35
|
-
declare const
|
|
36
|
-
declare const
|
|
37
|
-
declare const
|
|
38
|
-
declare const
|
|
39
|
-
declare const
|
|
40
|
-
declare const
|
|
41
|
-
declare const
|
|
42
|
-
declare const GLOB_SVG = "**/*.svg";
|
|
43
|
-
declare const GLOB_TOML = "**/*.toml";
|
|
44
|
-
declare const GLOB_VUE = "**/*.vue";
|
|
45
|
-
declare const GLOB_XML = "**/*.xml";
|
|
46
|
-
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
47
|
-
declare const GLOB_TYPINGS = "typings/**/?(.)*.?([cm])ts";
|
|
48
|
-
declare const GLOB_TESTS: string[];
|
|
49
|
-
declare const GLOB_ALL_SRC: string[];
|
|
50
|
-
declare const GLOB_NODE_MODULES: "**/node_modules";
|
|
51
|
-
declare const GLOB_DIST: "**/dist";
|
|
52
|
-
declare const GLOB_LOCKFILE: string[];
|
|
53
|
-
declare const GLOB_AI: string[];
|
|
54
|
-
declare const GLOB_EXCLUDE: string[];
|
|
10
|
+
export declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
11
|
+
export declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
12
|
+
export declare const GLOB_JS = "**/*.?([cm])js";
|
|
13
|
+
export declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
14
|
+
export declare const GLOB_TS = "**/*.?([cm])ts";
|
|
15
|
+
export declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
16
|
+
export declare const GLOB_DTS = "**/?(.)*.d.?([cm])ts";
|
|
17
|
+
export declare const GLOB_ROOT_JS = "?(.)*.?([cm])js";
|
|
18
|
+
export declare const GLOB_ROOT_JSX = "?(.)*.?([cm])jsx";
|
|
19
|
+
export declare const GLOB_ROOT_TS = "?(.)*.?([cm])ts";
|
|
20
|
+
export declare const GLOB_ROOT_TSX = "?(.)*.?([cm])tsx";
|
|
21
|
+
export declare const GLOB_ROOT_DTS = "?(.)*.d.?([cm])ts";
|
|
22
|
+
export declare const GLOB_MJS = "**/*.mjs";
|
|
23
|
+
export declare const GLOB_CJS = "**/*.cjs";
|
|
24
|
+
export declare const GLOB_TYPINGS = "typings/**/?(.)*.?([cm])ts";
|
|
25
|
+
export declare const GLOB_STYLE = "**/?(.)*.{c,le,sa,sc,pc,postc}ss";
|
|
26
|
+
export declare const GLOB_CSS_IN_JS = "**/*.css.{j,t}s";
|
|
27
|
+
export declare const GLOB_JSON = "**/*.json";
|
|
28
|
+
export declare const GLOB_JSON5 = "**/*.json5";
|
|
29
|
+
export declare const GLOB_JSONC = "**/*.jsonc";
|
|
30
|
+
export declare const GLOB_ASTRO = "**/*.astro";
|
|
31
|
+
export declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
32
|
+
export declare const GLOB_MARKDOWN = "**/*.md";
|
|
33
|
+
export declare const GLOB_TOML = "**/*.toml";
|
|
34
|
+
export declare const GLOB_VUE = "**/*.vue";
|
|
35
|
+
export declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
36
|
+
export declare const GLOB_TESTS: string[];
|
|
37
|
+
export declare const GLOB_NODE_MODULES: "**/node_modules";
|
|
38
|
+
export declare const GLOB_DIST: "**/dist";
|
|
39
|
+
export declare const GLOB_LOCKFILE: string[];
|
|
40
|
+
export declare const GLOB_AI: string[];
|
|
41
|
+
export declare const GLOB_EXCLUDE: string[];
|
|
55
42
|
//#endregion
|
|
56
43
|
//#region src/typegen.d.ts
|
|
57
44
|
interface RuleOptions {
|
|
@@ -197,7 +184,7 @@ interface RuleOptions {
|
|
|
197
184
|
*/
|
|
198
185
|
'@eslint-react/globals'?: Linter.RuleEntry<[]>;
|
|
199
186
|
/**
|
|
200
|
-
* Validates against
|
|
187
|
+
* Validates against mutating props, state, and other immutable values, including through functions passed into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
201
188
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
202
189
|
*/
|
|
203
190
|
'@eslint-react/immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -552,7 +539,7 @@ interface RuleOptions {
|
|
|
552
539
|
*/
|
|
553
540
|
'@eslint-react/x-globals'?: Linter.RuleEntry<[]>;
|
|
554
541
|
/**
|
|
555
|
-
* Validates against
|
|
542
|
+
* Validates against mutating props, state, and other immutable values, including through functions passed into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
556
543
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
557
544
|
*/
|
|
558
545
|
'@eslint-react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -842,7 +829,7 @@ interface RuleOptions {
|
|
|
842
829
|
*/
|
|
843
830
|
'@moso/no-redundant-variable'?: Linter.RuleEntry<[]>;
|
|
844
831
|
/**
|
|
845
|
-
* Disallow
|
|
832
|
+
* Disallow multiline expressions in string interpolation.
|
|
846
833
|
* @see no-string-interpolation
|
|
847
834
|
*/
|
|
848
835
|
'@moso/no-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
@@ -862,7 +849,7 @@ interface RuleOptions {
|
|
|
862
849
|
*/
|
|
863
850
|
'@moso/prefer-early-return'?: Linter.RuleEntry<MosoPreferEarlyReturn>;
|
|
864
851
|
/**
|
|
865
|
-
* Enforce fetch
|
|
852
|
+
* Enforce `fetch()` over legacy HTTP request APIs and libraries.
|
|
866
853
|
* @see prefer-fetch
|
|
867
854
|
*/
|
|
868
855
|
'@moso/prefer-fetch'?: Linter.RuleEntry<[]>;
|
|
@@ -2914,6 +2901,10 @@ interface RuleOptions {
|
|
|
2914
2901
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
2915
2902
|
*/
|
|
2916
2903
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
2904
|
+
/**
|
|
2905
|
+
* Reports redundant @type tags that match or broaden the naturally inferred TypeScript type.
|
|
2906
|
+
*/
|
|
2907
|
+
'jsdoc/no-unnecessary-type-assertion'?: Linter.RuleEntry<JsdocNoUnnecessaryTypeAssertion>;
|
|
2917
2908
|
/**
|
|
2918
2909
|
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
2919
2910
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header
|
|
@@ -4788,1740 +4779,1740 @@ interface RuleOptions {
|
|
|
4788
4779
|
'toml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>;
|
|
4789
4780
|
/**
|
|
4790
4781
|
* Prefer better DOM traversal APIs.
|
|
4791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/better-dom-traversing.md
|
|
4792
4783
|
*/
|
|
4793
4784
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
4794
4785
|
/**
|
|
4795
4786
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
4796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
4797
4788
|
* @deprecated
|
|
4798
4789
|
*/
|
|
4799
4790
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
4800
4791
|
/**
|
|
4801
4792
|
* Enforce a specific parameter name in catch clauses.
|
|
4802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/catch-error-name.md
|
|
4803
4794
|
*/
|
|
4804
4795
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4805
4796
|
/**
|
|
4806
4797
|
* Enforce consistent class references in static methods.
|
|
4807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/class-reference-in-static-methods.md
|
|
4808
4799
|
*/
|
|
4809
4800
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
4810
4801
|
/**
|
|
4811
4802
|
* Enforce better comment content.
|
|
4812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/comment-content.md
|
|
4813
4804
|
*/
|
|
4814
4805
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
4815
4806
|
/**
|
|
4816
4807
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
4817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-arrow-return-style.md
|
|
4818
4809
|
*/
|
|
4819
4810
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
4820
4811
|
/**
|
|
4821
4812
|
* Enforce consistent assertion style with `node:assert`.
|
|
4822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-assert.md
|
|
4823
4814
|
*/
|
|
4824
4815
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4825
4816
|
/**
|
|
4826
4817
|
* Enforce consistent naming for boolean names.
|
|
4827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-boolean-name.md
|
|
4828
4819
|
*/
|
|
4829
4820
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
4830
4821
|
/**
|
|
4831
4822
|
* Enforce consistent class member order.
|
|
4832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-class-member-order.md
|
|
4833
4824
|
*/
|
|
4834
4825
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
4835
4826
|
/**
|
|
4836
4827
|
* Enforce consistent spelling of compound words in identifiers.
|
|
4837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-compound-words.md
|
|
4838
4829
|
*/
|
|
4839
4830
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
4840
4831
|
/**
|
|
4841
4832
|
* Enforce consistent conditional object spread style.
|
|
4842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
4843
4834
|
*/
|
|
4844
4835
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
4845
4836
|
/**
|
|
4846
4837
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-date-clone.md
|
|
4848
4839
|
*/
|
|
4849
4840
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4850
4841
|
/**
|
|
4851
4842
|
* Use destructured variables over properties.
|
|
4852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-destructuring.md
|
|
4853
4844
|
*/
|
|
4854
4845
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4855
4846
|
/**
|
|
4856
4847
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4858
4849
|
*/
|
|
4859
4850
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4860
4851
|
/**
|
|
4861
4852
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-existence-index-check.md
|
|
4863
4854
|
*/
|
|
4864
4855
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
4865
4856
|
/**
|
|
4866
4857
|
* Enforce consistent decorator position on exported classes.
|
|
4867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-export-decorator-position.md
|
|
4868
4859
|
*/
|
|
4869
4860
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
4870
4861
|
/**
|
|
4871
4862
|
* Move function definitions to the highest possible scope.
|
|
4872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-scoping.md
|
|
4873
4864
|
*/
|
|
4874
4865
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4875
4866
|
/**
|
|
4876
4867
|
* Enforce function syntax by role.
|
|
4877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-style.md
|
|
4878
4869
|
*/
|
|
4879
4870
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
4880
4871
|
/**
|
|
4881
4872
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
4882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-json-file-read.md
|
|
4883
4874
|
*/
|
|
4884
4875
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
4885
4876
|
/**
|
|
4886
4877
|
* Enforce consistent optional chaining for same-base member access.
|
|
4887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-optional-chaining.md
|
|
4888
4879
|
*/
|
|
4889
4880
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
4890
4881
|
/**
|
|
4891
4882
|
* Enforce consistent style for escaping `${` in template literals.
|
|
4892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-template-literal-escape.md
|
|
4893
4884
|
*/
|
|
4894
4885
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
4895
4886
|
/**
|
|
4896
4887
|
* Enforce consistent labels on tuple type elements.
|
|
4897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-tuple-labels.md
|
|
4898
4889
|
*/
|
|
4899
4890
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
4900
4891
|
/**
|
|
4901
4892
|
* Enforce correct `Error` subclassing.
|
|
4902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/custom-error-definition.md
|
|
4903
4894
|
*/
|
|
4904
4895
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
4905
4896
|
/**
|
|
4906
4897
|
* Enforce consistent default export declarations.
|
|
4907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/default-export-style.md
|
|
4908
4899
|
*/
|
|
4909
4900
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
4910
4901
|
/**
|
|
4911
4902
|
* Enforce consistent style for DOM element dataset access.
|
|
4912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/dom-node-dataset.md
|
|
4913
4904
|
*/
|
|
4914
4905
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
4915
4906
|
/**
|
|
4916
4907
|
* Enforce no spaces between braces.
|
|
4917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/empty-brace-spaces.md
|
|
4918
4909
|
*/
|
|
4919
4910
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
4920
4911
|
/**
|
|
4921
4912
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/error-message.md
|
|
4923
4914
|
*/
|
|
4924
4915
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
4925
4916
|
/**
|
|
4926
4917
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/escape-case.md
|
|
4928
4919
|
*/
|
|
4929
4920
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4930
4921
|
/**
|
|
4931
4922
|
* Add expiration conditions to TODO comments.
|
|
4932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/expiring-todo-comments.md
|
|
4933
4924
|
*/
|
|
4934
4925
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4935
4926
|
/**
|
|
4936
4927
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-length-check.md
|
|
4938
4929
|
*/
|
|
4939
4930
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4940
4931
|
/**
|
|
4941
4932
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
4942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-timer-delay.md
|
|
4943
4934
|
*/
|
|
4944
4935
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
4945
4936
|
/**
|
|
4946
4937
|
* Enforce a case style for filenames and directory names.
|
|
4947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/filename-case.md
|
|
4948
4939
|
*/
|
|
4949
4940
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4950
4941
|
/**
|
|
4951
4942
|
* Require identifiers to match a specified regular expression.
|
|
4952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/id-match.md
|
|
4953
4944
|
*/
|
|
4954
4945
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
4955
4946
|
/**
|
|
4956
4947
|
* Enforce specific import styles per module.
|
|
4957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/import-style.md
|
|
4958
4949
|
*/
|
|
4959
4950
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
4960
4951
|
/**
|
|
4961
4952
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
4962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/isolated-functions.md
|
|
4963
4954
|
*/
|
|
4964
4955
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
4965
4956
|
/**
|
|
4966
4957
|
* Enforce a consistent style for optional loop sources.
|
|
4967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/iteration-fallback-style.md
|
|
4968
4959
|
*/
|
|
4969
4960
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
4970
4961
|
/**
|
|
4971
4962
|
* Require or disallow logical assignment operator shorthand
|
|
4972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/logical-assignment-operators.md
|
|
4973
4964
|
*/
|
|
4974
4965
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
4975
4966
|
/**
|
|
4976
4967
|
* Limit the depth of nested calls.
|
|
4977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/max-nested-calls.md
|
|
4978
4969
|
*/
|
|
4979
4970
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
4980
4971
|
/**
|
|
4981
4972
|
* Enforce replacements for variable, property, and filenames.
|
|
4982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/name-replacements.md
|
|
4983
4974
|
*/
|
|
4984
4975
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
4985
4976
|
/**
|
|
4986
4977
|
* Enforce correct use of `new` for builtin constructors.
|
|
4987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/new-for-builtins.md
|
|
4988
4979
|
*/
|
|
4989
4980
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
4990
4981
|
/**
|
|
4991
4982
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4993
4984
|
*/
|
|
4994
4985
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
4995
4986
|
/**
|
|
4996
4987
|
* Disallow recursive access to `this` within getters and setters.
|
|
4997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accessor-recursion.md
|
|
4998
4989
|
*/
|
|
4999
4990
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5000
4991
|
/**
|
|
5001
4992
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
5002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
5003
4994
|
*/
|
|
5004
4995
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
5005
4996
|
/**
|
|
5006
4997
|
* Disallow anonymous functions and classes as the default export.
|
|
5007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-anonymous-default-export.md
|
|
5008
4999
|
*/
|
|
5009
5000
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5010
5001
|
/**
|
|
5011
5002
|
* Prevent passing a function reference directly to iterator methods.
|
|
5012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-callback-reference.md
|
|
5013
5004
|
*/
|
|
5014
5005
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
5015
5006
|
/**
|
|
5016
5007
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
5017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-concat-in-loop.md
|
|
5018
5009
|
*/
|
|
5019
5010
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
5020
5011
|
/**
|
|
5021
5012
|
* Disallow using reference values as `Array#fill()` values.
|
|
5022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
5023
5014
|
*/
|
|
5024
5015
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
5025
5016
|
/**
|
|
5026
5017
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
5027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-from-fill.md
|
|
5028
5019
|
*/
|
|
5029
5020
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
5030
5021
|
/**
|
|
5031
5022
|
* Disallow front-of-array mutation.
|
|
5032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-front-mutation.md
|
|
5033
5024
|
*/
|
|
5034
5025
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
5035
5026
|
/**
|
|
5036
5027
|
* Disallow using the `this` argument in array methods.
|
|
5037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-method-this-argument.md
|
|
5038
5029
|
*/
|
|
5039
5030
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5040
5031
|
/**
|
|
5041
5032
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5043
5034
|
* @deprecated
|
|
5044
5035
|
*/
|
|
5045
5036
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5046
5037
|
/**
|
|
5047
5038
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reduce.md
|
|
5049
5040
|
*/
|
|
5050
5041
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5051
5042
|
/**
|
|
5052
5043
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reverse.md
|
|
5054
5045
|
*/
|
|
5055
5046
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5056
5047
|
/**
|
|
5057
5048
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort.md
|
|
5059
5050
|
*/
|
|
5060
5051
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5061
5052
|
/**
|
|
5062
5053
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
5063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
5064
5055
|
*/
|
|
5065
5056
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
5066
5057
|
/**
|
|
5067
5058
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
5068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-splice.md
|
|
5069
5060
|
*/
|
|
5070
5061
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
5071
5062
|
/**
|
|
5072
5063
|
* Disallow asterisk prefixes in documentation comments.
|
|
5073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
5074
5065
|
*/
|
|
5075
5066
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
5076
5067
|
/**
|
|
5077
5068
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
5078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-async-promise-finally.md
|
|
5079
5070
|
*/
|
|
5080
5071
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
5081
5072
|
/**
|
|
5082
5073
|
* Disallow member access from await expression.
|
|
5083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-expression-member.md
|
|
5084
5075
|
*/
|
|
5085
5076
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5086
5077
|
/**
|
|
5087
5078
|
* Disallow using `await` in `Promise` method parameters.
|
|
5088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5089
5080
|
*/
|
|
5090
5081
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5091
5082
|
/**
|
|
5092
5083
|
* Disallow barrel files.
|
|
5093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-barrel-files.md
|
|
5094
5085
|
*/
|
|
5095
5086
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
5096
5087
|
/**
|
|
5097
5088
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
5098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-blob-to-file.md
|
|
5099
5090
|
*/
|
|
5100
5091
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
5101
5092
|
/**
|
|
5102
5093
|
* Disallow boolean-returning sort comparators.
|
|
5103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
5104
5095
|
*/
|
|
5105
5096
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
5106
5097
|
/**
|
|
5107
5098
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
5108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-break-in-nested-loop.md
|
|
5109
5100
|
*/
|
|
5110
5101
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
5111
5102
|
/**
|
|
5112
5103
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
5113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-canvas-to-image.md
|
|
5114
5105
|
*/
|
|
5115
5106
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
5116
5107
|
/**
|
|
5117
5108
|
* Disallow chained comparisons such as `a < b < c`.
|
|
5118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-chained-comparison.md
|
|
5119
5110
|
*/
|
|
5120
5111
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
5121
5112
|
/**
|
|
5122
5113
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
5123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-collection-bracket-access.md
|
|
5124
5115
|
*/
|
|
5125
5116
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
5126
5117
|
/**
|
|
5127
5118
|
* Disallow dynamic object property existence checks.
|
|
5128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-computed-property-existence-check.md
|
|
5129
5120
|
*/
|
|
5130
5121
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
5131
5122
|
/**
|
|
5132
5123
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
5133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-splice.md
|
|
5134
5125
|
*/
|
|
5135
5126
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
5136
5127
|
/**
|
|
5137
5128
|
* Disallow confusing uses of `Array#with()`.
|
|
5138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-with.md
|
|
5139
5130
|
*/
|
|
5140
5131
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
5141
5132
|
/**
|
|
5142
5133
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-console-spaces.md
|
|
5144
5135
|
*/
|
|
5145
5136
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5146
5137
|
/**
|
|
5147
5138
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
5148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-constant-zero-expression.md
|
|
5149
5140
|
*/
|
|
5150
5141
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
5151
5142
|
/**
|
|
5152
5143
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
5153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
5154
5145
|
*/
|
|
5155
5146
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
5156
5147
|
/**
|
|
5157
5148
|
* Do not use `document.cookie` directly.
|
|
5158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-document-cookie.md
|
|
5159
5150
|
*/
|
|
5160
5151
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5161
5152
|
/**
|
|
5162
5153
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
5163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-double-comparison.md
|
|
5164
5155
|
*/
|
|
5165
5156
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
5166
5157
|
/**
|
|
5167
5158
|
* Disallow duplicate adjacent branches in if chains.
|
|
5168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-if-branches.md
|
|
5169
5160
|
*/
|
|
5170
5161
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
5171
5162
|
/**
|
|
5172
5163
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
5173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
5174
5165
|
*/
|
|
5175
5166
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
5176
5167
|
/**
|
|
5177
5168
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
5178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-loops.md
|
|
5179
5170
|
*/
|
|
5180
5171
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
5181
5172
|
/**
|
|
5182
5173
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
5183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-set-values.md
|
|
5184
5175
|
*/
|
|
5185
5176
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
5186
5177
|
/**
|
|
5187
5178
|
* Disallow empty files.
|
|
5188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-empty-file.md
|
|
5189
5180
|
*/
|
|
5190
5181
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
5191
5182
|
/**
|
|
5192
5183
|
* Disallow assigning to built-in error properties.
|
|
5193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-error-property-assignment.md
|
|
5194
5185
|
*/
|
|
5195
5186
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5196
5187
|
/**
|
|
5197
5188
|
* Disallow exports in scripts.
|
|
5198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-exports-in-scripts.md
|
|
5199
5190
|
*/
|
|
5200
5191
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
5201
5192
|
/**
|
|
5202
5193
|
* Prefer `for…of` over the `forEach` method.
|
|
5203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-each.md
|
|
5204
5195
|
*/
|
|
5205
5196
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
5206
5197
|
/**
|
|
5207
5198
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-loop.md
|
|
5209
5200
|
*/
|
|
5210
5201
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5211
5202
|
/**
|
|
5212
5203
|
* Disallow assigning properties on the global object.
|
|
5213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-global-object-property-assignment.md
|
|
5214
5205
|
*/
|
|
5215
5206
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5216
5207
|
/**
|
|
5217
5208
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
5218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
5219
5210
|
* @deprecated
|
|
5220
5211
|
*/
|
|
5221
5212
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5222
5213
|
/**
|
|
5223
5214
|
* Disallow immediate mutation after variable assignment.
|
|
5224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-immediate-mutation.md
|
|
5225
5216
|
*/
|
|
5226
5217
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5227
5218
|
/**
|
|
5228
5219
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
5229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-impossible-length-comparison.md
|
|
5230
5221
|
*/
|
|
5231
5222
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
5232
5223
|
/**
|
|
5233
5224
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
5234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-query-selector.md
|
|
5235
5226
|
*/
|
|
5236
5227
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
5237
5228
|
/**
|
|
5238
5229
|
* Disallow incorrect template literal interpolation syntax.
|
|
5239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
5240
5231
|
*/
|
|
5241
5232
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
5242
5233
|
/**
|
|
5243
5234
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5245
5236
|
* @deprecated
|
|
5246
5237
|
*/
|
|
5247
5238
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5248
5239
|
/**
|
|
5249
5240
|
* Disallow `instanceof` with built-in objects
|
|
5250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-instanceof-builtins.md
|
|
5251
5242
|
*/
|
|
5252
5243
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5253
5244
|
/**
|
|
5254
5245
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
5255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-argument-count.md
|
|
5256
5247
|
*/
|
|
5257
5248
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
5258
5249
|
/**
|
|
5259
5250
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
5260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-character-comparison.md
|
|
5261
5252
|
*/
|
|
5262
5253
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
5263
5254
|
/**
|
|
5264
5255
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5266
5257
|
*/
|
|
5267
5258
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5268
5259
|
/**
|
|
5269
5260
|
* Disallow invalid `accept` values on file inputs.
|
|
5270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
5271
5262
|
*/
|
|
5272
5263
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
5273
5264
|
/**
|
|
5274
5265
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5276
5267
|
*/
|
|
5277
5268
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5278
5269
|
/**
|
|
5279
5270
|
* Disallow invalid implementations of well-known symbol methods.
|
|
5280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
5281
5272
|
*/
|
|
5282
5273
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
5283
5274
|
/**
|
|
5284
5275
|
* Disallow identifiers starting with `new` or `class`.
|
|
5285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-keyword-prefix.md
|
|
5286
5277
|
*/
|
|
5287
5278
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5288
5279
|
/**
|
|
5289
5280
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
5290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-current-target-access.md
|
|
5291
5282
|
*/
|
|
5292
5283
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
5293
5284
|
/**
|
|
5294
5285
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
5295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-event-control.md
|
|
5296
5287
|
*/
|
|
5297
5288
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
5298
5289
|
/**
|
|
5299
5290
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5301
5292
|
* @deprecated
|
|
5302
5293
|
*/
|
|
5303
5294
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5304
5295
|
/**
|
|
5305
5296
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-lonely-if.md
|
|
5307
5298
|
*/
|
|
5308
5299
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5309
5300
|
/**
|
|
5310
5301
|
* Disallow mutating a loop iterable during iteration.
|
|
5311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
5312
5303
|
*/
|
|
5313
5304
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
5314
5305
|
/**
|
|
5315
5306
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5317
5308
|
*/
|
|
5318
5309
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5319
5310
|
/**
|
|
5320
5311
|
* Disallow manually wrapped comments.
|
|
5321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
5322
5313
|
*/
|
|
5323
5314
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
5324
5315
|
/**
|
|
5325
5316
|
* Disallow checking a Map key before accessing a different key.
|
|
5326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-mismatched-map-key.md
|
|
5327
5318
|
*/
|
|
5328
5319
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
5329
5320
|
/**
|
|
5330
5321
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
5331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-misrefactored-assignment.md
|
|
5332
5323
|
*/
|
|
5333
5324
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
5334
5325
|
/**
|
|
5335
5326
|
* Disallow references to missing local resources.
|
|
5336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-missing-local-resource.md
|
|
5337
5328
|
*/
|
|
5338
5329
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
5339
5330
|
/**
|
|
5340
5331
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
5341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
5342
5333
|
*/
|
|
5343
5334
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
5344
5335
|
/**
|
|
5345
5336
|
* Disallow named usage of default import and export.
|
|
5346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-named-default.md
|
|
5347
5338
|
*/
|
|
5348
5339
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5349
5340
|
/**
|
|
5350
5341
|
* Disallow negated array predicate calls.
|
|
5351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-array-predicate.md
|
|
5352
5343
|
*/
|
|
5353
5344
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
5354
5345
|
/**
|
|
5355
5346
|
* Disallow negated comparisons.
|
|
5356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-comparison.md
|
|
5357
5348
|
*/
|
|
5358
5349
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
5359
5350
|
/**
|
|
5360
5351
|
* Disallow negated conditions.
|
|
5361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-condition.md
|
|
5362
5353
|
*/
|
|
5363
5354
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5364
5355
|
/**
|
|
5365
5356
|
* Disallow negated expression in equality check.
|
|
5366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5367
5358
|
*/
|
|
5368
5359
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5369
5360
|
/**
|
|
5370
5361
|
* Disallow nested ternary expressions.
|
|
5371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nested-ternary.md
|
|
5372
5363
|
*/
|
|
5373
5364
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5374
5365
|
/**
|
|
5375
5366
|
* Disallow `new Array()`.
|
|
5376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-array.md
|
|
5377
5368
|
*/
|
|
5378
5369
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5379
5370
|
/**
|
|
5380
5371
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-buffer.md
|
|
5382
5373
|
*/
|
|
5383
5374
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5384
5375
|
/**
|
|
5385
5376
|
* Disallow non-function values with function-style verb prefixes.
|
|
5386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
5387
5378
|
*/
|
|
5388
5379
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
5389
5380
|
/**
|
|
5390
5381
|
* Disallow non-standard properties on built-in objects.
|
|
5391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
5392
5383
|
*/
|
|
5393
5384
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
5394
5385
|
/**
|
|
5395
5386
|
* Disallow the use of the `null` literal.
|
|
5396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-null.md
|
|
5397
5388
|
*/
|
|
5398
5389
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5399
5390
|
/**
|
|
5400
5391
|
* Disallow the use of objects as default parameters.
|
|
5401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5402
5393
|
*/
|
|
5403
5394
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5404
5395
|
/**
|
|
5405
5396
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
5406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-methods-with-collections.md
|
|
5407
5398
|
*/
|
|
5408
5399
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
5409
5400
|
/**
|
|
5410
5401
|
* Disallow optional chaining on undeclared variables.
|
|
5411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
5412
5403
|
*/
|
|
5413
5404
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
5414
5405
|
/**
|
|
5415
5406
|
* Disallow `process.exit()`.
|
|
5416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-process-exit.md
|
|
5417
5408
|
*/
|
|
5418
5409
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5419
5410
|
/**
|
|
5420
5411
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
5421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-redundant-comparison.md
|
|
5422
5413
|
*/
|
|
5423
5414
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
5424
5415
|
/**
|
|
5425
5416
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
5426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-return-array-push.md
|
|
5427
5418
|
*/
|
|
5428
5419
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
5429
5420
|
/**
|
|
5430
5421
|
* Disallow selector syntax in DOM names.
|
|
5431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-selector-as-dom-name.md
|
|
5432
5423
|
*/
|
|
5433
5424
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
5434
5425
|
/**
|
|
5435
5426
|
* Disallow shorthand properties that override related longhand properties.
|
|
5436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
5437
5428
|
*/
|
|
5438
5429
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
5439
5430
|
/**
|
|
5440
5431
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5442
5433
|
*/
|
|
5443
5434
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5444
5435
|
/**
|
|
5445
5436
|
* Disallow classes that only have static members.
|
|
5446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-static-only-class.md
|
|
5447
5438
|
*/
|
|
5448
5439
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5449
5440
|
/**
|
|
5450
5441
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
5451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-subtraction-comparison.md
|
|
5452
5443
|
*/
|
|
5453
5444
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
5454
5445
|
/**
|
|
5455
5446
|
* Disallow `then` property.
|
|
5456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-thenable.md
|
|
5457
5448
|
*/
|
|
5458
5449
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5459
5450
|
/**
|
|
5460
5451
|
* Disallow assigning `this` to a variable.
|
|
5461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-assignment.md
|
|
5462
5453
|
*/
|
|
5463
5454
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5464
5455
|
/**
|
|
5465
5456
|
* Disallow `this` outside of classes.
|
|
5466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-outside-of-class.md
|
|
5467
5458
|
*/
|
|
5468
5459
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
5469
5460
|
/**
|
|
5470
5461
|
* Disallow assigning to top-level variables from inside functions.
|
|
5471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
5472
5463
|
*/
|
|
5473
5464
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
5474
5465
|
/**
|
|
5475
5466
|
* Disallow top-level side effects in exported modules.
|
|
5476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-side-effects.md
|
|
5477
5468
|
*/
|
|
5478
5469
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
5479
5470
|
/**
|
|
5480
5471
|
* Disallow `all` as a transition property.
|
|
5481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-transition-all.md
|
|
5482
5473
|
*/
|
|
5483
5474
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
5484
5475
|
/**
|
|
5485
5476
|
* Disallow comparing `undefined` using `typeof`.
|
|
5486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-typeof-undefined.md
|
|
5487
5478
|
*/
|
|
5488
5479
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5489
5480
|
/**
|
|
5490
5481
|
* Disallow referencing methods without calling them.
|
|
5491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-uncalled-method.md
|
|
5492
5483
|
*/
|
|
5493
5484
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
5494
5485
|
/**
|
|
5495
5486
|
* Require class members to be declared.
|
|
5496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-undeclared-class-members.md
|
|
5497
5488
|
*/
|
|
5498
5489
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
5499
5490
|
/**
|
|
5500
5491
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5502
5493
|
*/
|
|
5503
5494
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5504
5495
|
/**
|
|
5505
5496
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
5506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
5507
5498
|
*/
|
|
5508
5499
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5509
5500
|
/**
|
|
5510
5501
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5512
5503
|
*/
|
|
5513
5504
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5514
5505
|
/**
|
|
5515
5506
|
* Disallow awaiting non-promise values.
|
|
5516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-await.md
|
|
5517
5508
|
*/
|
|
5518
5509
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5519
5510
|
/**
|
|
5520
5511
|
* Disallow unnecessary comparisons against boolean literals.
|
|
5521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
5522
5513
|
*/
|
|
5523
5514
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
5524
5515
|
/**
|
|
5525
5516
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
5526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
5527
5518
|
*/
|
|
5528
5519
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5529
5520
|
/**
|
|
5530
5521
|
* Disallow unnecessary `globalThis` references.
|
|
5531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-global-this.md
|
|
5532
5523
|
*/
|
|
5533
5524
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
5534
5525
|
/**
|
|
5535
5526
|
* Disallow unnecessary nested ternary expressions.
|
|
5536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
5537
5528
|
*/
|
|
5538
5529
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5539
5530
|
/**
|
|
5540
5531
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5542
5533
|
*/
|
|
5543
5534
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5544
5535
|
/**
|
|
5545
5536
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5547
5538
|
*/
|
|
5548
5539
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5549
5540
|
/**
|
|
5550
5541
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
5551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-splice.md
|
|
5552
5543
|
*/
|
|
5553
5544
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
5554
5545
|
/**
|
|
5555
5546
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
5556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
5557
5548
|
*/
|
|
5558
5549
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
5559
5550
|
/**
|
|
5560
5551
|
* Disallow unreadable array destructuring.
|
|
5561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5562
5553
|
*/
|
|
5563
5554
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
5564
5555
|
/**
|
|
5565
5556
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
5566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
5567
5558
|
*/
|
|
5568
5559
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
5569
5560
|
/**
|
|
5570
5561
|
* Disallow unreadable IIFEs.
|
|
5571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-iife.md
|
|
5572
5563
|
*/
|
|
5573
5564
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5574
5565
|
/**
|
|
5575
5566
|
* Disallow unreadable `new` expressions.
|
|
5576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-new-expression.md
|
|
5577
5568
|
*/
|
|
5578
5569
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
5579
5570
|
/**
|
|
5580
5571
|
* Disallow unreadable object destructuring.
|
|
5581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
5582
5573
|
*/
|
|
5583
5574
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
5584
5575
|
/**
|
|
5585
5576
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
5586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
5587
5578
|
*/
|
|
5588
5579
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
5589
5580
|
/**
|
|
5590
5581
|
* Disallow unsafe DOM HTML APIs.
|
|
5591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-dom-html.md
|
|
5592
5583
|
*/
|
|
5593
5584
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
5594
5585
|
/**
|
|
5595
5586
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
5596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
5597
5588
|
*/
|
|
5598
5589
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
5599
5590
|
/**
|
|
5600
5591
|
* Disallow unsafe values as property keys.
|
|
5601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-property-key.md
|
|
5602
5593
|
*/
|
|
5603
5594
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
5604
5595
|
/**
|
|
5605
5596
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
5606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
5607
5598
|
*/
|
|
5608
5599
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
5609
5600
|
/**
|
|
5610
5601
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
5611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
5612
5603
|
*/
|
|
5613
5604
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
5614
5605
|
/**
|
|
5615
5606
|
* Disallow ignoring the return value of selected array methods.
|
|
5616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-array-method-return.md
|
|
5617
5608
|
*/
|
|
5618
5609
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
5619
5610
|
/**
|
|
5620
5611
|
* Disallow unused object properties.
|
|
5621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-properties.md
|
|
5622
5613
|
*/
|
|
5623
5614
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5624
5615
|
/**
|
|
5625
5616
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
5626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-boolean-cast.md
|
|
5627
5618
|
*/
|
|
5628
5619
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
5629
5620
|
/**
|
|
5630
5621
|
* Disallow useless type coercions of values that are already of the target type.
|
|
5631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-coercion.md
|
|
5632
5623
|
*/
|
|
5633
5624
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
5634
5625
|
/**
|
|
5635
5626
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-collection-argument.md
|
|
5637
5628
|
*/
|
|
5638
5629
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5639
5630
|
/**
|
|
5640
5631
|
* Disallow useless compound assignments such as `x += 0`.
|
|
5641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-compound-assignment.md
|
|
5642
5633
|
*/
|
|
5643
5634
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
5644
5635
|
/**
|
|
5645
5636
|
* Disallow useless concatenation of literals.
|
|
5646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-concat.md
|
|
5647
5638
|
*/
|
|
5648
5639
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
5649
5640
|
/**
|
|
5650
5641
|
* Disallow useless `continue` statements.
|
|
5651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-continue.md
|
|
5652
5643
|
*/
|
|
5653
5644
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
5654
5645
|
/**
|
|
5655
5646
|
* Disallow unnecessary existence checks before deletion.
|
|
5656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-delete-check.md
|
|
5657
5648
|
*/
|
|
5658
5649
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
5659
5650
|
/**
|
|
5660
5651
|
* Disallow `else` after a statement that exits.
|
|
5661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-else.md
|
|
5662
5653
|
*/
|
|
5663
5654
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
5664
5655
|
/**
|
|
5665
5656
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5667
5658
|
*/
|
|
5668
5659
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5669
5660
|
/**
|
|
5670
5661
|
* Disallow useless fallback when spreading in object literals.
|
|
5671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5672
5663
|
*/
|
|
5673
5664
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5674
5665
|
/**
|
|
5675
5666
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
5676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
5677
5668
|
*/
|
|
5678
5669
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5679
5670
|
/**
|
|
5680
5671
|
* Disallow useless array length check.
|
|
5681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-length-check.md
|
|
5682
5673
|
*/
|
|
5683
5674
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5684
5675
|
/**
|
|
5685
5676
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
5686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-logical-operand.md
|
|
5687
5678
|
*/
|
|
5688
5679
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
5689
5680
|
/**
|
|
5690
5681
|
* Disallow useless overrides of class methods.
|
|
5691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-override.md
|
|
5692
5683
|
*/
|
|
5693
5684
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
5694
5685
|
/**
|
|
5695
5686
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5697
5688
|
*/
|
|
5698
5689
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5699
5690
|
/**
|
|
5700
5691
|
* Disallow redundant re-exports.
|
|
5701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-re-export.md
|
|
5702
5693
|
*/
|
|
5703
5694
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
5704
5695
|
/**
|
|
5705
5696
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
5706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-recursion.md
|
|
5707
5698
|
*/
|
|
5708
5699
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
5709
5700
|
/**
|
|
5710
5701
|
* Disallow unnecessary spread.
|
|
5711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-spread.md
|
|
5712
5703
|
*/
|
|
5713
5704
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5714
5705
|
/**
|
|
5715
5706
|
* Disallow useless case in switch statements.
|
|
5716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-switch-case.md
|
|
5717
5708
|
*/
|
|
5718
5709
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5719
5710
|
/**
|
|
5720
5711
|
* Disallow useless template literal expressions.
|
|
5721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-template-literals.md
|
|
5722
5713
|
*/
|
|
5723
5714
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
5724
5715
|
/**
|
|
5725
5716
|
* Disallow useless `undefined`.
|
|
5726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-undefined.md
|
|
5727
5718
|
*/
|
|
5728
5719
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5729
5720
|
/**
|
|
5730
5721
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
5731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
5732
5723
|
*/
|
|
5733
5724
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
5734
5725
|
/**
|
|
5735
5726
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-zero-fractions.md
|
|
5737
5728
|
*/
|
|
5738
5729
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5739
5730
|
/**
|
|
5740
5731
|
* Enforce proper case for numeric literals.
|
|
5741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/number-literal-case.md
|
|
5742
5733
|
*/
|
|
5743
5734
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5744
5735
|
/**
|
|
5745
5736
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/numeric-separators-style.md
|
|
5747
5738
|
*/
|
|
5748
5739
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5749
5740
|
/**
|
|
5750
5741
|
* Require assignment operator shorthand where possible.
|
|
5751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/operator-assignment.md
|
|
5752
5743
|
*/
|
|
5753
5744
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
5754
5745
|
/**
|
|
5755
5746
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
5756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-any.md
|
|
5757
5748
|
*/
|
|
5758
5749
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
5759
5750
|
/**
|
|
5760
5751
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
5761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
5762
5753
|
*/
|
|
5763
5754
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
5764
5755
|
/**
|
|
5765
5756
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener.md
|
|
5767
5758
|
*/
|
|
5768
5759
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5769
5760
|
/**
|
|
5770
5761
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
5771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
5772
5763
|
*/
|
|
5773
5764
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
5774
5765
|
/**
|
|
5775
5766
|
* Prefer `AggregateError` when throwing collected errors.
|
|
5776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-aggregate-error.md
|
|
5777
5768
|
*/
|
|
5778
5769
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
5779
5770
|
/**
|
|
5780
5771
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-find.md
|
|
5782
5773
|
*/
|
|
5783
5774
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5784
5775
|
/**
|
|
5785
5776
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat.md
|
|
5787
5778
|
*/
|
|
5788
5779
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5789
5780
|
/**
|
|
5790
5781
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
5791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat-map.md
|
|
5792
5783
|
*/
|
|
5793
5784
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5794
5785
|
/**
|
|
5795
5786
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
5796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-async.md
|
|
5797
5788
|
*/
|
|
5798
5789
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
5799
5790
|
/**
|
|
5800
5791
|
* Prefer using the `Array.from()` mapping function argument.
|
|
5801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-map.md
|
|
5802
5793
|
*/
|
|
5803
5794
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
5804
5795
|
/**
|
|
5805
5796
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
5806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-range.md
|
|
5807
5798
|
*/
|
|
5808
5799
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
5809
5800
|
/**
|
|
5810
5801
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-index-of.md
|
|
5812
5803
|
*/
|
|
5813
5804
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5814
5805
|
/**
|
|
5815
5806
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
5816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
5817
5808
|
*/
|
|
5818
5809
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5819
5810
|
/**
|
|
5820
5811
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
5821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-last-methods.md
|
|
5822
5813
|
*/
|
|
5823
5814
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
5824
5815
|
/**
|
|
5825
5816
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
5826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-slice.md
|
|
5827
5818
|
*/
|
|
5828
5819
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
5829
5820
|
/**
|
|
5830
5821
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-some.md
|
|
5832
5823
|
*/
|
|
5833
5824
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5834
5825
|
/**
|
|
5835
5826
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-at.md
|
|
5837
5828
|
*/
|
|
5838
5829
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5839
5830
|
/**
|
|
5840
5831
|
* Prefer `await` over promise chaining.
|
|
5841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-await.md
|
|
5842
5833
|
*/
|
|
5843
5834
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
5844
5835
|
/**
|
|
5845
5836
|
* Prefer `BigInt` literals over the constructor.
|
|
5846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-bigint-literals.md
|
|
5847
5838
|
*/
|
|
5848
5839
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5849
5840
|
/**
|
|
5850
5841
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5852
5843
|
*/
|
|
5853
5844
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5854
5845
|
/**
|
|
5855
5846
|
* Prefer block statements over IIFEs used only for scoping.
|
|
5856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
5857
5848
|
*/
|
|
5858
5849
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
5859
5850
|
/**
|
|
5860
5851
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
5861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-boolean-return.md
|
|
5862
5853
|
*/
|
|
5863
5854
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5864
5855
|
/**
|
|
5865
5856
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-class-fields.md
|
|
5867
5858
|
*/
|
|
5868
5859
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5869
5860
|
/**
|
|
5870
5861
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5872
5863
|
*/
|
|
5873
5864
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5874
5865
|
/**
|
|
5875
5866
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-code-point.md
|
|
5877
5868
|
*/
|
|
5878
5869
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5879
5870
|
/**
|
|
5880
5871
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
5881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-continue.md
|
|
5882
5873
|
*/
|
|
5883
5874
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
5884
5875
|
/**
|
|
5885
5876
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-date-now.md
|
|
5887
5878
|
*/
|
|
5888
5879
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5889
5880
|
/**
|
|
5890
5881
|
* Prefer default parameters over reassignment.
|
|
5891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-default-parameters.md
|
|
5892
5883
|
*/
|
|
5893
5884
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5894
5885
|
/**
|
|
5895
5886
|
* Prefer direct iteration over default iterator method calls.
|
|
5896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-direct-iteration.md
|
|
5897
5888
|
*/
|
|
5898
5889
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
5899
5890
|
/**
|
|
5900
5891
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
5901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dispose.md
|
|
5902
5893
|
*/
|
|
5903
5894
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
5904
5895
|
/**
|
|
5905
5896
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
5906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-append.md
|
|
5907
5898
|
*/
|
|
5908
5899
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5909
5900
|
/**
|
|
5910
5901
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
5911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
5912
5903
|
* @deprecated
|
|
5913
5904
|
*/
|
|
5914
5905
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5915
5906
|
/**
|
|
5916
5907
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
5917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
5918
5909
|
*/
|
|
5919
5910
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
5920
5911
|
/**
|
|
5921
5912
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5923
5914
|
*/
|
|
5924
5915
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5925
5916
|
/**
|
|
5926
5917
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
5927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
5928
5919
|
*/
|
|
5929
5920
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
5930
5921
|
/**
|
|
5931
5922
|
* Prefer `.textContent` over `.innerText`.
|
|
5932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5933
5924
|
*/
|
|
5934
5925
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5935
5926
|
/**
|
|
5936
5927
|
* Prefer early returns over full-function conditional wrapping.
|
|
5937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-early-return.md
|
|
5938
5929
|
*/
|
|
5939
5930
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
5940
5931
|
/**
|
|
5941
5932
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
5942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-else-if.md
|
|
5943
5934
|
*/
|
|
5944
5935
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
5945
5936
|
/**
|
|
5946
5937
|
* Prefer `Error.isError()` when checking for errors.
|
|
5947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-error-is-error.md
|
|
5948
5939
|
*/
|
|
5949
5940
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
5950
5941
|
/**
|
|
5951
5942
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-event-target.md
|
|
5953
5944
|
*/
|
|
5954
5945
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5955
5946
|
/**
|
|
5956
5947
|
* Prefer explicit viewport units.
|
|
5957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
5958
5949
|
*/
|
|
5959
5950
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
5960
5951
|
/**
|
|
5961
5952
|
* Prefer `export…from` when re-exporting.
|
|
5962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-export-from.md
|
|
5963
5954
|
*/
|
|
5964
5955
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5965
5956
|
/**
|
|
5966
5957
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
5967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
5968
5959
|
*/
|
|
5969
5960
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5970
5961
|
/**
|
|
5971
5962
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
5972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
5973
5964
|
*/
|
|
5974
5965
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
5975
5966
|
/**
|
|
5976
5967
|
* Prefer global numeric constants over `Number` static properties.
|
|
5977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-number-constants.md
|
|
5978
5969
|
*/
|
|
5979
5970
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
5980
5971
|
/**
|
|
5981
5972
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-this.md
|
|
5983
5974
|
*/
|
|
5984
5975
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5985
5976
|
/**
|
|
5986
5977
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-group-by.md
|
|
5988
5979
|
*/
|
|
5989
5980
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
5990
5981
|
/**
|
|
5991
5982
|
* Prefer `.has()` when checking existence.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-has-check.md
|
|
5993
5984
|
*/
|
|
5994
5985
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
5995
5986
|
/**
|
|
5996
5987
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
5998
5989
|
*/
|
|
5999
5990
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
6000
5991
|
/**
|
|
6001
5992
|
* Prefer HTTPS over HTTP.
|
|
6002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-https.md
|
|
6003
5994
|
*/
|
|
6004
5995
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
6005
5996
|
/**
|
|
6006
5997
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
6007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
6008
5999
|
*/
|
|
6009
6000
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
6010
6001
|
/**
|
|
6011
6002
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6013
6004
|
*/
|
|
6014
6005
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6015
6006
|
/**
|
|
6016
6007
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes.md
|
|
6018
6009
|
*/
|
|
6019
6010
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6020
6011
|
/**
|
|
6021
6012
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
6023
6014
|
*/
|
|
6024
6015
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
6025
6016
|
/**
|
|
6026
6017
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
6028
6019
|
*/
|
|
6029
6020
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
6030
6021
|
/**
|
|
6031
6022
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-concat.md
|
|
6033
6024
|
*/
|
|
6034
6025
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
6035
6026
|
/**
|
|
6036
6027
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
6037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-helpers.md
|
|
6038
6029
|
*/
|
|
6039
6030
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
6040
6031
|
/**
|
|
6041
6032
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
6042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array.md
|
|
6043
6034
|
*/
|
|
6044
6035
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
6045
6036
|
/**
|
|
6046
6037
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
6047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
6048
6039
|
*/
|
|
6049
6040
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
6050
6041
|
/**
|
|
6051
6042
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
6052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
6053
6044
|
* @deprecated
|
|
6054
6045
|
*/
|
|
6055
6046
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6056
6047
|
/**
|
|
6057
6048
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
6058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6059
6050
|
*/
|
|
6060
6051
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6061
6052
|
/**
|
|
6062
6053
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
6063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-location-assign.md
|
|
6064
6055
|
*/
|
|
6065
6056
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
6066
6057
|
/**
|
|
6067
6058
|
* Prefer using a logical operator over a ternary.
|
|
6068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6069
6060
|
*/
|
|
6070
6061
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6071
6062
|
/**
|
|
6072
6063
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
6073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-map-from-entries.md
|
|
6074
6065
|
*/
|
|
6075
6066
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
6076
6067
|
/**
|
|
6077
6068
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
6078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-abs.md
|
|
6079
6070
|
*/
|
|
6080
6071
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
6081
6072
|
/**
|
|
6082
6073
|
* Prefer `Math` constants over their approximate numeric values.
|
|
6083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-constants.md
|
|
6084
6075
|
*/
|
|
6085
6076
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
6086
6077
|
/**
|
|
6087
6078
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-min-max.md
|
|
6089
6080
|
*/
|
|
6090
6081
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6091
6082
|
/**
|
|
6092
6083
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
6093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-trunc.md
|
|
6094
6085
|
*/
|
|
6095
6086
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6096
6087
|
/**
|
|
6097
6088
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
6098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-minimal-ternary.md
|
|
6099
6090
|
*/
|
|
6100
6091
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
6101
6092
|
/**
|
|
6102
6093
|
* Prefer modern DOM APIs.
|
|
6103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6104
6095
|
*/
|
|
6105
6096
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6106
6097
|
/**
|
|
6107
6098
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6109
6100
|
*/
|
|
6110
6101
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6111
6102
|
/**
|
|
6112
6103
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-module.md
|
|
6114
6105
|
*/
|
|
6115
6106
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6116
6107
|
/**
|
|
6117
6108
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6119
6110
|
*/
|
|
6120
6111
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6121
6112
|
/**
|
|
6122
6113
|
* Prefer negative index over `.length - index` when possible.
|
|
6123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-negative-index.md
|
|
6124
6115
|
*/
|
|
6125
6116
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6126
6117
|
/**
|
|
6127
6118
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-node-protocol.md
|
|
6129
6120
|
*/
|
|
6130
6121
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6131
6122
|
/**
|
|
6132
6123
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
6133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-coercion.md
|
|
6134
6125
|
*/
|
|
6135
6126
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
6136
6127
|
/**
|
|
6137
6128
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
6138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
6139
6130
|
*/
|
|
6140
6131
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
6141
6132
|
/**
|
|
6142
6133
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
6143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-properties.md
|
|
6144
6135
|
*/
|
|
6145
6136
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6146
6137
|
/**
|
|
6147
6138
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
6148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-define-properties.md
|
|
6149
6140
|
*/
|
|
6150
6141
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
6151
6142
|
/**
|
|
6152
6143
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
6153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
6154
6145
|
*/
|
|
6155
6146
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
6156
6147
|
/**
|
|
6157
6148
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-from-entries.md
|
|
6159
6150
|
*/
|
|
6160
6151
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6161
6152
|
/**
|
|
6162
6153
|
* Prefer the most specific `Object` iterable method.
|
|
6163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
6164
6155
|
*/
|
|
6165
6156
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
6166
6157
|
/**
|
|
6167
6158
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
6168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-observer-apis.md
|
|
6169
6160
|
*/
|
|
6170
6161
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
6171
6162
|
/**
|
|
6172
6163
|
* Prefer omitting the `catch` binding parameter.
|
|
6173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6174
6165
|
*/
|
|
6175
6166
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6176
6167
|
/**
|
|
6177
6168
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
6178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-path2d.md
|
|
6179
6170
|
*/
|
|
6180
6171
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
6181
6172
|
/**
|
|
6182
6173
|
* Prefer private class fields over the underscore-prefix convention.
|
|
6183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-private-class-fields.md
|
|
6184
6175
|
*/
|
|
6185
6176
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
6186
6177
|
/**
|
|
6187
6178
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
6188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-try.md
|
|
6189
6180
|
*/
|
|
6190
6181
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
6191
6182
|
/**
|
|
6192
6183
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
6193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
6194
6185
|
*/
|
|
6195
6186
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
6196
6187
|
/**
|
|
6197
6188
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-prototype-methods.md
|
|
6199
6190
|
*/
|
|
6200
6191
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6201
6192
|
/**
|
|
6202
6193
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
6203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-query-selector.md
|
|
6204
6195
|
*/
|
|
6205
6196
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
6206
6197
|
/**
|
|
6207
6198
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
6208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-queue-microtask.md
|
|
6209
6200
|
*/
|
|
6210
6201
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
6211
6202
|
/**
|
|
6212
6203
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-reflect-apply.md
|
|
6214
6205
|
*/
|
|
6215
6206
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6216
6207
|
/**
|
|
6217
6208
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
6218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-escape.md
|
|
6219
6210
|
*/
|
|
6220
6211
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
6221
6212
|
/**
|
|
6222
6213
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
6223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-test.md
|
|
6224
6215
|
*/
|
|
6225
6216
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6226
6217
|
/**
|
|
6227
6218
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-response-static-json.md
|
|
6229
6220
|
*/
|
|
6230
6221
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6231
6222
|
/**
|
|
6232
6223
|
* Prefer `:scope` when using element query selector methods.
|
|
6233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-scoped-selector.md
|
|
6234
6225
|
*/
|
|
6235
6226
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
6236
6227
|
/**
|
|
6237
6228
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-has.md
|
|
6239
6230
|
*/
|
|
6240
6231
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
6241
6232
|
/**
|
|
6242
6233
|
* Prefer `Set` methods for Set operations.
|
|
6243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-methods.md
|
|
6244
6235
|
*/
|
|
6245
6236
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
6246
6237
|
/**
|
|
6247
6238
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-size.md
|
|
6249
6240
|
*/
|
|
6250
6241
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6251
6242
|
/**
|
|
6252
6243
|
* Prefer arrow function properties over methods with a single return.
|
|
6253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-short-arrow-method.md
|
|
6254
6245
|
*/
|
|
6255
6246
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
6256
6247
|
/**
|
|
6257
6248
|
* Prefer simple conditions first in logical expressions.
|
|
6258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-condition-first.md
|
|
6259
6250
|
*/
|
|
6260
6251
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
6261
6252
|
/**
|
|
6262
6253
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
6263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
6264
6255
|
*/
|
|
6265
6256
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6266
6257
|
/**
|
|
6267
6258
|
* Prefer simplified conditions.
|
|
6268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simplified-conditions.md
|
|
6269
6260
|
*/
|
|
6270
6261
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
6271
6262
|
/**
|
|
6272
6263
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
6273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-array-predicate.md
|
|
6274
6265
|
*/
|
|
6275
6266
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6276
6267
|
/**
|
|
6277
6268
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-call.md
|
|
6279
6270
|
*/
|
|
6280
6271
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6281
6272
|
/**
|
|
6282
6273
|
* Prefer a single object destructuring declaration per local const source.
|
|
6283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
6284
6275
|
*/
|
|
6285
6276
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6286
6277
|
/**
|
|
6287
6278
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
6288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-replace.md
|
|
6289
6280
|
*/
|
|
6290
6281
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
6291
6282
|
/**
|
|
6292
6283
|
* Prefer declaring variables in the smallest possible scope.
|
|
6293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-smaller-scope.md
|
|
6294
6285
|
*/
|
|
6295
6286
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
6296
6287
|
/**
|
|
6297
6288
|
* Prefer `String#split()` with a limit.
|
|
6298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-split-limit.md
|
|
6299
6290
|
*/
|
|
6300
6291
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
6301
6292
|
/**
|
|
6302
6293
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
6303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-spread.md
|
|
6304
6295
|
*/
|
|
6305
6296
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6306
6297
|
/**
|
|
6307
6298
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
6308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-match-all.md
|
|
6309
6300
|
*/
|
|
6310
6301
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
6311
6302
|
/**
|
|
6312
6303
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
6313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
6314
6305
|
*/
|
|
6315
6306
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
6316
6307
|
/**
|
|
6317
6308
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-raw.md
|
|
6319
6310
|
*/
|
|
6320
6311
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6321
6312
|
/**
|
|
6322
6313
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
6323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-repeat.md
|
|
6324
6315
|
*/
|
|
6325
6316
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
6326
6317
|
/**
|
|
6327
6318
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
6328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-replace-all.md
|
|
6329
6320
|
*/
|
|
6330
6321
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6331
6322
|
/**
|
|
6332
6323
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-slice.md
|
|
6334
6325
|
*/
|
|
6335
6326
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6336
6327
|
/**
|
|
6337
6328
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
6338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6339
6330
|
*/
|
|
6340
6331
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6341
6332
|
/**
|
|
6342
6333
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6344
6335
|
*/
|
|
6345
6336
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6346
6337
|
/**
|
|
6347
6338
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-structured-clone.md
|
|
6349
6340
|
*/
|
|
6350
6341
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6351
6342
|
/**
|
|
6352
6343
|
* Prefer `switch` over multiple `else-if`.
|
|
6353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-switch.md
|
|
6354
6345
|
*/
|
|
6355
6346
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6356
6347
|
/**
|
|
6357
6348
|
* Prefer `Temporal` over `Date`.
|
|
6358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-temporal.md
|
|
6359
6350
|
*/
|
|
6360
6351
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
6361
6352
|
/**
|
|
6362
6353
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
6363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-ternary.md
|
|
6364
6355
|
*/
|
|
6365
6356
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6366
6357
|
/**
|
|
6367
6358
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
6368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-then-catch.md
|
|
6369
6360
|
*/
|
|
6370
6361
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
6371
6362
|
/**
|
|
6372
6363
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
6373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-toggle-attribute.md
|
|
6374
6365
|
*/
|
|
6375
6366
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
6376
6367
|
/**
|
|
6377
6368
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-top-level-await.md
|
|
6379
6370
|
*/
|
|
6380
6371
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6381
6372
|
/**
|
|
6382
6373
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-error.md
|
|
6384
6375
|
*/
|
|
6385
6376
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6386
6377
|
/**
|
|
6387
6378
|
* Require type literals to be last in union types.
|
|
6388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-literal-last.md
|
|
6389
6380
|
*/
|
|
6390
6381
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
6391
6382
|
/**
|
|
6392
6383
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
6393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-uint8array-base64.md
|
|
6394
6385
|
*/
|
|
6395
6386
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
6396
6387
|
/**
|
|
6397
6388
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
6398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unary-minus.md
|
|
6399
6390
|
*/
|
|
6400
6391
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
6401
6392
|
/**
|
|
6402
6393
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
6403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
6404
6395
|
*/
|
|
6405
6396
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
6406
6397
|
/**
|
|
6407
6398
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
6408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-can-parse.md
|
|
6409
6400
|
*/
|
|
6410
6401
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
6411
6402
|
/**
|
|
6412
6403
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
6413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-href.md
|
|
6414
6405
|
*/
|
|
6415
6406
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
6416
6407
|
/**
|
|
6417
6408
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
6418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-search-parameters.md
|
|
6419
6410
|
*/
|
|
6420
6411
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
6421
6412
|
/**
|
|
6422
6413
|
* Prefer putting the condition in the while statement.
|
|
6423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-while-loop-condition.md
|
|
6424
6415
|
*/
|
|
6425
6416
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
6426
6417
|
/**
|
|
6427
6418
|
* Renamed to `unicorn/name-replacements`.
|
|
6428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
6429
6420
|
* @deprecated
|
|
6430
6421
|
*/
|
|
6431
6422
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
6432
6423
|
/**
|
|
6433
6424
|
* Enforce consistent relative URL style.
|
|
6434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/relative-url-style.md
|
|
6435
6426
|
*/
|
|
6436
6427
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6437
6428
|
/**
|
|
6438
6429
|
* Enforce using the separator argument with `Array#join()`.
|
|
6439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-join-separator.md
|
|
6440
6431
|
*/
|
|
6441
6432
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6442
6433
|
/**
|
|
6443
6434
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
6444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-sort-compare.md
|
|
6445
6436
|
*/
|
|
6446
6437
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
6447
6438
|
/**
|
|
6448
6439
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
6449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-css-escape.md
|
|
6450
6441
|
*/
|
|
6451
6442
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
6452
6443
|
/**
|
|
6453
6444
|
* Require configured YAML frontmatter fields.
|
|
6454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-frontmatter-fields.md
|
|
6455
6446
|
*/
|
|
6456
6447
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
6457
6448
|
/**
|
|
6458
6449
|
* Require non-empty module attributes for imports and exports
|
|
6459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-attributes.md
|
|
6460
6451
|
*/
|
|
6461
6452
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6462
6453
|
/**
|
|
6463
6454
|
* Require non-empty specifier list in import and export statements.
|
|
6464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-specifiers.md
|
|
6465
6456
|
*/
|
|
6466
6457
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6467
6458
|
/**
|
|
6468
6459
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6470
6461
|
*/
|
|
6471
6462
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6472
6463
|
/**
|
|
6473
6464
|
* Require passive event listeners for high-frequency events.
|
|
6474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-passive-events.md
|
|
6475
6466
|
*/
|
|
6476
6467
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
6477
6468
|
/**
|
|
6478
6469
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-post-message-target-origin.md
|
|
6480
6471
|
*/
|
|
6481
6472
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6482
6473
|
/**
|
|
6483
6474
|
* Require boolean-returning Proxy traps to return booleans.
|
|
6484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
6485
6476
|
*/
|
|
6486
6477
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
6487
6478
|
/**
|
|
6488
6479
|
* Enforce a consistent style for single-line block comments.
|
|
6489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/single-line-block-comment-style.md
|
|
6490
6481
|
*/
|
|
6491
6482
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
6492
6483
|
/**
|
|
6493
6484
|
* Enforce better string content.
|
|
6494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/string-content.md
|
|
6495
6486
|
*/
|
|
6496
6487
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6497
6488
|
/**
|
|
6498
6489
|
* Enforce consistent brace style for `case` clauses.
|
|
6499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-braces.md
|
|
6500
6491
|
*/
|
|
6501
6492
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6502
6493
|
/**
|
|
6503
6494
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-break-position.md
|
|
6505
6496
|
*/
|
|
6506
6497
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
6507
6498
|
/**
|
|
6508
6499
|
* Fix whitespace-insensitive template indentation.
|
|
6509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/template-indent.md
|
|
6510
6501
|
*/
|
|
6511
6502
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6512
6503
|
/**
|
|
6513
6504
|
* Enforce consistent case for text encoding identifiers.
|
|
6514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6515
6506
|
*/
|
|
6516
6507
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6517
6508
|
/**
|
|
6518
6509
|
* Require `new` when creating an error.
|
|
6519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/throw-new-error.md
|
|
6520
6511
|
*/
|
|
6521
6512
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6522
6513
|
/**
|
|
6523
6514
|
* Limit the complexity of `try` blocks.
|
|
6524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/try-complexity.md
|
|
6525
6516
|
*/
|
|
6526
6517
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
6527
6518
|
/**
|
|
@@ -7610,6 +7601,11 @@ interface RuleOptions {
|
|
|
7610
7601
|
* @see https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html
|
|
7611
7602
|
*/
|
|
7612
7603
|
'vue/no-setup-props-reactivity-loss'?: Linter.RuleEntry<[]>;
|
|
7604
|
+
/**
|
|
7605
|
+
* disallow the use of event names that collide with native web event names
|
|
7606
|
+
* @see https://eslint.vuejs.org/rules/no-shadow-native-events.html
|
|
7607
|
+
*/
|
|
7608
|
+
'vue/no-shadow-native-events'?: Linter.RuleEntry<[]>;
|
|
7613
7609
|
/**
|
|
7614
7610
|
* enforce component's data property to be a function
|
|
7615
7611
|
* @see https://eslint.vuejs.org/rules/no-shared-component-data.html
|
|
@@ -10369,7 +10365,9 @@ type TypescriptEslintNoMeaninglessVoidOperator = [] | [{
|
|
|
10369
10365
|
}];
|
|
10370
10366
|
// ----- @typescript-eslint/no-misused-promises -----
|
|
10371
10367
|
type TypescriptEslintNoMisusedPromises = [] | [{
|
|
10372
|
-
checksConditionals?: boolean
|
|
10368
|
+
checksConditionals?: (boolean | {
|
|
10369
|
+
flagUnions?: ("all" | "strict" | "none");
|
|
10370
|
+
});
|
|
10373
10371
|
checksSpreads?: boolean;
|
|
10374
10372
|
checksVoidReturn?: (boolean | {
|
|
10375
10373
|
arguments?: boolean;
|
|
@@ -11662,6 +11660,14 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
11662
11660
|
disableReporting?: boolean;
|
|
11663
11661
|
markVariablesAsUsed?: boolean;
|
|
11664
11662
|
}];
|
|
11663
|
+
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
11664
|
+
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
11665
|
+
checkLiteralConstAssertions?: boolean;
|
|
11666
|
+
enableFixer?: boolean;
|
|
11667
|
+
preferConstToLiteralTuples?: boolean;
|
|
11668
|
+
treatAnyAsRedundant?: boolean;
|
|
11669
|
+
typesToIgnore?: string[];
|
|
11670
|
+
}];
|
|
11665
11671
|
// ----- jsdoc/normalize-see-links -----
|
|
11666
11672
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
11667
11673
|
canonicalForm?: ("pipe" | "prefix");
|
|
@@ -13948,10 +13954,6 @@ type PerfectionistSortImports = {
|
|
|
13948
13954
|
sortBy?: ("specifier" | "path");
|
|
13949
13955
|
})[];
|
|
13950
13956
|
newlinesBetween?: ("ignore" | number);
|
|
13951
|
-
tsconfig?: {
|
|
13952
|
-
rootDir: string;
|
|
13953
|
-
filename?: string;
|
|
13954
|
-
};
|
|
13955
13957
|
maxLineLength?: number;
|
|
13956
13958
|
sortSideEffects?: boolean;
|
|
13957
13959
|
environment?: ("node" | "bun");
|
|
@@ -13986,6 +13988,10 @@ type PerfectionistSortImports = {
|
|
|
13986
13988
|
pattern: string;
|
|
13987
13989
|
flags?: string;
|
|
13988
13990
|
} | string));
|
|
13991
|
+
tsconfig?: {
|
|
13992
|
+
rootDir: string;
|
|
13993
|
+
filename?: string;
|
|
13994
|
+
};
|
|
13989
13995
|
}[];
|
|
13990
13996
|
// ----- perfectionist/sort-interfaces -----
|
|
13991
13997
|
type PerfectionistSortInterfaces = {
|
|
@@ -14570,6 +14576,7 @@ type PerfectionistSortModules = [] | [{
|
|
|
14570
14576
|
order?: ("asc" | "desc");
|
|
14571
14577
|
})[];
|
|
14572
14578
|
newlinesBetween?: ("ignore" | number);
|
|
14579
|
+
additionalModuleBlockTypes?: string[];
|
|
14573
14580
|
useExperimentalDependencyDetection?: boolean;
|
|
14574
14581
|
newlinesBetweenOverloadSignatures?: ("ignore" | number);
|
|
14575
14582
|
partitionByComment?: (boolean | (({
|
|
@@ -14595,6 +14602,10 @@ type PerfectionistSortModules = [] | [{
|
|
|
14595
14602
|
} | string)));
|
|
14596
14603
|
});
|
|
14597
14604
|
partitionByNewLine?: boolean;
|
|
14605
|
+
tsconfig?: {
|
|
14606
|
+
rootDir: string;
|
|
14607
|
+
filename?: string;
|
|
14608
|
+
};
|
|
14598
14609
|
}];
|
|
14599
14610
|
// ----- perfectionist/sort-named-exports -----
|
|
14600
14611
|
type PerfectionistSortNamedExports = {
|
|
@@ -15123,6 +15134,13 @@ type PerfectionistSortObjects = {
|
|
|
15123
15134
|
partitionByComputedKey?: boolean;
|
|
15124
15135
|
styledComponents?: boolean;
|
|
15125
15136
|
useExperimentalDependencyDetection?: boolean;
|
|
15137
|
+
ignoreCallbackDependenciesPatterns?: (({
|
|
15138
|
+
pattern: string;
|
|
15139
|
+
flags?: string;
|
|
15140
|
+
} | string)[] | ({
|
|
15141
|
+
pattern: string;
|
|
15142
|
+
flags?: string;
|
|
15143
|
+
} | string));
|
|
15126
15144
|
partitionByComment?: (boolean | (({
|
|
15127
15145
|
pattern: string;
|
|
15128
15146
|
flags?: string;
|
|
@@ -15458,6 +15476,13 @@ type PerfectionistSortVariableDeclarations = {
|
|
|
15458
15476
|
matchesAstSelector?: string;
|
|
15459
15477
|
};
|
|
15460
15478
|
useExperimentalDependencyDetection?: boolean;
|
|
15479
|
+
ignoreCallbackDependenciesPatterns?: (({
|
|
15480
|
+
pattern: string;
|
|
15481
|
+
flags?: string;
|
|
15482
|
+
} | string)[] | ({
|
|
15483
|
+
pattern: string;
|
|
15484
|
+
flags?: string;
|
|
15485
|
+
} | string));
|
|
15461
15486
|
partitionByComment?: (boolean | (({
|
|
15462
15487
|
pattern: string;
|
|
15463
15488
|
flags?: string;
|
|
@@ -20225,7 +20250,7 @@ type VueNoDeprecatedSlotAttribute = [] | [{
|
|
|
20225
20250
|
}];
|
|
20226
20251
|
// ----- vue/no-dupe-keys -----
|
|
20227
20252
|
type VueNoDupeKeys = [] | [{
|
|
20228
|
-
groups?:
|
|
20253
|
+
groups?: string[];
|
|
20229
20254
|
}];
|
|
20230
20255
|
// ----- vue/no-duplicate-attr-inheritance -----
|
|
20231
20256
|
type VueNoDuplicateAttrInheritance = [] | [{
|
|
@@ -20355,8 +20380,8 @@ type VueNoReservedComponentNames = [] | [{
|
|
|
20355
20380
|
}];
|
|
20356
20381
|
// ----- vue/no-reserved-keys -----
|
|
20357
20382
|
type VueNoReservedKeys = [] | [{
|
|
20358
|
-
reserved?:
|
|
20359
|
-
groups?:
|
|
20383
|
+
reserved?: string[];
|
|
20384
|
+
groups?: string[];
|
|
20360
20385
|
}];
|
|
20361
20386
|
// ----- vue/no-reserved-props -----
|
|
20362
20387
|
type VueNoReservedProps = [] | [{
|
|
@@ -20444,7 +20469,7 @@ type VueNoTemplateTargetBlank = [] | [{
|
|
|
20444
20469
|
}];
|
|
20445
20470
|
// ----- vue/no-undef-components -----
|
|
20446
20471
|
type VueNoUndefComponents = [] | [{
|
|
20447
|
-
ignorePatterns?:
|
|
20472
|
+
ignorePatterns?: string[];
|
|
20448
20473
|
}];
|
|
20449
20474
|
// ----- vue/no-undef-directives -----
|
|
20450
20475
|
type VueNoUndefDirectives = [] | [{
|
|
@@ -20578,7 +20603,7 @@ type VueOperatorLinebreak = [] | [(("after" | "before" | "none") | null)] | [(("
|
|
|
20578
20603
|
}];
|
|
20579
20604
|
// ----- vue/order-in-components -----
|
|
20580
20605
|
type VueOrderInComponents = [] | [{
|
|
20581
|
-
order?:
|
|
20606
|
+
order?: (string | string[])[];
|
|
20582
20607
|
}];
|
|
20583
20608
|
// ----- vue/padding-line-between-blocks -----
|
|
20584
20609
|
type VuePaddingLineBetweenBlocks = [] | [("never" | "always")];
|
|
@@ -20667,8 +20692,8 @@ type VueSlotNameCasing = [] | [("camelCase" | "kebab-case" | "singleword")];
|
|
|
20667
20692
|
// ----- vue/sort-keys -----
|
|
20668
20693
|
type VueSortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
20669
20694
|
caseSensitive?: boolean;
|
|
20670
|
-
ignoreChildrenOf?:
|
|
20671
|
-
ignoreGrandchildrenOf?:
|
|
20695
|
+
ignoreChildrenOf?: string[];
|
|
20696
|
+
ignoreGrandchildrenOf?: string[];
|
|
20672
20697
|
minKeys?: number;
|
|
20673
20698
|
natural?: boolean;
|
|
20674
20699
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -20728,7 +20753,7 @@ type VueValidVFor = [] | [{
|
|
|
20728
20753
|
}];
|
|
20729
20754
|
// ----- vue/valid-v-on -----
|
|
20730
20755
|
type VueValidVOn = [] | [{
|
|
20731
|
-
modifiers?:
|
|
20756
|
+
modifiers?: string[];
|
|
20732
20757
|
}];
|
|
20733
20758
|
// ----- vue/valid-v-slot -----
|
|
20734
20759
|
type VueValidVSlot = [] | [{
|
|
@@ -21032,7 +21057,7 @@ type YmlSpacedComment = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
21032
21057
|
markers?: string[];
|
|
21033
21058
|
}];
|
|
21034
21059
|
// Names of all the configs
|
|
21035
|
-
type ConfigNames = 'moso/eslint-comments' | 'moso/ignores/globals' | 'moso/ignores/gitignore' | 'moso/imports' | 'moso/imports/typescript' | 'moso/javascript' | 'moso/javascript/opinionated' | 'moso/node/setup' | 'moso/node/rules' | 'moso/promise' | 'moso/regexp' | 'moso/unicorn/setup' | 'moso/unicorn/rules' | 'moso/stylistic' | 'moso/baseline/setup' | 'moso/baseline/type-aware-rules' | 'moso/astro/setup' | 'moso/astro/rules' | 'moso/e18e/rules' | 'moso/functional' | 'moso/functional/disable-type-aware' | 'moso/jsdoc/setup' | 'moso/jsdoc/rules' | 'moso/jsonc/setup' | 'moso/jsonc/rules' | 'moso/sort/package-json' | 'moso/sort/tsconfig-json' | 'moso/jsx/setup' | 'moso/jsx/rules' | 'moso/nextjs/setup' | 'moso/nextjs/rules' | 'moso/perfectionist' | 'moso/react/setup' | 'moso/react/rules' | 'moso/react/typescript' | 'moso/react/typescript/type-aware-rules' | 'moso/test/setup' | 'moso/test/rules' | 'moso/toml/setup' | 'moso/toml/rules' | 'moso/typescript/setup' | 'moso/typescript/rules' | 'moso/typescript/erasable-syntax' | 'moso/typescript/rules-type-aware' | 'moso/typescript/dts-overrides' | 'moso/typescript/test-overrides' | 'moso/typescript/javascript-overrides' | 'moso/vue/setup' | 'moso/vue/rules' | 'moso/tailwind' | 'moso/yaml/setup' | 'moso/yaml/rules' | 'moso/disables/allow-default-export' | 'moso/disables/bin' | 'moso/disables/cjs' | 'moso/disables/cli' | 'moso/disables/components' | 'moso/disables/config-files' | 'moso/disables/dts' | 'moso/disables/github' | 'moso/disables/node-frameworks' | 'moso/disables/node-typescript' | 'moso/disables/scripts' | 'moso/disables/tests' | 'moso/disables/typings';
|
|
21060
|
+
type ConfigNames = 'moso/eslint-comments' | 'moso/ignores/globals' | 'moso/ignores/gitignore' | 'moso/imports' | 'moso/imports/typescript' | 'moso/javascript' | 'moso/javascript/opinionated' | 'moso/node/setup' | 'moso/node/rules' | 'moso/promise' | 'moso/regexp' | 'moso/unicorn/setup' | 'moso/unicorn/rules' | 'moso/stylistic' | 'moso/baseline/setup' | 'moso/baseline/rules' | 'moso/baseline/type-aware-rules' | 'moso/astro/setup' | 'moso/astro/rules' | 'moso/e18e/rules' | 'moso/functional' | 'moso/functional/disable-type-aware' | 'moso/jsdoc/setup' | 'moso/jsdoc/rules' | 'moso/jsonc/setup' | 'moso/jsonc/rules' | 'moso/sort/package-json' | 'moso/sort/tsconfig-json' | 'moso/jsx/setup' | 'moso/jsx/rules' | 'moso/nextjs/setup' | 'moso/nextjs/rules' | 'moso/perfectionist' | 'moso/react/setup' | 'moso/react/rules' | 'moso/react/typescript' | 'moso/react/typescript/type-aware-rules' | 'moso/test/setup' | 'moso/test/rules' | 'moso/toml/setup' | 'moso/toml/rules' | 'moso/typescript/setup' | 'moso/typescript/rules' | 'moso/typescript/erasable-syntax' | 'moso/typescript/rules-type-aware' | 'moso/typescript/dts-overrides' | 'moso/typescript/test-overrides' | 'moso/typescript/javascript-overrides' | 'moso/vue/setup' | 'moso/vue/rules' | 'moso/tailwind' | 'moso/yaml/setup' | 'moso/yaml/rules' | 'moso/disables/allow-default-export' | 'moso/disables/bin' | 'moso/disables/cjs' | 'moso/disables/cli' | 'moso/disables/components' | 'moso/disables/config-files' | 'moso/disables/dts' | 'moso/disables/github' | 'moso/disables/node-frameworks' | 'moso/disables/node-typescript' | 'moso/disables/scripts' | 'moso/disables/tests' | 'moso/disables/typings';
|
|
21036
21061
|
//#endregion
|
|
21037
21062
|
//#region src/types.d.ts
|
|
21038
21063
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -21350,11 +21375,11 @@ type OptionsIgnores = OptionsOverrides & {
|
|
|
21350
21375
|
type OptionsIsInEditor = {
|
|
21351
21376
|
/**
|
|
21352
21377
|
* Are we inside an IDE or editor?
|
|
21353
|
-
* Used to activate the helper `
|
|
21378
|
+
* Used to activate the helper `disableRulesFix()` that makes defined fixable rules non-fixable.
|
|
21354
21379
|
*
|
|
21355
21380
|
* This is applied to the following rules:
|
|
21381
|
+
* - `no-only-tests/no-only-tests`
|
|
21356
21382
|
* - `prefer-const`
|
|
21357
|
-
* - `test-no-only-tests`
|
|
21358
21383
|
* - `unused-imports/no-unused-imports`
|
|
21359
21384
|
*
|
|
21360
21385
|
* The rules will still be applied when you run ESLint in a terminal or through Lint Staged.
|
|
@@ -21390,7 +21415,7 @@ type OptionsMode = {
|
|
|
21390
21415
|
/**
|
|
21391
21416
|
* Define project mode.
|
|
21392
21417
|
* Helpful for applications or libraries such as this.
|
|
21393
|
-
* 99.99% of
|
|
21418
|
+
* 99.99% of the time, this should not be necessary to set.
|
|
21394
21419
|
*
|
|
21395
21420
|
* @default 'none'
|
|
21396
21421
|
*/
|
|
@@ -21471,7 +21496,6 @@ type OptionsReact = OptionsOverrides & {
|
|
|
21471
21496
|
/**
|
|
21472
21497
|
* Additional hooks to be added to `react-hooks`.
|
|
21473
21498
|
*
|
|
21474
|
-
* @see
|
|
21475
21499
|
* @default undefined
|
|
21476
21500
|
*/
|
|
21477
21501
|
additionalHooks?: string;
|
|
@@ -21643,11 +21667,9 @@ type StylisticConfig = Omit<Pick<StylisticCustomizeOptions, "braceStyle" | "expe
|
|
|
21643
21667
|
};
|
|
21644
21668
|
type TypedFlatConfigItem = Omit<(ConfigWithExtends | Linter.Config), "ignores" | "plugins" | "rules"> & {
|
|
21645
21669
|
/**
|
|
21646
|
-
*
|
|
21647
|
-
*
|
|
21648
|
-
* Accepts a `string[]` (standard ESLint flat config) or `OptionsIgnores`.
|
|
21670
|
+
* Glob patterns of files to ignore for this config item.
|
|
21649
21671
|
*/
|
|
21650
|
-
ignores?:
|
|
21672
|
+
ignores?: ReadonlyArray<string>;
|
|
21651
21673
|
/**
|
|
21652
21674
|
* Custom config name of each item
|
|
21653
21675
|
*/
|
|
@@ -21665,58 +21687,58 @@ type TypedFlatConfigItem = Omit<(ConfigWithExtends | Linter.Config), "ignores" |
|
|
|
21665
21687
|
};
|
|
21666
21688
|
//#endregion
|
|
21667
21689
|
//#region src/configs/astro.d.ts
|
|
21668
|
-
declare const astro: (options: Readonly<OptionsAstro & OptionsLessOpinionated & OptionsOverrides & OptionsTypeScriptParserOptions & Required<OptionsFiles & OptionsHasTypeScript & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21690
|
+
export declare const astro: (options: Readonly<OptionsAstro & OptionsLessOpinionated & OptionsOverrides & OptionsTypeScriptParserOptions & Required<OptionsFiles & OptionsHasTypeScript & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21669
21691
|
//#endregion
|
|
21670
21692
|
//#region src/configs/baseline.d.ts
|
|
21671
|
-
declare const baseline: (options: Readonly<OptionsBaseline & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & Required<OptionsFiles & OptionsHasTypeScript>>) => Promise<TypedFlatConfigItem[]>;
|
|
21693
|
+
export declare const baseline: (options: Readonly<OptionsBaseline & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & Required<OptionsFiles & OptionsHasTypeScript>>) => Promise<TypedFlatConfigItem[]>;
|
|
21672
21694
|
//#endregion
|
|
21673
21695
|
//#region src/configs/disables.d.ts
|
|
21674
|
-
declare const disables: () => Promise<TypedFlatConfigItem[]>;
|
|
21696
|
+
export declare const disables: (functionalEnabled?: boolean) => Promise<TypedFlatConfigItem[]>;
|
|
21675
21697
|
//#endregion
|
|
21676
21698
|
//#region src/configs/e18e.d.ts
|
|
21677
|
-
declare const e18e: (options: Readonly<OptionsE18e & OptionsIsInEditor & OptionsLessOpinionated & OptionsMode>) => Promise<TypedFlatConfigItem[]>;
|
|
21699
|
+
export declare const e18e: (options: Readonly<OptionsE18e & OptionsIsInEditor & OptionsLessOpinionated & OptionsMode>) => Promise<TypedFlatConfigItem[]>;
|
|
21678
21700
|
//#endregion
|
|
21679
21701
|
//#region src/configs/eslint-comments.d.ts
|
|
21680
|
-
declare const comments: (options: Readonly<OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21702
|
+
export declare const comments: (options: Readonly<OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21681
21703
|
//#endregion
|
|
21682
21704
|
//#region src/configs/functional.d.ts
|
|
21683
|
-
declare const functional: (options: Readonly<OptionsOverrides & Required<OptionsFunctional & OptionsMode & OptionsTypeScriptParserOptions & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21705
|
+
export declare const functional: (options: Readonly<OptionsOverrides & Required<OptionsFunctional & OptionsMode & OptionsTypeScriptParserOptions & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21684
21706
|
//#endregion
|
|
21685
21707
|
//#region src/configs/ignores.d.ts
|
|
21686
|
-
declare const ignores: (options: Readonly<OptionsIgnores>) => Promise<TypedFlatConfigItem[]>;
|
|
21708
|
+
export declare const ignores: (options: Readonly<OptionsIgnores>) => Promise<TypedFlatConfigItem[]>;
|
|
21687
21709
|
//#endregion
|
|
21688
21710
|
//#region src/configs/imports.d.ts
|
|
21689
|
-
declare const imports: (options: Readonly<OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsTypeScriptParserOptions & Required<RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21711
|
+
export declare const imports: (options: Readonly<OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsTypeScriptParserOptions & Required<RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21690
21712
|
//#endregion
|
|
21691
21713
|
//#region src/configs/javascript.d.ts
|
|
21692
|
-
declare const javascript: (options: Readonly<OptionsIsInEditor & OptionsLessOpinionated & OptionsOverrides & OptionsPerfectionist & Required<OptionsFunctional>>) => Promise<TypedFlatConfigItem[]>;
|
|
21714
|
+
export declare const javascript: (options: Readonly<OptionsIsInEditor & OptionsLessOpinionated & OptionsOverrides & OptionsPerfectionist & Required<OptionsFunctional>>) => Promise<TypedFlatConfigItem[]>;
|
|
21693
21715
|
//#endregion
|
|
21694
21716
|
//#region src/configs/jsdoc.d.ts
|
|
21695
|
-
declare const jsdoc: (options: Readonly<OptionsJSDoc & OptionsLessOpinionated & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21717
|
+
export declare const jsdoc: (options: Readonly<OptionsJSDoc & OptionsLessOpinionated & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21696
21718
|
//#endregion
|
|
21697
21719
|
//#region src/configs/jsonc.d.ts
|
|
21698
|
-
declare const jsonc: (options: Readonly<OptionsOverrides & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21720
|
+
export declare const jsonc: (options: Readonly<OptionsOverrides & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21699
21721
|
//#endregion
|
|
21700
21722
|
//#region src/configs/jsx.d.ts
|
|
21701
|
-
declare const jsx: (options: Readonly<OptionsJSX & OptionsLessOpinionated & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21723
|
+
export declare const jsx: (options: Readonly<OptionsJSX & OptionsLessOpinionated & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21702
21724
|
//#endregion
|
|
21703
21725
|
//#region src/configs/nextjs.d.ts
|
|
21704
|
-
declare const nextjs: (options: Readonly<OptionsNextJS & Required<OptionsFiles>>) => Promise<TypedFlatConfigItem[]>;
|
|
21726
|
+
export declare const nextjs: (options: Readonly<OptionsNextJS & Required<OptionsFiles>>) => Promise<TypedFlatConfigItem[]>;
|
|
21705
21727
|
//#endregion
|
|
21706
21728
|
//#region src/configs/node.d.ts
|
|
21707
|
-
declare const node: (options: Readonly<OptionsFiles & OptionsLessOpinionated & OptionsNode>) => Promise<TypedFlatConfigItem[]>;
|
|
21729
|
+
export declare const node: (options: Readonly<OptionsFiles & OptionsLessOpinionated & OptionsNode>) => Promise<TypedFlatConfigItem[]>;
|
|
21708
21730
|
//#endregion
|
|
21709
21731
|
//#region src/configs/perfectionist.d.ts
|
|
21710
|
-
declare const perfectionist: (options: Readonly<OptionsPerfectionist>) => Promise<TypedFlatConfigItem[]>;
|
|
21732
|
+
export declare const perfectionist: (options: Readonly<OptionsPerfectionist>) => Promise<TypedFlatConfigItem[]>;
|
|
21711
21733
|
//#endregion
|
|
21712
21734
|
//#region src/configs/promise.d.ts
|
|
21713
|
-
declare const promise: (options: Readonly<OptionsHasTypeScript & OptionsLessOpinionated & OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21735
|
+
export declare const promise: (options: Readonly<OptionsHasTypeScript & OptionsLessOpinionated & OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21714
21736
|
//#endregion
|
|
21715
21737
|
//#region src/configs/react.d.ts
|
|
21716
|
-
declare const react: (options: Readonly<OptionsLessOpinionated & OptionsReact & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & Required<OptionsFiles & OptionsHasTypeScript & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21738
|
+
export declare const react: (options: Readonly<OptionsLessOpinionated & OptionsReact & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & Required<OptionsFiles & OptionsHasTypeScript & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21717
21739
|
//#endregion
|
|
21718
21740
|
//#region src/configs/regexp.d.ts
|
|
21719
|
-
declare const regexp: (options: Readonly<OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21741
|
+
export declare const regexp: (options: Readonly<OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21720
21742
|
//#endregion
|
|
21721
21743
|
//#region src/configs/sort.d.ts
|
|
21722
21744
|
/**
|
|
@@ -21724,52 +21746,52 @@ declare const regexp: (options: Readonly<OptionsOverrides>) => Promise<TypedFlat
|
|
|
21724
21746
|
*
|
|
21725
21747
|
* Requires `jsonc` config
|
|
21726
21748
|
*/
|
|
21727
|
-
declare const sortPackageJson: (options?: Readonly<OptionsOverrides>) => TypedFlatConfigItem[];
|
|
21749
|
+
export declare const sortPackageJson: (options?: Readonly<OptionsOverrides>) => TypedFlatConfigItem[];
|
|
21728
21750
|
/**
|
|
21729
21751
|
* Sort tsconfig.json
|
|
21730
21752
|
*
|
|
21731
21753
|
* Requires `jsonc` config
|
|
21732
21754
|
*/
|
|
21733
|
-
declare const sortTsconfig: (options?: Readonly<OptionsOverrides>) => TypedFlatConfigItem[];
|
|
21755
|
+
export declare const sortTsconfig: (options?: Readonly<OptionsOverrides>) => TypedFlatConfigItem[];
|
|
21734
21756
|
//#endregion
|
|
21735
21757
|
//#region src/configs/stylistic.d.ts
|
|
21736
|
-
declare const StylisticConfigDefaults: Required<StylisticConfig>;
|
|
21737
|
-
declare const stylistic: (options: Readonly<OptionsLessOpinionated & OptionsOverrides & Required<OptionsHasTypeScript & StylisticConfig>>) => Promise<TypedFlatConfigItem[]>;
|
|
21758
|
+
export declare const StylisticConfigDefaults: Required<StylisticConfig>;
|
|
21759
|
+
export declare const stylistic: (options: Readonly<OptionsLessOpinionated & OptionsOverrides & Required<OptionsHasTypeScript & StylisticConfig>>) => Promise<TypedFlatConfigItem[]>;
|
|
21738
21760
|
//#endregion
|
|
21739
21761
|
//#region src/configs/tailwind.d.ts
|
|
21740
|
-
declare const tailwind: (options: Readonly<Required<RequiredOptionsStylistic & RequiredOptionsTailwind>>) => Promise<TypedFlatConfigItem[]>;
|
|
21762
|
+
export declare const tailwind: (options: Readonly<Required<RequiredOptionsStylistic & RequiredOptionsTailwind>>) => Promise<TypedFlatConfigItem[]>;
|
|
21741
21763
|
//#endregion
|
|
21742
21764
|
//#region src/configs/test.d.ts
|
|
21743
|
-
declare const test: (options: Readonly<OptionsIsInEditor & OptionsOverrides & Required<OptionsFiles & OptionsFunctional>>) => Promise<TypedFlatConfigItem[]>;
|
|
21765
|
+
export declare const test: (options: Readonly<OptionsIsInEditor & OptionsOverrides & Required<OptionsFiles & OptionsFunctional>>) => Promise<TypedFlatConfigItem[]>;
|
|
21744
21766
|
//#endregion
|
|
21745
21767
|
//#region src/configs/toml.d.ts
|
|
21746
|
-
declare const toml: (options: Readonly<OptionsOverrides & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21768
|
+
export declare const toml: (options: Readonly<OptionsOverrides & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21747
21769
|
//#endregion
|
|
21748
21770
|
//#region src/configs/typescript.d.ts
|
|
21749
|
-
declare const typescript: (options: Readonly<OptionsLessOpinionated & OptionsOverrides & OptionsStylistic & OptionsTypeScriptErasableOnly & OptionsTypeScriptWithTypes & Required<OptionsComponentExts & OptionsFiles & OptionsFunctional & OptionsMode & OptionsTypeScriptParserOptions>>) => Promise<TypedFlatConfigItem[]>;
|
|
21771
|
+
export declare const typescript: (options: Readonly<OptionsLessOpinionated & OptionsOverrides & OptionsStylistic & OptionsTypeScriptErasableOnly & OptionsTypeScriptWithTypes & Required<OptionsComponentExts & OptionsFiles & OptionsFunctional & OptionsMode & OptionsTypeScriptParserOptions>>) => Promise<TypedFlatConfigItem[]>;
|
|
21750
21772
|
//#endregion
|
|
21751
21773
|
//#region src/configs/unicorn.d.ts
|
|
21752
|
-
declare const unicorn: (options: Readonly<OptionsLessOpinionated & OptionsOverrides & Required<OptionsFiles>>) => Promise<TypedFlatConfigItem[]>;
|
|
21774
|
+
export declare const unicorn: (options: Readonly<OptionsLessOpinionated & OptionsOverrides & Required<OptionsFiles>>) => Promise<TypedFlatConfigItem[]>;
|
|
21753
21775
|
//#endregion
|
|
21754
21776
|
//#region src/configs/vue.d.ts
|
|
21755
|
-
declare const vue: (options: Readonly<OptionsOverrides & OptionsTypeScriptWithTypes & OptionsVue & Required<OptionsFiles & OptionsHasTypeScript & OptionsTypeScriptParserOptions & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21777
|
+
export declare const vue: (options: Readonly<OptionsOverrides & OptionsTypeScriptWithTypes & OptionsVue & Required<OptionsFiles & OptionsHasTypeScript & OptionsTypeScriptParserOptions & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21756
21778
|
//#endregion
|
|
21757
21779
|
//#region src/configs/yaml.d.ts
|
|
21758
|
-
declare const yaml: (options: Readonly<OptionsOverrides & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21780
|
+
export declare const yaml: (options: Readonly<OptionsOverrides & Required<OptionsFiles & RequiredOptionsStylistic>>) => Promise<TypedFlatConfigItem[]>;
|
|
21759
21781
|
//#endregion
|
|
21760
21782
|
//#region src/factory.d.ts
|
|
21761
21783
|
/**
|
|
21762
21784
|
* Construct an array of ESLint flat config items.
|
|
21763
21785
|
*
|
|
21764
|
-
* @param {OptionsConfig & TypedFlatConfigItem} options - Options for generating the ESLint configurations.
|
|
21786
|
+
* @param {OptionsConfig & TypedFlatConfigItem} [options={}] - Options for generating the ESLint configurations.
|
|
21765
21787
|
* @param {Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]} userConfigs - User configurations to be merged with the generated configurations
|
|
21766
21788
|
* @returns {Promise<TypedFlatConfigItem[]>} - The merged ESLint configurations
|
|
21767
21789
|
*/
|
|
21768
|
-
declare function moso(options
|
|
21790
|
+
export declare function moso(options?: Omit<TypedFlatConfigItem, "files" | "ignores"> & OptionsConfig, ...userConfigs: ReadonlyArray<Awaitable<Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<Linter.Config[]>;
|
|
21769
21791
|
//#endregion
|
|
21770
21792
|
//#region src/presets.d.ts
|
|
21771
|
-
declare const full: OptionsConfig;
|
|
21772
|
-
declare const off: OptionsConfig;
|
|
21793
|
+
export declare const full: OptionsConfig;
|
|
21794
|
+
export declare const off: OptionsConfig;
|
|
21773
21795
|
//#endregion
|
|
21774
21796
|
//#region src/utils.d.ts
|
|
21775
21797
|
/**
|
|
@@ -21781,7 +21803,7 @@ declare const off: OptionsConfig;
|
|
|
21781
21803
|
* @param configs - Config items, arrays of items, or promises of either.
|
|
21782
21804
|
* @returns A single flat array with every item resolved.
|
|
21783
21805
|
*/
|
|
21784
|
-
declare const combine: (...configs: ReadonlyArray<Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>>) => Promise<TypedFlatConfigItem[]>;
|
|
21806
|
+
export declare const combine: (...configs: ReadonlyArray<Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>>) => Promise<TypedFlatConfigItem[]>;
|
|
21785
21807
|
/**
|
|
21786
21808
|
* Validate a user-supplied file path before it is handed to the TypeScript
|
|
21787
21809
|
* project service as `tsconfigRootDir`.
|
|
@@ -21790,7 +21812,7 @@ declare const combine: (...configs: ReadonlyArray<Awaitable<TypedFlatConfigItem
|
|
|
21790
21812
|
* @returns The path, unchanged, when it passes validation.
|
|
21791
21813
|
* @throws Error when the path is empty or carries leading/trailing whitespace.
|
|
21792
21814
|
*/
|
|
21793
|
-
declare const checkFilePath: (path: string) => string;
|
|
21815
|
+
export declare const checkFilePath: (path: string) => string;
|
|
21794
21816
|
/**
|
|
21795
21817
|
* Merge the `rules` of a shared flat-config array into a single rule map.
|
|
21796
21818
|
*
|
|
@@ -21801,7 +21823,7 @@ declare const checkFilePath: (path: string) => string;
|
|
|
21801
21823
|
* @param configs - A plugin's exported flat config array.
|
|
21802
21824
|
* @returns Every config's rules merged in order.
|
|
21803
21825
|
*/
|
|
21804
|
-
declare const flattenRules: (configs: ReadonlyArray<Linter.Config>) => NonNullable<Linter.Config["rules"]>;
|
|
21826
|
+
export declare const flattenRules: (configs: ReadonlyArray<Linter.Config>) => NonNullable<Linter.Config["rules"]>;
|
|
21805
21827
|
/**
|
|
21806
21828
|
* Build a global-ignores config item (an item with only `ignores`,
|
|
21807
21829
|
* which ESLint applies to the entire run).
|
|
@@ -21811,7 +21833,7 @@ declare const flattenRules: (configs: ReadonlyArray<Linter.Config>) => NonNullab
|
|
|
21811
21833
|
* @returns A flat config item carrying only the ignore patterns.
|
|
21812
21834
|
* @throws TypeError when `ignorePatterns` is not a non-empty array.
|
|
21813
21835
|
*/
|
|
21814
|
-
declare const globalIgnores: (ignorePatterns: ReadonlyArray<string>, name?: string) => TypedFlatConfigItem;
|
|
21836
|
+
export declare const globalIgnores: (ignorePatterns: ReadonlyArray<string>, name?: string) => TypedFlatConfigItem;
|
|
21815
21837
|
/**
|
|
21816
21838
|
* Await a value and unwrap its `default` export when present.
|
|
21817
21839
|
*
|
|
@@ -21821,7 +21843,7 @@ declare const globalIgnores: (ignorePatterns: ReadonlyArray<string>, name?: stri
|
|
|
21821
21843
|
* @param value - A module (or promise of one) whose default export should be unwrapped.
|
|
21822
21844
|
* @returns The default export when one exists, otherwise the resolved value itself.
|
|
21823
21845
|
*/
|
|
21824
|
-
declare const interopDefault: <T>(value: Awaitable<T>) => Promise<T extends {
|
|
21846
|
+
export declare const interopDefault: <T>(value: Awaitable<T>) => Promise<T extends {
|
|
21825
21847
|
default: infer U;
|
|
21826
21848
|
} ? U : T>;
|
|
21827
21849
|
/**
|
|
@@ -21833,7 +21855,7 @@ declare const interopDefault: <T>(value: Awaitable<T>) => Promise<T extends {
|
|
|
21833
21855
|
*
|
|
21834
21856
|
* @returns `true` only for editor processes outside CI, git hooks, and lint-staged.
|
|
21835
21857
|
*/
|
|
21836
|
-
declare const isInEditorEnv: () => boolean;
|
|
21858
|
+
export declare const isInEditorEnv: () => boolean;
|
|
21837
21859
|
/**
|
|
21838
21860
|
* Normalize a factory option that accepts `boolean | string | number | object`
|
|
21839
21861
|
* down to its object form.
|
|
@@ -21842,7 +21864,7 @@ declare const isInEditorEnv: () => boolean;
|
|
|
21842
21864
|
* @param key - The option key to resolve.
|
|
21843
21865
|
* @returns The option's object form; `{}` when the option was a boolean, string, number, or absent.
|
|
21844
21866
|
*/
|
|
21845
|
-
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: Readonly<OptionsConfig>, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
21867
|
+
export declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: Readonly<OptionsConfig>, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
21846
21868
|
/**
|
|
21847
21869
|
* Extract the `overrides` rule map from a factory option, regardless of
|
|
21848
21870
|
* whether the option was given as a boolean, string, or object.
|
|
@@ -21851,7 +21873,7 @@ declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: Readon
|
|
|
21851
21873
|
* @param key - The option key whose overrides should be extracted.
|
|
21852
21874
|
* @returns The user's rule overrides for that config; `{}` when none were given.
|
|
21853
21875
|
*/
|
|
21854
|
-
declare const getOverrides: (options: Readonly<OptionsConfig>, key: keyof OptionsConfig) => (Partial<Record<string, SharedConfig.RuleEntry>> & RuleOptions);
|
|
21876
|
+
export declare const getOverrides: (options: Readonly<OptionsConfig>, key: keyof OptionsConfig) => (Partial<Record<string, SharedConfig.RuleEntry>> & RuleOptions);
|
|
21855
21877
|
declare global {
|
|
21856
21878
|
var __ESLINT_PLUGIN_MEMO__: Map<string, ESLint.Plugin> | undefined;
|
|
21857
21879
|
}
|
|
@@ -21870,7 +21892,7 @@ declare global {
|
|
|
21870
21892
|
* @param key - Stable identifier; must be identical everywhere the same package is registered.
|
|
21871
21893
|
* @returns The first instance ever registered under `key`.
|
|
21872
21894
|
*/
|
|
21873
|
-
declare const memoize: <T extends ESLint.Plugin>(plugin: T, key: string) => T;
|
|
21895
|
+
export declare const memoize: <T extends ESLint.Plugin>(plugin: T, key: string) => T;
|
|
21874
21896
|
/**
|
|
21875
21897
|
* HTML inline non-void elements, used by the Vue config for
|
|
21876
21898
|
* `vue/singleline-html-element-content-newline` exceptions.
|
|
@@ -21879,6 +21901,6 @@ declare const memoize: <T extends ESLint.Plugin>(plugin: T, key: string) => T;
|
|
|
21879
21901
|
*
|
|
21880
21902
|
* @see https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/inline-non-void-elements.json
|
|
21881
21903
|
*/
|
|
21882
|
-
declare const vueInlineElements: ReadonlyArray<string>;
|
|
21904
|
+
export declare const vueInlineElements: ReadonlyArray<string>;
|
|
21883
21905
|
//#endregion
|
|
21884
|
-
export { type Awaitable, type ConfigNames, type ConfigOptions, type CoreOptions, type FrameworkOptions,
|
|
21906
|
+
export { type Awaitable, type ConfigNames, type ConfigOptions, type CoreOptions, type FrameworkOptions, type LanguageOptions, type OptionsAstro, type OptionsBaseline, type OptionsComponentExts, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFunctional, type OptionsHasTypeScript, type OptionsIgnores, type OptionsIsInEditor, type OptionsJSDoc, type OptionsJSX, type OptionsLessOpinionated, type OptionsMode, type OptionsNextJS, type OptionsNode, type OptionsOverrides, type OptionsPerfectionist, type OptionsProjectRoot, type OptionsReact, type OptionsStylistic, type OptionsTailwind, type OptionsTypeScript, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsVue, type ProjectMode, type RequiredOptionsStylistic, type RequiredOptionsTailwind, type ResolvedOptions, type RuleOptions as Rules, type StyleOptions, type StylisticConfig, type TypedFlatConfigItem, moso as default };
|