@w5s/eslint-config 3.11.0 → 3.12.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/dist/index.d.ts +4828 -2005
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +210 -169
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
- package/src/config/e18e.ts +8 -5
- package/src/config/es.ts +9 -7
- package/src/config/ignores.ts +1 -1
- package/src/config/imports.ts +6 -4
- package/src/config/jsdoc.ts +8 -5
- package/src/config/jsonc.ts +27 -24
- package/src/config/markdown.ts +25 -8
- package/src/config/next.ts +14 -11
- package/src/config/node.ts +5 -3
- package/src/config/perfectionist.ts +44 -0
- package/src/config/react.ts +9 -6
- package/src/config/stylistic.ts +7 -5
- package/src/config/test.ts +10 -7
- package/src/config/ts.ts +10 -7
- package/src/config/unicorn.ts +7 -5
- package/src/config/yml.ts +8 -5
- package/src/config.ts +2 -1
- package/src/defineConfig.ts +50 -31
- package/src/index.ts +2 -2
- package/src/internal/withDefaultFiles.ts +12 -0
- package/src/meta.ts +2 -2
- package/src/rules/esRules/bestPractices.ts +32 -32
- package/src/rules/esRules/errors.ts +8 -8
- package/src/rules/esRules/es6.ts +8 -8
- package/src/rules/esRules/variables.ts +4 -4
- package/src/rules/tsRules.ts +1 -0
- package/src/type/PluginOptionsBase.ts +8 -4
- package/src/type/StylisticConfig.ts +3 -2
- package/src/typegen/perfectionist.d.ts +4494 -0
- package/src/typegen/unicorn.d.ts +374 -310
package/src/typegen/unicorn.d.ts
CHANGED
|
@@ -11,1560 +11,1620 @@ declare module 'eslint' {
|
|
|
11
11
|
export interface RuleOptions {
|
|
12
12
|
/**
|
|
13
13
|
* Prefer better DOM traversal APIs.
|
|
14
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/better-dom-traversing.md
|
|
15
15
|
*/
|
|
16
16
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>
|
|
17
17
|
/**
|
|
18
18
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
19
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
20
20
|
* @deprecated
|
|
21
21
|
*/
|
|
22
22
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>
|
|
23
23
|
/**
|
|
24
24
|
* Enforce a specific parameter name in catch clauses.
|
|
25
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
25
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/catch-error-name.md
|
|
26
26
|
*/
|
|
27
27
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
28
28
|
/**
|
|
29
29
|
* Enforce consistent class references in static methods.
|
|
30
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
30
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/class-reference-in-static-methods.md
|
|
31
31
|
*/
|
|
32
32
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>
|
|
33
33
|
/**
|
|
34
34
|
* Enforce better comment content.
|
|
35
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
35
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/comment-content.md
|
|
36
36
|
*/
|
|
37
37
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>
|
|
38
38
|
/**
|
|
39
39
|
* Enforce consistent assertion style with `node:assert`.
|
|
40
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
40
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-assert.md
|
|
41
41
|
*/
|
|
42
42
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
43
43
|
/**
|
|
44
44
|
* Enforce consistent naming for boolean names.
|
|
45
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
45
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-boolean-name.md
|
|
46
46
|
*/
|
|
47
47
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>
|
|
48
48
|
/**
|
|
49
49
|
* Enforce consistent class member order.
|
|
50
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
50
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-class-member-order.md
|
|
51
51
|
*/
|
|
52
52
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>
|
|
53
53
|
/**
|
|
54
54
|
* Enforce consistent spelling of compound words in identifiers.
|
|
55
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
55
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-compound-words.md
|
|
56
56
|
*/
|
|
57
57
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>
|
|
58
58
|
/**
|
|
59
59
|
* Enforce consistent conditional object spread style.
|
|
60
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
60
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
61
61
|
*/
|
|
62
62
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>
|
|
63
63
|
/**
|
|
64
64
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
65
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
65
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-date-clone.md
|
|
66
66
|
*/
|
|
67
67
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
68
68
|
/**
|
|
69
69
|
* Use destructured variables over properties.
|
|
70
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
70
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-destructuring.md
|
|
71
71
|
*/
|
|
72
72
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
73
73
|
/**
|
|
74
74
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
75
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
75
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-empty-array-spread.md
|
|
76
76
|
*/
|
|
77
77
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
78
78
|
/**
|
|
79
79
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
80
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
80
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-existence-index-check.md
|
|
81
81
|
*/
|
|
82
82
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
83
83
|
/**
|
|
84
84
|
* Enforce consistent decorator position on exported classes.
|
|
85
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
85
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-export-decorator-position.md
|
|
86
86
|
*/
|
|
87
87
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>
|
|
88
88
|
/**
|
|
89
89
|
* Move function definitions to the highest possible scope.
|
|
90
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
90
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-scoping.md
|
|
91
91
|
*/
|
|
92
92
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
93
93
|
/**
|
|
94
94
|
* Enforce function syntax by role.
|
|
95
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
95
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-style.md
|
|
96
96
|
*/
|
|
97
97
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>
|
|
98
98
|
/**
|
|
99
99
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-json-file-read.md
|
|
101
101
|
*/
|
|
102
102
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>
|
|
103
103
|
/**
|
|
104
104
|
* Enforce consistent optional chaining for same-base member access.
|
|
105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-optional-chaining.md
|
|
106
106
|
*/
|
|
107
107
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>
|
|
108
108
|
/**
|
|
109
109
|
* Enforce consistent style for escaping `${` in template literals.
|
|
110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-template-literal-escape.md
|
|
111
111
|
*/
|
|
112
112
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>
|
|
113
|
+
/**
|
|
114
|
+
* Enforce consistent labels on tuple type elements.
|
|
115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-tuple-labels.md
|
|
116
|
+
*/
|
|
117
|
+
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>
|
|
113
118
|
/**
|
|
114
119
|
* Enforce correct `Error` subclassing.
|
|
115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/custom-error-definition.md
|
|
116
121
|
*/
|
|
117
122
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
118
123
|
/**
|
|
119
124
|
* Enforce consistent default export declarations.
|
|
120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/default-export-style.md
|
|
121
126
|
*/
|
|
122
127
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>
|
|
123
128
|
/**
|
|
124
129
|
* Enforce consistent style for DOM element dataset access.
|
|
125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/dom-node-dataset.md
|
|
126
131
|
*/
|
|
127
132
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>
|
|
128
133
|
/**
|
|
129
134
|
* Enforce no spaces between braces.
|
|
130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/empty-brace-spaces.md
|
|
131
136
|
*/
|
|
132
137
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
133
138
|
/**
|
|
134
139
|
* Enforce passing a `message` value when creating a built-in error.
|
|
135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/error-message.md
|
|
136
141
|
*/
|
|
137
142
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
138
143
|
/**
|
|
139
144
|
* Require escape sequences to use uppercase or lowercase values.
|
|
140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/escape-case.md
|
|
141
146
|
*/
|
|
142
147
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
143
148
|
/**
|
|
144
149
|
* Add expiration conditions to TODO comments.
|
|
145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/expiring-todo-comments.md
|
|
146
151
|
*/
|
|
147
152
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
148
153
|
/**
|
|
149
154
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-length-check.md
|
|
151
156
|
*/
|
|
152
157
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
153
158
|
/**
|
|
154
159
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-timer-delay.md
|
|
156
161
|
*/
|
|
157
162
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>
|
|
158
163
|
/**
|
|
159
164
|
* Enforce a case style for filenames and directory names.
|
|
160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/filename-case.md
|
|
161
166
|
*/
|
|
162
167
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
163
168
|
/**
|
|
164
169
|
* Require identifiers to match a specified regular expression.
|
|
165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/id-match.md
|
|
166
171
|
*/
|
|
167
172
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>
|
|
168
173
|
/**
|
|
169
174
|
* Enforce specific import styles per module.
|
|
170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/import-style.md
|
|
171
176
|
*/
|
|
172
177
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
173
178
|
/**
|
|
174
179
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/isolated-functions.md
|
|
176
181
|
*/
|
|
177
182
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>
|
|
178
183
|
/**
|
|
179
184
|
* Require or disallow logical assignment operator shorthand
|
|
180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/logical-assignment-operators.md
|
|
181
186
|
*/
|
|
182
187
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>
|
|
183
188
|
/**
|
|
184
189
|
* Limit the depth of nested calls.
|
|
185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/max-nested-calls.md
|
|
186
191
|
*/
|
|
187
192
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>
|
|
188
193
|
/**
|
|
189
194
|
* Enforce replacements for variable, property, and filenames.
|
|
190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/name-replacements.md
|
|
191
196
|
*/
|
|
192
197
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>
|
|
193
198
|
/**
|
|
194
199
|
* Enforce correct use of `new` for builtin constructors.
|
|
195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/new-for-builtins.md
|
|
196
201
|
*/
|
|
197
202
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
198
203
|
/**
|
|
199
204
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
201
206
|
*/
|
|
202
207
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
203
208
|
/**
|
|
204
209
|
* Disallow recursive access to `this` within getters and setters.
|
|
205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accessor-recursion.md
|
|
206
211
|
*/
|
|
207
212
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
208
213
|
/**
|
|
209
214
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
211
216
|
*/
|
|
212
217
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>
|
|
213
218
|
/**
|
|
214
219
|
* Disallow anonymous functions and classes as the default export.
|
|
215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-anonymous-default-export.md
|
|
216
221
|
*/
|
|
217
222
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
218
223
|
/**
|
|
219
224
|
* Prevent passing a function reference directly to iterator methods.
|
|
220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-callback-reference.md
|
|
221
226
|
*/
|
|
222
227
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>
|
|
223
228
|
/**
|
|
224
229
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-concat-in-loop.md
|
|
226
231
|
*/
|
|
227
232
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>
|
|
228
233
|
/**
|
|
229
234
|
* Disallow using reference values as `Array#fill()` values.
|
|
230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
231
236
|
*/
|
|
232
237
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>
|
|
233
238
|
/**
|
|
234
239
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-from-fill.md
|
|
236
241
|
*/
|
|
237
242
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>
|
|
238
243
|
/**
|
|
239
244
|
* Disallow front-of-array mutation.
|
|
240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-front-mutation.md
|
|
241
246
|
*/
|
|
242
247
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>
|
|
243
248
|
/**
|
|
244
249
|
* Disallow using the `this` argument in array methods.
|
|
245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-method-this-argument.md
|
|
246
251
|
*/
|
|
247
252
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
248
253
|
/**
|
|
249
254
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
251
256
|
* @deprecated
|
|
252
257
|
*/
|
|
253
258
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
254
259
|
/**
|
|
255
260
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reduce.md
|
|
257
262
|
*/
|
|
258
263
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
259
264
|
/**
|
|
260
265
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reverse.md
|
|
262
267
|
*/
|
|
263
268
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
264
269
|
/**
|
|
265
270
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort.md
|
|
267
272
|
*/
|
|
268
273
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
269
274
|
/**
|
|
270
275
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
272
277
|
*/
|
|
273
278
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>
|
|
274
279
|
/**
|
|
275
280
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-splice.md
|
|
277
282
|
*/
|
|
278
283
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>
|
|
279
284
|
/**
|
|
280
285
|
* Disallow asterisk prefixes in documentation comments.
|
|
281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
282
287
|
*/
|
|
283
288
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>
|
|
284
289
|
/**
|
|
285
290
|
* Disallow member access from await expression.
|
|
286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-expression-member.md
|
|
287
292
|
*/
|
|
288
293
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
289
294
|
/**
|
|
290
295
|
* Disallow using `await` in `Promise` method parameters.
|
|
291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-in-promise-methods.md
|
|
292
297
|
*/
|
|
293
298
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
294
299
|
/**
|
|
295
300
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-blob-to-file.md
|
|
297
302
|
*/
|
|
298
303
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>
|
|
299
304
|
/**
|
|
300
305
|
* Disallow boolean-returning sort comparators.
|
|
301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
302
307
|
*/
|
|
303
308
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>
|
|
304
309
|
/**
|
|
305
310
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-break-in-nested-loop.md
|
|
307
312
|
*/
|
|
308
313
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>
|
|
309
314
|
/**
|
|
310
315
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-canvas-to-image.md
|
|
312
317
|
*/
|
|
313
318
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>
|
|
314
319
|
/**
|
|
315
320
|
* Disallow chained comparisons such as `a < b < c`.
|
|
316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-chained-comparison.md
|
|
317
322
|
*/
|
|
318
323
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>
|
|
319
324
|
/**
|
|
320
325
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-collection-bracket-access.md
|
|
322
327
|
*/
|
|
323
328
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>
|
|
324
329
|
/**
|
|
325
330
|
* Disallow dynamic object property existence checks.
|
|
326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-computed-property-existence-check.md
|
|
327
332
|
*/
|
|
328
333
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>
|
|
329
334
|
/**
|
|
330
335
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-splice.md
|
|
332
337
|
*/
|
|
333
338
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>
|
|
334
339
|
/**
|
|
335
340
|
* Disallow confusing uses of `Array#with()`.
|
|
336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-with.md
|
|
337
342
|
*/
|
|
338
343
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>
|
|
339
344
|
/**
|
|
340
345
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-console-spaces.md
|
|
342
347
|
*/
|
|
343
348
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
344
349
|
/**
|
|
345
350
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-constant-zero-expression.md
|
|
347
352
|
*/
|
|
348
353
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>
|
|
349
354
|
/**
|
|
350
355
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
352
357
|
*/
|
|
353
358
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>
|
|
354
359
|
/**
|
|
355
360
|
* Do not use `document.cookie` directly.
|
|
356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-document-cookie.md
|
|
357
362
|
*/
|
|
358
363
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
359
364
|
/**
|
|
360
365
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-double-comparison.md
|
|
362
367
|
*/
|
|
363
368
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>
|
|
364
369
|
/**
|
|
365
370
|
* Disallow duplicate adjacent branches in if chains.
|
|
366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-if-branches.md
|
|
367
372
|
*/
|
|
368
373
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>
|
|
369
374
|
/**
|
|
370
375
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
372
377
|
*/
|
|
373
378
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>
|
|
374
379
|
/**
|
|
375
380
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-loops.md
|
|
377
382
|
*/
|
|
378
383
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>
|
|
379
384
|
/**
|
|
380
385
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-set-values.md
|
|
382
387
|
*/
|
|
383
388
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>
|
|
384
389
|
/**
|
|
385
390
|
* Disallow empty files.
|
|
386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-empty-file.md
|
|
387
392
|
*/
|
|
388
393
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>
|
|
389
394
|
/**
|
|
390
395
|
* Disallow assigning to built-in error properties.
|
|
391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-error-property-assignment.md
|
|
392
397
|
*/
|
|
393
398
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>
|
|
394
399
|
/**
|
|
395
400
|
* Disallow exports in scripts.
|
|
396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-exports-in-scripts.md
|
|
397
402
|
*/
|
|
398
403
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>
|
|
399
404
|
/**
|
|
400
405
|
* Prefer `for…of` over the `forEach` method.
|
|
401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-each.md
|
|
402
407
|
*/
|
|
403
408
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>
|
|
404
409
|
/**
|
|
405
410
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-loop.md
|
|
407
412
|
*/
|
|
408
413
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
409
414
|
/**
|
|
410
415
|
* Disallow assigning properties on the global object.
|
|
411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-global-object-property-assignment.md
|
|
412
417
|
*/
|
|
413
418
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>
|
|
414
419
|
/**
|
|
415
420
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
417
422
|
* @deprecated
|
|
418
423
|
*/
|
|
419
424
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
420
425
|
/**
|
|
421
426
|
* Disallow immediate mutation after variable assignment.
|
|
422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-immediate-mutation.md
|
|
423
428
|
*/
|
|
424
429
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
|
|
425
430
|
/**
|
|
426
431
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-impossible-length-comparison.md
|
|
428
433
|
*/
|
|
429
434
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>
|
|
430
435
|
/**
|
|
431
436
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-query-selector.md
|
|
433
438
|
*/
|
|
434
439
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>
|
|
435
440
|
/**
|
|
436
441
|
* Disallow incorrect template literal interpolation syntax.
|
|
437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
438
443
|
*/
|
|
439
444
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>
|
|
440
445
|
/**
|
|
441
446
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
443
448
|
* @deprecated
|
|
444
449
|
*/
|
|
445
450
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
446
451
|
/**
|
|
447
452
|
* Disallow `instanceof` with built-in objects
|
|
448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-instanceof-builtins.md
|
|
449
454
|
*/
|
|
450
455
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
451
456
|
/**
|
|
452
457
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-argument-count.md
|
|
454
459
|
*/
|
|
455
460
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>
|
|
456
461
|
/**
|
|
457
462
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-character-comparison.md
|
|
459
464
|
*/
|
|
460
465
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>
|
|
461
466
|
/**
|
|
462
467
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-fetch-options.md
|
|
464
469
|
*/
|
|
465
470
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
466
471
|
/**
|
|
467
472
|
* Disallow invalid `accept` values on file inputs.
|
|
468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
469
474
|
*/
|
|
470
475
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>
|
|
471
476
|
/**
|
|
472
477
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
474
479
|
*/
|
|
475
480
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
481
|
+
/**
|
|
482
|
+
* Disallow invalid implementations of well-known symbol methods.
|
|
483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
484
|
+
*/
|
|
485
|
+
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>
|
|
476
486
|
/**
|
|
477
487
|
* Disallow identifiers starting with `new` or `class`.
|
|
478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-keyword-prefix.md
|
|
479
489
|
*/
|
|
480
490
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
481
491
|
/**
|
|
482
492
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-current-target-access.md
|
|
484
494
|
*/
|
|
485
495
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>
|
|
496
|
+
/**
|
|
497
|
+
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-event-control.md
|
|
499
|
+
*/
|
|
500
|
+
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>
|
|
486
501
|
/**
|
|
487
502
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
489
504
|
* @deprecated
|
|
490
505
|
*/
|
|
491
506
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
492
507
|
/**
|
|
493
508
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-lonely-if.md
|
|
495
510
|
*/
|
|
496
511
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
497
512
|
/**
|
|
498
513
|
* Disallow mutating a loop iterable during iteration.
|
|
499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
500
515
|
*/
|
|
501
516
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>
|
|
502
517
|
/**
|
|
503
518
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
505
520
|
*/
|
|
506
521
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
507
522
|
/**
|
|
508
523
|
* Disallow manually wrapped comments.
|
|
509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
510
525
|
*/
|
|
511
526
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>
|
|
512
527
|
/**
|
|
513
528
|
* Disallow checking a Map key before accessing a different key.
|
|
514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-mismatched-map-key.md
|
|
515
530
|
*/
|
|
516
531
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>
|
|
517
532
|
/**
|
|
518
533
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-misrefactored-assignment.md
|
|
520
535
|
*/
|
|
521
536
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>
|
|
522
537
|
/**
|
|
523
538
|
* Disallow named usage of default import and export.
|
|
524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-named-default.md
|
|
525
540
|
*/
|
|
526
541
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
527
542
|
/**
|
|
528
543
|
* Disallow negated array predicate calls.
|
|
529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-array-predicate.md
|
|
530
545
|
*/
|
|
531
546
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>
|
|
532
547
|
/**
|
|
533
548
|
* Disallow negated comparisons.
|
|
534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-comparison.md
|
|
535
550
|
*/
|
|
536
551
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>
|
|
537
552
|
/**
|
|
538
553
|
* Disallow negated conditions.
|
|
539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-condition.md
|
|
540
555
|
*/
|
|
541
556
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
542
557
|
/**
|
|
543
558
|
* Disallow negated expression in equality check.
|
|
544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negation-in-equality-check.md
|
|
545
560
|
*/
|
|
546
561
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
547
562
|
/**
|
|
548
563
|
* Disallow nested ternary expressions.
|
|
549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nested-ternary.md
|
|
550
565
|
*/
|
|
551
566
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
552
567
|
/**
|
|
553
568
|
* Disallow `new Array()`.
|
|
554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-array.md
|
|
555
570
|
*/
|
|
556
571
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
557
572
|
/**
|
|
558
573
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-buffer.md
|
|
560
575
|
*/
|
|
561
576
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
562
577
|
/**
|
|
563
578
|
* Disallow non-function values with function-style verb prefixes.
|
|
564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
565
580
|
*/
|
|
566
581
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>
|
|
567
582
|
/**
|
|
568
583
|
* Disallow non-standard properties on built-in objects.
|
|
569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
570
585
|
*/
|
|
571
586
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>
|
|
572
587
|
/**
|
|
573
588
|
* Disallow the use of the `null` literal.
|
|
574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-null.md
|
|
575
590
|
*/
|
|
576
591
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
577
592
|
/**
|
|
578
593
|
* Disallow the use of objects as default parameters.
|
|
579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-as-default-parameter.md
|
|
580
595
|
*/
|
|
581
596
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
582
597
|
/**
|
|
583
598
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-methods-with-collections.md
|
|
585
600
|
*/
|
|
586
601
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>
|
|
587
602
|
/**
|
|
588
603
|
* Disallow optional chaining on undeclared variables.
|
|
589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
590
605
|
*/
|
|
591
606
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>
|
|
592
607
|
/**
|
|
593
608
|
* Disallow `process.exit()`.
|
|
594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-process-exit.md
|
|
595
610
|
*/
|
|
596
611
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
597
612
|
/**
|
|
598
613
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-redundant-comparison.md
|
|
600
615
|
*/
|
|
601
616
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>
|
|
602
617
|
/**
|
|
603
618
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-return-array-push.md
|
|
605
620
|
*/
|
|
606
621
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>
|
|
607
622
|
/**
|
|
608
623
|
* Disallow selector syntax in DOM names.
|
|
609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-selector-as-dom-name.md
|
|
610
625
|
*/
|
|
611
626
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>
|
|
612
627
|
/**
|
|
613
628
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
615
630
|
*/
|
|
616
631
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
617
632
|
/**
|
|
618
633
|
* Disallow classes that only have static members.
|
|
619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-static-only-class.md
|
|
620
635
|
*/
|
|
621
636
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
622
637
|
/**
|
|
623
638
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-subtraction-comparison.md
|
|
625
640
|
*/
|
|
626
641
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>
|
|
627
642
|
/**
|
|
628
643
|
* Disallow `then` property.
|
|
629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-thenable.md
|
|
630
645
|
*/
|
|
631
646
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
632
647
|
/**
|
|
633
648
|
* Disallow assigning `this` to a variable.
|
|
634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-assignment.md
|
|
635
650
|
*/
|
|
636
651
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
637
652
|
/**
|
|
638
653
|
* Disallow `this` outside of classes.
|
|
639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-outside-of-class.md
|
|
640
655
|
*/
|
|
641
656
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>
|
|
642
657
|
/**
|
|
643
658
|
* Disallow assigning to top-level variables from inside functions.
|
|
644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
645
660
|
*/
|
|
646
661
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>
|
|
647
662
|
/**
|
|
648
663
|
* Disallow top-level side effects in exported modules.
|
|
649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-side-effects.md
|
|
650
665
|
*/
|
|
651
666
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>
|
|
652
667
|
/**
|
|
653
668
|
* Disallow comparing `undefined` using `typeof`.
|
|
654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-typeof-undefined.md
|
|
655
670
|
*/
|
|
656
671
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
657
672
|
/**
|
|
658
673
|
* Disallow referencing methods without calling them.
|
|
659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-uncalled-method.md
|
|
660
675
|
*/
|
|
661
676
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>
|
|
662
677
|
/**
|
|
663
678
|
* Require class members to be declared.
|
|
664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-undeclared-class-members.md
|
|
665
680
|
*/
|
|
666
681
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>
|
|
667
682
|
/**
|
|
668
683
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
670
685
|
*/
|
|
671
686
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
672
687
|
/**
|
|
673
688
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
675
690
|
*/
|
|
676
691
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
677
692
|
/**
|
|
678
693
|
* Disallow awaiting non-promise values.
|
|
679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-await.md
|
|
680
695
|
*/
|
|
681
696
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
682
697
|
/**
|
|
683
698
|
* Disallow unnecessary comparisons against boolean literals.
|
|
684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
685
700
|
*/
|
|
686
701
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>
|
|
687
702
|
/**
|
|
688
703
|
* Disallow unnecessary `globalThis` references.
|
|
689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-global-this.md
|
|
690
705
|
*/
|
|
691
706
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>
|
|
692
707
|
/**
|
|
693
708
|
* Disallow unnecessary nested ternary expressions.
|
|
694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
695
710
|
*/
|
|
696
711
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>
|
|
697
712
|
/**
|
|
698
713
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
700
715
|
*/
|
|
701
716
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
702
717
|
/**
|
|
703
718
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
705
720
|
*/
|
|
706
721
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
707
722
|
/**
|
|
708
723
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-splice.md
|
|
710
725
|
*/
|
|
711
726
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>
|
|
712
727
|
/**
|
|
713
728
|
* Disallow unreadable array destructuring.
|
|
714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
715
730
|
*/
|
|
716
731
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>
|
|
717
732
|
/**
|
|
718
733
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
720
735
|
*/
|
|
721
736
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>
|
|
722
737
|
/**
|
|
723
738
|
* Disallow unreadable IIFEs.
|
|
724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-iife.md
|
|
725
740
|
*/
|
|
726
741
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
727
742
|
/**
|
|
728
743
|
* Disallow unreadable `new` expressions.
|
|
729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-new-expression.md
|
|
730
745
|
*/
|
|
731
746
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>
|
|
732
747
|
/**
|
|
733
748
|
* Disallow unreadable object destructuring.
|
|
734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
735
750
|
*/
|
|
736
751
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>
|
|
737
752
|
/**
|
|
738
753
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
740
755
|
*/
|
|
741
756
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>
|
|
742
757
|
/**
|
|
743
758
|
* Disallow unsafe DOM HTML APIs.
|
|
744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-dom-html.md
|
|
745
760
|
*/
|
|
746
761
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>
|
|
747
762
|
/**
|
|
748
763
|
* Disallow unsafe values as property keys.
|
|
749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-property-key.md
|
|
750
765
|
*/
|
|
751
766
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>
|
|
752
767
|
/**
|
|
753
768
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
755
770
|
*/
|
|
756
771
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>
|
|
757
772
|
/**
|
|
758
773
|
* Disallow ignoring the return value of selected array methods.
|
|
759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-array-method-return.md
|
|
760
775
|
*/
|
|
761
776
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>
|
|
762
777
|
/**
|
|
763
778
|
* Disallow unused object properties.
|
|
764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-properties.md
|
|
765
780
|
*/
|
|
766
781
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
767
782
|
/**
|
|
768
783
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-boolean-cast.md
|
|
770
785
|
*/
|
|
771
786
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>
|
|
772
787
|
/**
|
|
773
788
|
* Disallow useless type coercions of values that are already of the target type.
|
|
774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-coercion.md
|
|
775
790
|
*/
|
|
776
791
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>
|
|
777
792
|
/**
|
|
778
793
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-collection-argument.md
|
|
780
795
|
*/
|
|
781
796
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
|
|
782
797
|
/**
|
|
783
798
|
* Disallow useless compound assignments such as `x += 0`.
|
|
784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-compound-assignment.md
|
|
785
800
|
*/
|
|
786
801
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>
|
|
787
802
|
/**
|
|
788
803
|
* Disallow useless concatenation of literals.
|
|
789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-concat.md
|
|
790
805
|
*/
|
|
791
806
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>
|
|
792
807
|
/**
|
|
793
808
|
* Disallow useless `continue` statements.
|
|
794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-continue.md
|
|
795
810
|
*/
|
|
796
811
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>
|
|
797
812
|
/**
|
|
798
813
|
* Disallow unnecessary existence checks before deletion.
|
|
799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-delete-check.md
|
|
800
815
|
*/
|
|
801
816
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>
|
|
802
817
|
/**
|
|
803
818
|
* Disallow `else` after a statement that exits.
|
|
804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-else.md
|
|
805
820
|
*/
|
|
806
821
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>
|
|
807
822
|
/**
|
|
808
823
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
810
825
|
*/
|
|
811
826
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
812
827
|
/**
|
|
813
828
|
* Disallow useless fallback when spreading in object literals.
|
|
814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
815
830
|
*/
|
|
816
831
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
817
832
|
/**
|
|
818
833
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
820
835
|
*/
|
|
821
836
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>
|
|
822
837
|
/**
|
|
823
838
|
* Disallow useless array length check.
|
|
824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-length-check.md
|
|
825
840
|
*/
|
|
826
841
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
827
842
|
/**
|
|
828
843
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-logical-operand.md
|
|
830
845
|
*/
|
|
831
846
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>
|
|
832
847
|
/**
|
|
833
848
|
* Disallow useless overrides of class methods.
|
|
834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-override.md
|
|
835
850
|
*/
|
|
836
851
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>
|
|
837
852
|
/**
|
|
838
853
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
840
855
|
*/
|
|
841
856
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
842
857
|
/**
|
|
843
858
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-recursion.md
|
|
845
860
|
*/
|
|
846
861
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>
|
|
847
862
|
/**
|
|
848
863
|
* Disallow unnecessary spread.
|
|
849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-spread.md
|
|
850
865
|
*/
|
|
851
866
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
852
867
|
/**
|
|
853
868
|
* Disallow useless case in switch statements.
|
|
854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-switch-case.md
|
|
855
870
|
*/
|
|
856
871
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
857
872
|
/**
|
|
858
873
|
* Disallow useless template literal expressions.
|
|
859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-template-literals.md
|
|
860
875
|
*/
|
|
861
876
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>
|
|
862
877
|
/**
|
|
863
878
|
* Disallow useless `undefined`.
|
|
864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-undefined.md
|
|
865
880
|
*/
|
|
866
881
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
867
882
|
/**
|
|
868
883
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
870
885
|
*/
|
|
871
886
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>
|
|
872
887
|
/**
|
|
873
888
|
* Disallow number literals with zero fractions or dangling dots.
|
|
874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-zero-fractions.md
|
|
875
890
|
*/
|
|
876
891
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
877
892
|
/**
|
|
878
893
|
* Enforce proper case for numeric literals.
|
|
879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/number-literal-case.md
|
|
880
895
|
*/
|
|
881
896
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
882
897
|
/**
|
|
883
898
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/numeric-separators-style.md
|
|
885
900
|
*/
|
|
886
901
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
887
902
|
/**
|
|
888
903
|
* Require assignment operator shorthand where possible.
|
|
889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/operator-assignment.md
|
|
890
905
|
*/
|
|
891
906
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>
|
|
907
|
+
/**
|
|
908
|
+
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
910
|
+
*/
|
|
911
|
+
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>
|
|
892
912
|
/**
|
|
893
913
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener.md
|
|
895
915
|
*/
|
|
896
916
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
897
917
|
/**
|
|
898
918
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
900
920
|
*/
|
|
901
921
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>
|
|
922
|
+
/**
|
|
923
|
+
* Prefer `AggregateError` when throwing collected errors.
|
|
924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-aggregate-error.md
|
|
925
|
+
*/
|
|
926
|
+
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>
|
|
902
927
|
/**
|
|
903
928
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-find.md
|
|
905
930
|
*/
|
|
906
931
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
907
932
|
/**
|
|
908
933
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat.md
|
|
910
935
|
*/
|
|
911
936
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
912
937
|
/**
|
|
913
938
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat-map.md
|
|
915
940
|
*/
|
|
916
941
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
917
942
|
/**
|
|
918
943
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-async.md
|
|
920
945
|
*/
|
|
921
946
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>
|
|
922
947
|
/**
|
|
923
948
|
* Prefer using the `Array.from()` mapping function argument.
|
|
924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-map.md
|
|
925
950
|
*/
|
|
926
951
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>
|
|
927
952
|
/**
|
|
928
953
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-index-of.md
|
|
930
955
|
*/
|
|
931
956
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
932
957
|
/**
|
|
933
958
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
935
960
|
*/
|
|
936
961
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>
|
|
937
962
|
/**
|
|
938
963
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-last-methods.md
|
|
940
965
|
*/
|
|
941
966
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>
|
|
942
967
|
/**
|
|
943
968
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-slice.md
|
|
945
970
|
*/
|
|
946
971
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>
|
|
947
972
|
/**
|
|
948
973
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-some.md
|
|
950
975
|
*/
|
|
951
976
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
952
977
|
/**
|
|
953
978
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-at.md
|
|
955
980
|
*/
|
|
956
981
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
957
982
|
/**
|
|
958
983
|
* Prefer `await` over promise chaining.
|
|
959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-await.md
|
|
960
985
|
*/
|
|
961
986
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>
|
|
962
987
|
/**
|
|
963
988
|
* Prefer `BigInt` literals over the constructor.
|
|
964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-bigint-literals.md
|
|
965
990
|
*/
|
|
966
991
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
967
992
|
/**
|
|
968
993
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
970
995
|
*/
|
|
971
996
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
972
997
|
/**
|
|
973
998
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-boolean-return.md
|
|
975
1000
|
*/
|
|
976
1001
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>
|
|
977
1002
|
/**
|
|
978
1003
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-class-fields.md
|
|
980
1005
|
*/
|
|
981
1006
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
982
1007
|
/**
|
|
983
1008
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-classlist-toggle.md
|
|
985
1010
|
*/
|
|
986
1011
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
987
1012
|
/**
|
|
988
1013
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-code-point.md
|
|
990
1015
|
*/
|
|
991
1016
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
992
1017
|
/**
|
|
993
1018
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-continue.md
|
|
995
1020
|
*/
|
|
996
1021
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>
|
|
997
1022
|
/**
|
|
998
1023
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-date-now.md
|
|
1000
1025
|
*/
|
|
1001
1026
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
1002
1027
|
/**
|
|
1003
1028
|
* Prefer default parameters over reassignment.
|
|
1004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-default-parameters.md
|
|
1005
1030
|
*/
|
|
1006
1031
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
1007
1032
|
/**
|
|
1008
1033
|
* Prefer direct iteration over default iterator method calls.
|
|
1009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-direct-iteration.md
|
|
1010
1035
|
*/
|
|
1011
1036
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>
|
|
1012
1037
|
/**
|
|
1013
1038
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
1014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dispose.md
|
|
1015
1040
|
*/
|
|
1016
1041
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>
|
|
1017
1042
|
/**
|
|
1018
1043
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
1019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-append.md
|
|
1020
1045
|
*/
|
|
1021
1046
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
1022
1047
|
/**
|
|
1023
1048
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
1024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
1025
1050
|
* @deprecated
|
|
1026
1051
|
*/
|
|
1027
1052
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
1028
1053
|
/**
|
|
1029
1054
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
1030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
1031
1056
|
*/
|
|
1032
1057
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>
|
|
1033
1058
|
/**
|
|
1034
1059
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
1035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-remove.md
|
|
1036
1061
|
*/
|
|
1037
1062
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
1063
|
+
/**
|
|
1064
|
+
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
1065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
1066
|
+
*/
|
|
1067
|
+
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>
|
|
1038
1068
|
/**
|
|
1039
1069
|
* Prefer `.textContent` over `.innerText`.
|
|
1040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
1041
1071
|
*/
|
|
1042
1072
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
1043
1073
|
/**
|
|
1044
1074
|
* Prefer early returns over full-function conditional wrapping.
|
|
1045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-early-return.md
|
|
1046
1076
|
*/
|
|
1047
1077
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>
|
|
1048
1078
|
/**
|
|
1049
1079
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
1050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-else-if.md
|
|
1051
1081
|
*/
|
|
1052
1082
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>
|
|
1083
|
+
/**
|
|
1084
|
+
* Prefer `Error.isError()` when checking for errors.
|
|
1085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-error-is-error.md
|
|
1086
|
+
*/
|
|
1087
|
+
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>
|
|
1053
1088
|
/**
|
|
1054
1089
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
1055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-event-target.md
|
|
1056
1091
|
*/
|
|
1057
1092
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
1058
1093
|
/**
|
|
1059
1094
|
* Prefer `export…from` when re-exporting.
|
|
1060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-export-from.md
|
|
1061
1096
|
*/
|
|
1062
1097
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
1063
1098
|
/**
|
|
1064
1099
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
1065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
1066
1101
|
*/
|
|
1067
1102
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>
|
|
1068
1103
|
/**
|
|
1069
1104
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
1070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
1071
1106
|
*/
|
|
1072
1107
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>
|
|
1073
1108
|
/**
|
|
1074
1109
|
* Prefer global numeric constants over `Number` static properties.
|
|
1075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-number-constants.md
|
|
1076
1111
|
*/
|
|
1077
1112
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>
|
|
1078
1113
|
/**
|
|
1079
1114
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
1080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-this.md
|
|
1081
1116
|
*/
|
|
1082
1117
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
1083
1118
|
/**
|
|
1084
1119
|
* Prefer `.has()` when checking existence.
|
|
1085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-has-check.md
|
|
1086
1121
|
*/
|
|
1087
1122
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>
|
|
1088
1123
|
/**
|
|
1089
1124
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
1090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
1091
1126
|
*/
|
|
1092
1127
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>
|
|
1093
1128
|
/**
|
|
1094
1129
|
* Prefer HTTPS over HTTP.
|
|
1095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-https.md
|
|
1096
1131
|
*/
|
|
1097
1132
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>
|
|
1098
1133
|
/**
|
|
1099
1134
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
1100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
1101
1136
|
*/
|
|
1102
1137
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>
|
|
1103
1138
|
/**
|
|
1104
1139
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
1105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-import-meta-properties.md
|
|
1106
1141
|
*/
|
|
1107
1142
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
1108
1143
|
/**
|
|
1109
1144
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
1110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes.md
|
|
1111
1146
|
*/
|
|
1112
1147
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
1113
1148
|
/**
|
|
1114
1149
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
1115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
1116
1151
|
*/
|
|
1117
1152
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>
|
|
1118
1153
|
/**
|
|
1119
1154
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
1120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
1121
1156
|
*/
|
|
1122
1157
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>
|
|
1123
1158
|
/**
|
|
1124
1159
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
1125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-concat.md
|
|
1126
1161
|
*/
|
|
1127
1162
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>
|
|
1128
1163
|
/**
|
|
1129
1164
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
1130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array.md
|
|
1131
1166
|
*/
|
|
1132
1167
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>
|
|
1133
1168
|
/**
|
|
1134
1169
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
1135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
1136
1171
|
*/
|
|
1137
1172
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>
|
|
1138
1173
|
/**
|
|
1139
1174
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
1140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
1141
1176
|
* @deprecated
|
|
1142
1177
|
*/
|
|
1143
1178
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
1144
1179
|
/**
|
|
1145
1180
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
1146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
1147
1182
|
*/
|
|
1148
1183
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
1149
1184
|
/**
|
|
1150
1185
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
1151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-location-assign.md
|
|
1152
1187
|
*/
|
|
1153
1188
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>
|
|
1154
1189
|
/**
|
|
1155
1190
|
* Prefer using a logical operator over a ternary.
|
|
1156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
1157
1192
|
*/
|
|
1158
1193
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
1159
1194
|
/**
|
|
1160
1195
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
1161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-map-from-entries.md
|
|
1162
1197
|
*/
|
|
1163
1198
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>
|
|
1164
1199
|
/**
|
|
1165
1200
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
1166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-abs.md
|
|
1167
1202
|
*/
|
|
1168
1203
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>
|
|
1169
1204
|
/**
|
|
1170
1205
|
* Prefer `Math` constants over their approximate numeric values.
|
|
1171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-constants.md
|
|
1172
1207
|
*/
|
|
1173
1208
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>
|
|
1174
1209
|
/**
|
|
1175
1210
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
1176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-min-max.md
|
|
1177
1212
|
*/
|
|
1178
1213
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
1179
1214
|
/**
|
|
1180
1215
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
1181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-trunc.md
|
|
1182
1217
|
*/
|
|
1183
1218
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
1184
1219
|
/**
|
|
1185
1220
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
1186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-minimal-ternary.md
|
|
1187
1222
|
*/
|
|
1188
1223
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>
|
|
1189
1224
|
/**
|
|
1190
1225
|
* Prefer modern DOM APIs.
|
|
1191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
1192
1227
|
*/
|
|
1193
1228
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
1194
1229
|
/**
|
|
1195
1230
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
1196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-math-apis.md
|
|
1197
1232
|
*/
|
|
1198
1233
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
1199
1234
|
/**
|
|
1200
1235
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
1201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-module.md
|
|
1202
1237
|
*/
|
|
1203
1238
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
1204
1239
|
/**
|
|
1205
1240
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
1206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
1207
1242
|
*/
|
|
1208
1243
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
1209
1244
|
/**
|
|
1210
1245
|
* Prefer negative index over `.length - index` when possible.
|
|
1211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-negative-index.md
|
|
1212
1247
|
*/
|
|
1213
1248
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
1214
1249
|
/**
|
|
1215
1250
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
1216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-node-protocol.md
|
|
1217
1252
|
*/
|
|
1218
1253
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
1219
1254
|
/**
|
|
1220
1255
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
1221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-coercion.md
|
|
1222
1257
|
*/
|
|
1223
1258
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>
|
|
1224
1259
|
/**
|
|
1225
1260
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
1226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
1227
1262
|
*/
|
|
1228
1263
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>
|
|
1229
1264
|
/**
|
|
1230
1265
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
1231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-properties.md
|
|
1232
1267
|
*/
|
|
1233
1268
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
1234
1269
|
/**
|
|
1235
1270
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
1236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-define-properties.md
|
|
1237
1272
|
*/
|
|
1238
1273
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>
|
|
1239
1274
|
/**
|
|
1240
1275
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
1241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
1242
1277
|
*/
|
|
1243
1278
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>
|
|
1244
1279
|
/**
|
|
1245
1280
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
1246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-from-entries.md
|
|
1247
1282
|
*/
|
|
1248
1283
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
1249
1284
|
/**
|
|
1250
1285
|
* Prefer the most specific `Object` iterable method.
|
|
1251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
1252
1287
|
*/
|
|
1253
1288
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>
|
|
1289
|
+
/**
|
|
1290
|
+
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
1291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-observer-apis.md
|
|
1292
|
+
*/
|
|
1293
|
+
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>
|
|
1254
1294
|
/**
|
|
1255
1295
|
* Prefer omitting the `catch` binding parameter.
|
|
1256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
1257
1297
|
*/
|
|
1258
1298
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
1259
1299
|
/**
|
|
1260
1300
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
1261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-path2d.md
|
|
1262
1302
|
*/
|
|
1263
1303
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>
|
|
1264
1304
|
/**
|
|
1265
1305
|
* Prefer private class fields over the underscore-prefix convention.
|
|
1266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-private-class-fields.md
|
|
1267
1307
|
*/
|
|
1268
1308
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>
|
|
1309
|
+
/**
|
|
1310
|
+
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
1311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-try.md
|
|
1312
|
+
*/
|
|
1313
|
+
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>
|
|
1269
1314
|
/**
|
|
1270
1315
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
1271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
1272
1317
|
*/
|
|
1273
1318
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>
|
|
1274
1319
|
/**
|
|
1275
1320
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
1276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-prototype-methods.md
|
|
1277
1322
|
*/
|
|
1278
1323
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
1279
1324
|
/**
|
|
1280
1325
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
1281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-query-selector.md
|
|
1282
1327
|
*/
|
|
1283
1328
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>
|
|
1284
1329
|
/**
|
|
1285
1330
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
1286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-queue-microtask.md
|
|
1287
1332
|
*/
|
|
1288
1333
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>
|
|
1289
1334
|
/**
|
|
1290
1335
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
1291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-reflect-apply.md
|
|
1292
1337
|
*/
|
|
1293
1338
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
1294
1339
|
/**
|
|
1295
1340
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
1296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-escape.md
|
|
1297
1342
|
*/
|
|
1298
1343
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>
|
|
1299
1344
|
/**
|
|
1300
1345
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
1301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-test.md
|
|
1302
1347
|
*/
|
|
1303
1348
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
1304
1349
|
/**
|
|
1305
1350
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
1306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-response-static-json.md
|
|
1307
1352
|
*/
|
|
1308
1353
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
|
|
1309
1354
|
/**
|
|
1310
1355
|
* Prefer `:scope` when using element query selector methods.
|
|
1311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-scoped-selector.md
|
|
1312
1357
|
*/
|
|
1313
1358
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>
|
|
1314
1359
|
/**
|
|
1315
1360
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
1316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-has.md
|
|
1317
1362
|
*/
|
|
1318
1363
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>
|
|
1364
|
+
/**
|
|
1365
|
+
* Prefer `Set` methods for Set operations.
|
|
1366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-methods.md
|
|
1367
|
+
*/
|
|
1368
|
+
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>
|
|
1319
1369
|
/**
|
|
1320
1370
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
1321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-size.md
|
|
1322
1372
|
*/
|
|
1323
1373
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
1324
1374
|
/**
|
|
1325
1375
|
* Prefer arrow function properties over methods with a single return.
|
|
1326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-short-arrow-method.md
|
|
1327
1377
|
*/
|
|
1328
1378
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>
|
|
1329
1379
|
/**
|
|
1330
1380
|
* Prefer simple conditions first in logical expressions.
|
|
1331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-condition-first.md
|
|
1332
1382
|
*/
|
|
1333
1383
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>
|
|
1334
1384
|
/**
|
|
1335
1385
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
1336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
1337
1387
|
*/
|
|
1338
1388
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>
|
|
1339
1389
|
/**
|
|
1340
1390
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
1341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-array-predicate.md
|
|
1342
1392
|
*/
|
|
1343
1393
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>
|
|
1344
1394
|
/**
|
|
1345
1395
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
1346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-call.md
|
|
1347
1397
|
*/
|
|
1348
1398
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
1349
1399
|
/**
|
|
1350
1400
|
* Prefer a single object destructuring declaration per local const source.
|
|
1351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
1352
1402
|
*/
|
|
1353
1403
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>
|
|
1354
1404
|
/**
|
|
1355
1405
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
1356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-replace.md
|
|
1357
1407
|
*/
|
|
1358
1408
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>
|
|
1359
1409
|
/**
|
|
1360
1410
|
* Prefer declaring variables in the smallest possible scope.
|
|
1361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-smaller-scope.md
|
|
1362
1412
|
*/
|
|
1363
1413
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>
|
|
1364
1414
|
/**
|
|
1365
1415
|
* Prefer `String#split()` with a limit.
|
|
1366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-split-limit.md
|
|
1367
1417
|
*/
|
|
1368
1418
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>
|
|
1369
1419
|
/**
|
|
1370
1420
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
1371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-spread.md
|
|
1372
1422
|
*/
|
|
1373
1423
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
1374
1424
|
/**
|
|
1375
1425
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
1376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-match-all.md
|
|
1377
1427
|
*/
|
|
1378
1428
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>
|
|
1379
1429
|
/**
|
|
1380
1430
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
1381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
1382
1432
|
*/
|
|
1383
1433
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>
|
|
1384
1434
|
/**
|
|
1385
1435
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
1386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-raw.md
|
|
1387
1437
|
*/
|
|
1388
1438
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
1389
1439
|
/**
|
|
1390
1440
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
1391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-repeat.md
|
|
1392
1442
|
*/
|
|
1393
1443
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>
|
|
1394
1444
|
/**
|
|
1395
1445
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
1396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-replace-all.md
|
|
1397
1447
|
*/
|
|
1398
1448
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
1399
1449
|
/**
|
|
1400
1450
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
1401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-slice.md
|
|
1402
1452
|
*/
|
|
1403
1453
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
1404
1454
|
/**
|
|
1405
1455
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
1406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
1407
1457
|
*/
|
|
1408
1458
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
1409
1459
|
/**
|
|
1410
1460
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
1411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
1412
1462
|
*/
|
|
1413
1463
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
1414
1464
|
/**
|
|
1415
1465
|
* Prefer using `structuredClone` to create a deep clone.
|
|
1416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-structured-clone.md
|
|
1417
1467
|
*/
|
|
1418
1468
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
1419
1469
|
/**
|
|
1420
1470
|
* Prefer `switch` over multiple `else-if`.
|
|
1421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-switch.md
|
|
1422
1472
|
*/
|
|
1423
1473
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
1424
1474
|
/**
|
|
1425
1475
|
* Prefer `Temporal` over `Date`.
|
|
1426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-temporal.md
|
|
1427
1477
|
*/
|
|
1428
1478
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>
|
|
1429
1479
|
/**
|
|
1430
1480
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
1431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-ternary.md
|
|
1432
1482
|
*/
|
|
1433
1483
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
1484
|
+
/**
|
|
1485
|
+
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
1486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-toggle-attribute.md
|
|
1487
|
+
*/
|
|
1488
|
+
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>
|
|
1434
1489
|
/**
|
|
1435
1490
|
* Prefer top-level await over top-level promises and async function calls.
|
|
1436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-top-level-await.md
|
|
1437
1492
|
*/
|
|
1438
1493
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
1439
1494
|
/**
|
|
1440
1495
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
1441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-error.md
|
|
1442
1497
|
*/
|
|
1443
1498
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
1444
1499
|
/**
|
|
1445
1500
|
* Require type literals to be last in union types.
|
|
1446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-literal-last.md
|
|
1447
1502
|
*/
|
|
1448
1503
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>
|
|
1449
1504
|
/**
|
|
1450
1505
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
1451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-uint8array-base64.md
|
|
1452
1507
|
*/
|
|
1453
1508
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>
|
|
1454
1509
|
/**
|
|
1455
1510
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
1456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unary-minus.md
|
|
1457
1512
|
*/
|
|
1458
1513
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>
|
|
1459
1514
|
/**
|
|
1460
1515
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
1461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
1462
1517
|
*/
|
|
1463
1518
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>
|
|
1464
1519
|
/**
|
|
1465
1520
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
1466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-can-parse.md
|
|
1467
1522
|
*/
|
|
1468
1523
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>
|
|
1469
1524
|
/**
|
|
1470
1525
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
1471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-href.md
|
|
1472
1527
|
*/
|
|
1473
1528
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>
|
|
1529
|
+
/**
|
|
1530
|
+
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
1531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-search-parameters.md
|
|
1532
|
+
*/
|
|
1533
|
+
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>
|
|
1474
1534
|
/**
|
|
1475
1535
|
* Prefer putting the condition in the while statement.
|
|
1476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-while-loop-condition.md
|
|
1477
1537
|
*/
|
|
1478
1538
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>
|
|
1479
1539
|
/**
|
|
1480
1540
|
* Renamed to `unicorn/name-replacements`.
|
|
1481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
1482
1542
|
* @deprecated
|
|
1483
1543
|
*/
|
|
1484
1544
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>
|
|
1485
1545
|
/**
|
|
1486
1546
|
* Enforce consistent relative URL style.
|
|
1487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/relative-url-style.md
|
|
1488
1548
|
*/
|
|
1489
1549
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
1490
1550
|
/**
|
|
1491
1551
|
* Enforce using the separator argument with `Array#join()`.
|
|
1492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-join-separator.md
|
|
1493
1553
|
*/
|
|
1494
1554
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
1495
1555
|
/**
|
|
1496
1556
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
1497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-sort-compare.md
|
|
1498
1558
|
*/
|
|
1499
1559
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>
|
|
1500
1560
|
/**
|
|
1501
1561
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
1502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-css-escape.md
|
|
1503
1563
|
*/
|
|
1504
1564
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>
|
|
1505
1565
|
/**
|
|
1506
1566
|
* Require non-empty module attributes for imports and exports
|
|
1507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-attributes.md
|
|
1508
1568
|
*/
|
|
1509
1569
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
1510
1570
|
/**
|
|
1511
1571
|
* Require non-empty specifier list in import and export statements.
|
|
1512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-specifiers.md
|
|
1513
1573
|
*/
|
|
1514
1574
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
1515
1575
|
/**
|
|
1516
1576
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
1517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
1518
1578
|
*/
|
|
1519
1579
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
1520
1580
|
/**
|
|
1521
1581
|
* Require passive event listeners for high-frequency events.
|
|
1522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-passive-events.md
|
|
1523
1583
|
*/
|
|
1524
1584
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>
|
|
1525
1585
|
/**
|
|
1526
1586
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
1527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-post-message-target-origin.md
|
|
1528
1588
|
*/
|
|
1529
1589
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
1530
1590
|
/**
|
|
1531
1591
|
* Require boolean-returning Proxy traps to return booleans.
|
|
1532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
1533
1593
|
*/
|
|
1534
1594
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>
|
|
1535
1595
|
/**
|
|
1536
1596
|
* Enforce better string content.
|
|
1537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/string-content.md
|
|
1538
1598
|
*/
|
|
1539
1599
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
1540
1600
|
/**
|
|
1541
1601
|
* Enforce consistent brace style for `case` clauses.
|
|
1542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-braces.md
|
|
1543
1603
|
*/
|
|
1544
1604
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
1545
1605
|
/**
|
|
1546
1606
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
1547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-break-position.md
|
|
1548
1608
|
*/
|
|
1549
1609
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>
|
|
1550
1610
|
/**
|
|
1551
1611
|
* Fix whitespace-insensitive template indentation.
|
|
1552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/template-indent.md
|
|
1553
1613
|
*/
|
|
1554
1614
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
1555
1615
|
/**
|
|
1556
1616
|
* Enforce consistent case for text encoding identifiers.
|
|
1557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/text-encoding-identifier-case.md
|
|
1558
1618
|
*/
|
|
1559
1619
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
|
|
1560
1620
|
/**
|
|
1561
1621
|
* Require `new` when creating an error.
|
|
1562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/throw-new-error.md
|
|
1563
1623
|
*/
|
|
1564
1624
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
1565
1625
|
/**
|
|
1566
1626
|
* Limit the complexity of `try` blocks.
|
|
1567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
1627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/try-complexity.md
|
|
1568
1628
|
*/
|
|
1569
1629
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>
|
|
1570
1630
|
}
|
|
@@ -1607,6 +1667,8 @@ type UnicornConsistentBooleanName = []|[{
|
|
|
1607
1667
|
|
|
1608
1668
|
[k: string]: boolean | undefined
|
|
1609
1669
|
}
|
|
1670
|
+
|
|
1671
|
+
ignore?: unknown[]
|
|
1610
1672
|
}]
|
|
1611
1673
|
// ----- unicorn/consistent-class-member-order -----
|
|
1612
1674
|
type UnicornConsistentClassMemberOrder = []|[{
|
|
@@ -1983,6 +2045,8 @@ type UnicornPreferIncludesOverRepeatedComparisons = []|[{
|
|
|
1983
2045
|
// ----- unicorn/prefer-minimal-ternary -----
|
|
1984
2046
|
type UnicornPreferMinimalTernary = []|[{
|
|
1985
2047
|
|
|
2048
|
+
checkVaryingCallee?: boolean
|
|
2049
|
+
|
|
1986
2050
|
checkComputedMemberAccess?: boolean
|
|
1987
2051
|
}]
|
|
1988
2052
|
// ----- unicorn/prefer-number-properties -----
|