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