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