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