@shayanthenerd/eslint-config 0.26.7 → 0.26.8
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/types/eslint-schema.d.mts +332 -332
- package/package.json +3 -3
|
@@ -6177,1670 +6177,1670 @@ interface ESLintSchema {
|
|
|
6177
6177
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6178
6178
|
/**
|
|
6179
6179
|
* Prefer better DOM traversal APIs.
|
|
6180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/better-dom-traversing.md
|
|
6181
6181
|
*/
|
|
6182
6182
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6183
6183
|
/**
|
|
6184
6184
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6186
6186
|
* @deprecated
|
|
6187
6187
|
*/
|
|
6188
6188
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6189
6189
|
/**
|
|
6190
6190
|
* Enforce a specific parameter name in catch clauses.
|
|
6191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/catch-error-name.md
|
|
6192
6192
|
*/
|
|
6193
6193
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6194
6194
|
/**
|
|
6195
6195
|
* Enforce consistent class references in static methods.
|
|
6196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6197
6197
|
*/
|
|
6198
6198
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6199
6199
|
/**
|
|
6200
6200
|
* Enforce better comment content.
|
|
6201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/comment-content.md
|
|
6202
6202
|
*/
|
|
6203
6203
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6204
6204
|
/**
|
|
6205
6205
|
* Enforce consistent assertion style with `node:assert`.
|
|
6206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-assert.md
|
|
6207
6207
|
*/
|
|
6208
6208
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6209
6209
|
/**
|
|
6210
6210
|
* Enforce consistent naming for boolean names.
|
|
6211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-boolean-name.md
|
|
6212
6212
|
*/
|
|
6213
6213
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6214
6214
|
/**
|
|
6215
6215
|
* Enforce consistent class member order.
|
|
6216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-class-member-order.md
|
|
6217
6217
|
*/
|
|
6218
6218
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6219
6219
|
/**
|
|
6220
6220
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-compound-words.md
|
|
6222
6222
|
*/
|
|
6223
6223
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6224
6224
|
/**
|
|
6225
6225
|
* Enforce consistent conditional object spread style.
|
|
6226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6227
6227
|
*/
|
|
6228
6228
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6229
6229
|
/**
|
|
6230
6230
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-date-clone.md
|
|
6232
6232
|
*/
|
|
6233
6233
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6234
6234
|
/**
|
|
6235
6235
|
* Use destructured variables over properties.
|
|
6236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-destructuring.md
|
|
6237
6237
|
*/
|
|
6238
6238
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6239
6239
|
/**
|
|
6240
6240
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6242
6242
|
*/
|
|
6243
6243
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6244
6244
|
/**
|
|
6245
6245
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-existence-index-check.md
|
|
6247
6247
|
*/
|
|
6248
6248
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6249
6249
|
/**
|
|
6250
6250
|
* Enforce consistent decorator position on exported classes.
|
|
6251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6252
6252
|
*/
|
|
6253
6253
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6254
6254
|
/**
|
|
6255
6255
|
* Move function definitions to the highest possible scope.
|
|
6256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-function-scoping.md
|
|
6257
6257
|
*/
|
|
6258
6258
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6259
6259
|
/**
|
|
6260
6260
|
* Enforce function syntax by role.
|
|
6261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-function-style.md
|
|
6262
6262
|
*/
|
|
6263
6263
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6264
6264
|
/**
|
|
6265
6265
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-json-file-read.md
|
|
6267
6267
|
*/
|
|
6268
6268
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6269
6269
|
/**
|
|
6270
6270
|
* Enforce consistent optional chaining for same-base member access.
|
|
6271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-optional-chaining.md
|
|
6272
6272
|
*/
|
|
6273
6273
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6274
6274
|
/**
|
|
6275
6275
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6277
6277
|
*/
|
|
6278
6278
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6279
6279
|
/**
|
|
6280
6280
|
* Enforce consistent labels on tuple type elements.
|
|
6281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/consistent-tuple-labels.md
|
|
6282
6282
|
*/
|
|
6283
6283
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6284
6284
|
/**
|
|
6285
6285
|
* Enforce correct `Error` subclassing.
|
|
6286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/custom-error-definition.md
|
|
6287
6287
|
*/
|
|
6288
6288
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6289
6289
|
/**
|
|
6290
6290
|
* Enforce consistent default export declarations.
|
|
6291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/default-export-style.md
|
|
6292
6292
|
*/
|
|
6293
6293
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6294
6294
|
/**
|
|
6295
6295
|
* Enforce consistent style for DOM element dataset access.
|
|
6296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/dom-node-dataset.md
|
|
6297
6297
|
*/
|
|
6298
6298
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6299
6299
|
/**
|
|
6300
6300
|
* Enforce no spaces between braces.
|
|
6301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/empty-brace-spaces.md
|
|
6302
6302
|
*/
|
|
6303
6303
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6304
6304
|
/**
|
|
6305
6305
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/error-message.md
|
|
6307
6307
|
*/
|
|
6308
6308
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6309
6309
|
/**
|
|
6310
6310
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/escape-case.md
|
|
6312
6312
|
*/
|
|
6313
6313
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6314
6314
|
/**
|
|
6315
6315
|
* Add expiration conditions to TODO comments.
|
|
6316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/expiring-todo-comments.md
|
|
6317
6317
|
*/
|
|
6318
6318
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6319
6319
|
/**
|
|
6320
6320
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/explicit-length-check.md
|
|
6322
6322
|
*/
|
|
6323
6323
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6324
6324
|
/**
|
|
6325
6325
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/explicit-timer-delay.md
|
|
6327
6327
|
*/
|
|
6328
6328
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6329
6329
|
/**
|
|
6330
6330
|
* Enforce a case style for filenames and directory names.
|
|
6331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/filename-case.md
|
|
6332
6332
|
*/
|
|
6333
6333
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6334
6334
|
/**
|
|
6335
6335
|
* Require identifiers to match a specified regular expression.
|
|
6336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/id-match.md
|
|
6337
6337
|
*/
|
|
6338
6338
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6339
6339
|
/**
|
|
6340
6340
|
* Enforce specific import styles per module.
|
|
6341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/import-style.md
|
|
6342
6342
|
*/
|
|
6343
6343
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6344
6344
|
/**
|
|
6345
6345
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/isolated-functions.md
|
|
6347
6347
|
*/
|
|
6348
6348
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6349
6349
|
/**
|
|
6350
6350
|
* Require or disallow logical assignment operator shorthand
|
|
6351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/logical-assignment-operators.md
|
|
6352
6352
|
*/
|
|
6353
6353
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6354
6354
|
/**
|
|
6355
6355
|
* Limit the depth of nested calls.
|
|
6356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/max-nested-calls.md
|
|
6357
6357
|
*/
|
|
6358
6358
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6359
6359
|
/**
|
|
6360
6360
|
* Enforce replacements for variable, property, and filenames.
|
|
6361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/name-replacements.md
|
|
6362
6362
|
*/
|
|
6363
6363
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6364
6364
|
/**
|
|
6365
6365
|
* Enforce correct use of `new` for builtin constructors.
|
|
6366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/new-for-builtins.md
|
|
6367
6367
|
*/
|
|
6368
6368
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6369
6369
|
/**
|
|
6370
6370
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6372
6372
|
*/
|
|
6373
6373
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6374
6374
|
/**
|
|
6375
6375
|
* Disallow recursive access to `this` within getters and setters.
|
|
6376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-accessor-recursion.md
|
|
6377
6377
|
*/
|
|
6378
6378
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6379
6379
|
/**
|
|
6380
6380
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6382
6382
|
*/
|
|
6383
6383
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6384
6384
|
/**
|
|
6385
6385
|
* Disallow anonymous functions and classes as the default export.
|
|
6386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-anonymous-default-export.md
|
|
6387
6387
|
*/
|
|
6388
6388
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6389
6389
|
/**
|
|
6390
6390
|
* Prevent passing a function reference directly to iterator methods.
|
|
6391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-callback-reference.md
|
|
6392
6392
|
*/
|
|
6393
6393
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6394
6394
|
/**
|
|
6395
6395
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6397
6397
|
*/
|
|
6398
6398
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6399
6399
|
/**
|
|
6400
6400
|
* Disallow using reference values as `Array#fill()` values.
|
|
6401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6402
6402
|
*/
|
|
6403
6403
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6404
6404
|
/**
|
|
6405
6405
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-from-fill.md
|
|
6407
6407
|
*/
|
|
6408
6408
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6409
6409
|
/**
|
|
6410
6410
|
* Disallow front-of-array mutation.
|
|
6411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-front-mutation.md
|
|
6412
6412
|
*/
|
|
6413
6413
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6414
6414
|
/**
|
|
6415
6415
|
* Disallow using the `this` argument in array methods.
|
|
6416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-method-this-argument.md
|
|
6417
6417
|
*/
|
|
6418
6418
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6419
6419
|
/**
|
|
6420
6420
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6422
6422
|
* @deprecated
|
|
6423
6423
|
*/
|
|
6424
6424
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6425
6425
|
/**
|
|
6426
6426
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-reduce.md
|
|
6428
6428
|
*/
|
|
6429
6429
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6430
6430
|
/**
|
|
6431
6431
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-reverse.md
|
|
6433
6433
|
*/
|
|
6434
6434
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6435
6435
|
/**
|
|
6436
6436
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-sort.md
|
|
6438
6438
|
*/
|
|
6439
6439
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6440
6440
|
/**
|
|
6441
6441
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6443
6443
|
*/
|
|
6444
6444
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6445
6445
|
/**
|
|
6446
6446
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-array-splice.md
|
|
6448
6448
|
*/
|
|
6449
6449
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6450
6450
|
/**
|
|
6451
6451
|
* Disallow asterisk prefixes in documentation comments.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6453
6453
|
*/
|
|
6454
6454
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6455
6455
|
/**
|
|
6456
6456
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-async-promise-finally.md
|
|
6458
6458
|
*/
|
|
6459
6459
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6460
6460
|
/**
|
|
6461
6461
|
* Disallow member access from await expression.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-await-expression-member.md
|
|
6463
6463
|
*/
|
|
6464
6464
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6465
6465
|
/**
|
|
6466
6466
|
* Disallow using `await` in `Promise` method parameters.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6468
6468
|
*/
|
|
6469
6469
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6470
6470
|
/**
|
|
6471
6471
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-blob-to-file.md
|
|
6473
6473
|
*/
|
|
6474
6474
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6475
6475
|
/**
|
|
6476
6476
|
* Disallow boolean-returning sort comparators.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6478
6478
|
*/
|
|
6479
6479
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6480
6480
|
/**
|
|
6481
6481
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6483
6483
|
*/
|
|
6484
6484
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6485
6485
|
/**
|
|
6486
6486
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-canvas-to-image.md
|
|
6488
6488
|
*/
|
|
6489
6489
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6490
6490
|
/**
|
|
6491
6491
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-chained-comparison.md
|
|
6493
6493
|
*/
|
|
6494
6494
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6495
6495
|
/**
|
|
6496
6496
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-collection-bracket-access.md
|
|
6498
6498
|
*/
|
|
6499
6499
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6500
6500
|
/**
|
|
6501
6501
|
* Disallow dynamic object property existence checks.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6503
6503
|
*/
|
|
6504
6504
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6505
6505
|
/**
|
|
6506
6506
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-confusing-array-splice.md
|
|
6508
6508
|
*/
|
|
6509
6509
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6510
6510
|
/**
|
|
6511
6511
|
* Disallow confusing uses of `Array#with()`.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-confusing-array-with.md
|
|
6513
6513
|
*/
|
|
6514
6514
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6515
6515
|
/**
|
|
6516
6516
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-console-spaces.md
|
|
6518
6518
|
*/
|
|
6519
6519
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6520
6520
|
/**
|
|
6521
6521
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-constant-zero-expression.md
|
|
6523
6523
|
*/
|
|
6524
6524
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6525
6525
|
/**
|
|
6526
6526
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6528
6528
|
*/
|
|
6529
6529
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6530
6530
|
/**
|
|
6531
6531
|
* Do not use `document.cookie` directly.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-document-cookie.md
|
|
6533
6533
|
*/
|
|
6534
6534
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6535
6535
|
/**
|
|
6536
6536
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-double-comparison.md
|
|
6538
6538
|
*/
|
|
6539
6539
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6540
6540
|
/**
|
|
6541
6541
|
* Disallow duplicate adjacent branches in if chains.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6543
6543
|
*/
|
|
6544
6544
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6545
6545
|
/**
|
|
6546
6546
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6548
6548
|
*/
|
|
6549
6549
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6550
6550
|
/**
|
|
6551
6551
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-duplicate-loops.md
|
|
6553
6553
|
*/
|
|
6554
6554
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6555
6555
|
/**
|
|
6556
6556
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-duplicate-set-values.md
|
|
6558
6558
|
*/
|
|
6559
6559
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6560
6560
|
/**
|
|
6561
6561
|
* Disallow empty files.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-empty-file.md
|
|
6563
6563
|
*/
|
|
6564
6564
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6565
6565
|
/**
|
|
6566
6566
|
* Disallow assigning to built-in error properties.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-error-property-assignment.md
|
|
6568
6568
|
*/
|
|
6569
6569
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6570
6570
|
/**
|
|
6571
6571
|
* Disallow exports in scripts.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-exports-in-scripts.md
|
|
6573
6573
|
*/
|
|
6574
6574
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6575
6575
|
/**
|
|
6576
6576
|
* Prefer `for…of` over the `forEach` method.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-for-each.md
|
|
6578
6578
|
*/
|
|
6579
6579
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6580
6580
|
/**
|
|
6581
6581
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-for-loop.md
|
|
6583
6583
|
*/
|
|
6584
6584
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6585
6585
|
/**
|
|
6586
6586
|
* Disallow assigning properties on the global object.
|
|
6587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6588
6588
|
*/
|
|
6589
6589
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6590
6590
|
/**
|
|
6591
6591
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6593
6593
|
* @deprecated
|
|
6594
6594
|
*/
|
|
6595
6595
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6596
6596
|
/**
|
|
6597
6597
|
* Disallow immediate mutation after variable assignment.
|
|
6598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-immediate-mutation.md
|
|
6599
6599
|
*/
|
|
6600
6600
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6601
6601
|
/**
|
|
6602
6602
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6604
6604
|
*/
|
|
6605
6605
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6606
6606
|
/**
|
|
6607
6607
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6609
6609
|
*/
|
|
6610
6610
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6611
6611
|
/**
|
|
6612
6612
|
* Disallow incorrect template literal interpolation syntax.
|
|
6613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6614
6614
|
*/
|
|
6615
6615
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6616
6616
|
/**
|
|
6617
6617
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6619
6619
|
* @deprecated
|
|
6620
6620
|
*/
|
|
6621
6621
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6622
6622
|
/**
|
|
6623
6623
|
* Disallow `instanceof` with built-in objects
|
|
6624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-instanceof-builtins.md
|
|
6625
6625
|
*/
|
|
6626
6626
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6627
6627
|
/**
|
|
6628
6628
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-invalid-argument-count.md
|
|
6630
6630
|
*/
|
|
6631
6631
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6632
6632
|
/**
|
|
6633
6633
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
6634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6635
6635
|
*/
|
|
6636
6636
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6637
6637
|
/**
|
|
6638
6638
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6640
6640
|
*/
|
|
6641
6641
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6642
6642
|
/**
|
|
6643
6643
|
* Disallow invalid `accept` values on file inputs.
|
|
6644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6645
6645
|
*/
|
|
6646
6646
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6647
6647
|
/**
|
|
6648
6648
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6650
6650
|
*/
|
|
6651
6651
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6652
6652
|
/**
|
|
6653
6653
|
* Disallow invalid implementations of well-known symbol methods.
|
|
6654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
6655
6655
|
*/
|
|
6656
6656
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
6657
6657
|
/**
|
|
6658
6658
|
* Disallow identifiers starting with `new` or `class`.
|
|
6659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-keyword-prefix.md
|
|
6660
6660
|
*/
|
|
6661
6661
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6662
6662
|
/**
|
|
6663
6663
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-late-current-target-access.md
|
|
6665
6665
|
*/
|
|
6666
6666
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6667
6667
|
/**
|
|
6668
6668
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
6669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-late-event-control.md
|
|
6670
6670
|
*/
|
|
6671
6671
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
6672
6672
|
/**
|
|
6673
6673
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6675
6675
|
* @deprecated
|
|
6676
6676
|
*/
|
|
6677
6677
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6678
6678
|
/**
|
|
6679
6679
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-lonely-if.md
|
|
6681
6681
|
*/
|
|
6682
6682
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6683
6683
|
/**
|
|
6684
6684
|
* Disallow mutating a loop iterable during iteration.
|
|
6685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6686
6686
|
*/
|
|
6687
6687
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
6688
6688
|
/**
|
|
6689
6689
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6691
6691
|
*/
|
|
6692
6692
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6693
6693
|
/**
|
|
6694
6694
|
* Disallow manually wrapped comments.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6696
6696
|
*/
|
|
6697
6697
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6698
6698
|
/**
|
|
6699
6699
|
* Disallow checking a Map key before accessing a different key.
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-mismatched-map-key.md
|
|
6701
6701
|
*/
|
|
6702
6702
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6703
6703
|
/**
|
|
6704
6704
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6706
6706
|
*/
|
|
6707
6707
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
6708
6708
|
/**
|
|
6709
6709
|
* Disallow named usage of default import and export.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-named-default.md
|
|
6711
6711
|
*/
|
|
6712
6712
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6713
6713
|
/**
|
|
6714
6714
|
* Disallow negated array predicate calls.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-negated-array-predicate.md
|
|
6716
6716
|
*/
|
|
6717
6717
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6718
6718
|
/**
|
|
6719
6719
|
* Disallow negated comparisons.
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-negated-comparison.md
|
|
6721
6721
|
*/
|
|
6722
6722
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6723
6723
|
/**
|
|
6724
6724
|
* Disallow negated conditions.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-negated-condition.md
|
|
6726
6726
|
*/
|
|
6727
6727
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6728
6728
|
/**
|
|
6729
6729
|
* Disallow negated expression in equality check.
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6731
6731
|
*/
|
|
6732
6732
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6733
6733
|
/**
|
|
6734
6734
|
* Disallow nested ternary expressions.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-nested-ternary.md
|
|
6736
6736
|
*/
|
|
6737
6737
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6738
6738
|
/**
|
|
6739
6739
|
* Disallow `new Array()`.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-new-array.md
|
|
6741
6741
|
*/
|
|
6742
6742
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6743
6743
|
/**
|
|
6744
6744
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-new-buffer.md
|
|
6746
6746
|
*/
|
|
6747
6747
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6748
6748
|
/**
|
|
6749
6749
|
* Disallow non-function values with function-style verb prefixes.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6751
6751
|
*/
|
|
6752
6752
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6753
6753
|
/**
|
|
6754
6754
|
* Disallow non-standard properties on built-in objects.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6756
6756
|
*/
|
|
6757
6757
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6758
6758
|
/**
|
|
6759
6759
|
* Disallow the use of the `null` literal.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-null.md
|
|
6761
6761
|
*/
|
|
6762
6762
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6763
6763
|
/**
|
|
6764
6764
|
* Disallow the use of objects as default parameters.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6766
6766
|
*/
|
|
6767
6767
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6768
6768
|
/**
|
|
6769
6769
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6771
6771
|
*/
|
|
6772
6772
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6773
6773
|
/**
|
|
6774
6774
|
* Disallow optional chaining on undeclared variables.
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6776
6776
|
*/
|
|
6777
6777
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6778
6778
|
/**
|
|
6779
6779
|
* Disallow `process.exit()`.
|
|
6780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-process-exit.md
|
|
6781
6781
|
*/
|
|
6782
6782
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6783
6783
|
/**
|
|
6784
6784
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-redundant-comparison.md
|
|
6786
6786
|
*/
|
|
6787
6787
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6788
6788
|
/**
|
|
6789
6789
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-return-array-push.md
|
|
6791
6791
|
*/
|
|
6792
6792
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6793
6793
|
/**
|
|
6794
6794
|
* Disallow selector syntax in DOM names.
|
|
6795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-selector-as-dom-name.md
|
|
6796
6796
|
*/
|
|
6797
6797
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
6798
6798
|
/**
|
|
6799
6799
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6801
6801
|
*/
|
|
6802
6802
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6803
6803
|
/**
|
|
6804
6804
|
* Disallow classes that only have static members.
|
|
6805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-static-only-class.md
|
|
6806
6806
|
*/
|
|
6807
6807
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6808
6808
|
/**
|
|
6809
6809
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-subtraction-comparison.md
|
|
6811
6811
|
*/
|
|
6812
6812
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6813
6813
|
/**
|
|
6814
6814
|
* Disallow `then` property.
|
|
6815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-thenable.md
|
|
6816
6816
|
*/
|
|
6817
6817
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6818
6818
|
/**
|
|
6819
6819
|
* Disallow assigning `this` to a variable.
|
|
6820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-this-assignment.md
|
|
6821
6821
|
*/
|
|
6822
6822
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6823
6823
|
/**
|
|
6824
6824
|
* Disallow `this` outside of classes.
|
|
6825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-this-outside-of-class.md
|
|
6826
6826
|
*/
|
|
6827
6827
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6828
6828
|
/**
|
|
6829
6829
|
* Disallow assigning to top-level variables from inside functions.
|
|
6830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6831
6831
|
*/
|
|
6832
6832
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6833
6833
|
/**
|
|
6834
6834
|
* Disallow top-level side effects in exported modules.
|
|
6835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-top-level-side-effects.md
|
|
6836
6836
|
*/
|
|
6837
6837
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
6838
6838
|
/**
|
|
6839
6839
|
* Disallow comparing `undefined` using `typeof`.
|
|
6840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-typeof-undefined.md
|
|
6841
6841
|
*/
|
|
6842
6842
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6843
6843
|
/**
|
|
6844
6844
|
* Disallow referencing methods without calling them.
|
|
6845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-uncalled-method.md
|
|
6846
6846
|
*/
|
|
6847
6847
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6848
6848
|
/**
|
|
6849
6849
|
* Require class members to be declared.
|
|
6850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-undeclared-class-members.md
|
|
6851
6851
|
*/
|
|
6852
6852
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6853
6853
|
/**
|
|
6854
6854
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6856
6856
|
*/
|
|
6857
6857
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6858
6858
|
/**
|
|
6859
6859
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
6860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
6861
6861
|
*/
|
|
6862
6862
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6863
6863
|
/**
|
|
6864
6864
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6866
6866
|
*/
|
|
6867
6867
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6868
6868
|
/**
|
|
6869
6869
|
* Disallow awaiting non-promise values.
|
|
6870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-await.md
|
|
6871
6871
|
*/
|
|
6872
6872
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6873
6873
|
/**
|
|
6874
6874
|
* Disallow unnecessary comparisons against boolean literals.
|
|
6875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
6876
6876
|
*/
|
|
6877
6877
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6878
6878
|
/**
|
|
6879
6879
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
6880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
6881
6881
|
*/
|
|
6882
6882
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6883
6883
|
/**
|
|
6884
6884
|
* Disallow unnecessary `globalThis` references.
|
|
6885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6886
6886
|
*/
|
|
6887
6887
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6888
6888
|
/**
|
|
6889
6889
|
* Disallow unnecessary nested ternary expressions.
|
|
6890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6891
6891
|
*/
|
|
6892
6892
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6893
6893
|
/**
|
|
6894
6894
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6896
6896
|
*/
|
|
6897
6897
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6898
6898
|
/**
|
|
6899
6899
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6901
6901
|
*/
|
|
6902
6902
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6903
6903
|
/**
|
|
6904
6904
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unnecessary-splice.md
|
|
6906
6906
|
*/
|
|
6907
6907
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6908
6908
|
/**
|
|
6909
6909
|
* Disallow unreadable array destructuring.
|
|
6910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6911
6911
|
*/
|
|
6912
6912
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6913
6913
|
/**
|
|
6914
6914
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
6916
6916
|
*/
|
|
6917
6917
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6918
6918
|
/**
|
|
6919
6919
|
* Disallow unreadable IIFEs.
|
|
6920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unreadable-iife.md
|
|
6921
6921
|
*/
|
|
6922
6922
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6923
6923
|
/**
|
|
6924
6924
|
* Disallow unreadable `new` expressions.
|
|
6925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6926
6926
|
*/
|
|
6927
6927
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6928
6928
|
/**
|
|
6929
6929
|
* Disallow unreadable object destructuring.
|
|
6930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6931
6931
|
*/
|
|
6932
6932
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6933
6933
|
/**
|
|
6934
6934
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6936
6936
|
*/
|
|
6937
6937
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6938
6938
|
/**
|
|
6939
6939
|
* Disallow unsafe DOM HTML APIs.
|
|
6940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6941
6941
|
*/
|
|
6942
6942
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6943
6943
|
/**
|
|
6944
6944
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
6946
6946
|
*/
|
|
6947
6947
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
6948
6948
|
/**
|
|
6949
6949
|
* Disallow unsafe values as property keys.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unsafe-property-key.md
|
|
6951
6951
|
*/
|
|
6952
6952
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6953
6953
|
/**
|
|
6954
6954
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6956
6956
|
*/
|
|
6957
6957
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
6958
6958
|
/**
|
|
6959
6959
|
* Disallow ignoring the return value of selected array methods.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unused-array-method-return.md
|
|
6961
6961
|
*/
|
|
6962
6962
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6963
6963
|
/**
|
|
6964
6964
|
* Disallow unused object properties.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-unused-properties.md
|
|
6966
6966
|
*/
|
|
6967
6967
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6968
6968
|
/**
|
|
6969
6969
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-boolean-cast.md
|
|
6971
6971
|
*/
|
|
6972
6972
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
6973
6973
|
/**
|
|
6974
6974
|
* Disallow useless type coercions of values that are already of the target type.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-coercion.md
|
|
6976
6976
|
*/
|
|
6977
6977
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
6978
6978
|
/**
|
|
6979
6979
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-collection-argument.md
|
|
6981
6981
|
*/
|
|
6982
6982
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6983
6983
|
/**
|
|
6984
6984
|
* Disallow useless compound assignments such as `x += 0`.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-compound-assignment.md
|
|
6986
6986
|
*/
|
|
6987
6987
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
6988
6988
|
/**
|
|
6989
6989
|
* Disallow useless concatenation of literals.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-concat.md
|
|
6991
6991
|
*/
|
|
6992
6992
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
6993
6993
|
/**
|
|
6994
6994
|
* Disallow useless `continue` statements.
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-continue.md
|
|
6996
6996
|
*/
|
|
6997
6997
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
6998
6998
|
/**
|
|
6999
6999
|
* Disallow unnecessary existence checks before deletion.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-delete-check.md
|
|
7001
7001
|
*/
|
|
7002
7002
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7003
7003
|
/**
|
|
7004
7004
|
* Disallow `else` after a statement that exits.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-else.md
|
|
7006
7006
|
*/
|
|
7007
7007
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7008
7008
|
/**
|
|
7009
7009
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7011
7011
|
*/
|
|
7012
7012
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7013
7013
|
/**
|
|
7014
7014
|
* Disallow useless fallback when spreading in object literals.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7016
7016
|
*/
|
|
7017
7017
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7018
7018
|
/**
|
|
7019
7019
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7021
7021
|
*/
|
|
7022
7022
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7023
7023
|
/**
|
|
7024
7024
|
* Disallow useless array length check.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-length-check.md
|
|
7026
7026
|
*/
|
|
7027
7027
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7028
7028
|
/**
|
|
7029
7029
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-logical-operand.md
|
|
7031
7031
|
*/
|
|
7032
7032
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7033
7033
|
/**
|
|
7034
7034
|
* Disallow useless overrides of class methods.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-override.md
|
|
7036
7036
|
*/
|
|
7037
7037
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7038
7038
|
/**
|
|
7039
7039
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7041
7041
|
*/
|
|
7042
7042
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7043
7043
|
/**
|
|
7044
7044
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-recursion.md
|
|
7046
7046
|
*/
|
|
7047
7047
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7048
7048
|
/**
|
|
7049
7049
|
* Disallow unnecessary spread.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-spread.md
|
|
7051
7051
|
*/
|
|
7052
7052
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7053
7053
|
/**
|
|
7054
7054
|
* Disallow useless case in switch statements.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-switch-case.md
|
|
7056
7056
|
*/
|
|
7057
7057
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7058
7058
|
/**
|
|
7059
7059
|
* Disallow useless template literal expressions.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-template-literals.md
|
|
7061
7061
|
*/
|
|
7062
7062
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7063
7063
|
/**
|
|
7064
7064
|
* Disallow useless `undefined`.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-useless-undefined.md
|
|
7066
7066
|
*/
|
|
7067
7067
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7068
7068
|
/**
|
|
7069
7069
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7071
7071
|
*/
|
|
7072
7072
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7073
7073
|
/**
|
|
7074
7074
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/no-zero-fractions.md
|
|
7076
7076
|
*/
|
|
7077
7077
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7078
7078
|
/**
|
|
7079
7079
|
* Enforce proper case for numeric literals.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/number-literal-case.md
|
|
7081
7081
|
*/
|
|
7082
7082
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7083
7083
|
/**
|
|
7084
7084
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/numeric-separators-style.md
|
|
7086
7086
|
*/
|
|
7087
7087
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7088
7088
|
/**
|
|
7089
7089
|
* Require assignment operator shorthand where possible.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/operator-assignment.md
|
|
7091
7091
|
*/
|
|
7092
7092
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7093
7093
|
/**
|
|
7094
7094
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7096
7096
|
*/
|
|
7097
7097
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7098
7098
|
/**
|
|
7099
7099
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7101
7101
|
*/
|
|
7102
7102
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7103
7103
|
/**
|
|
7104
7104
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-add-event-listener.md
|
|
7106
7106
|
*/
|
|
7107
7107
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7108
7108
|
/**
|
|
7109
7109
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7111
7111
|
*/
|
|
7112
7112
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7113
7113
|
/**
|
|
7114
7114
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-aggregate-error.md
|
|
7116
7116
|
*/
|
|
7117
7117
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7118
7118
|
/**
|
|
7119
7119
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-find.md
|
|
7121
7121
|
*/
|
|
7122
7122
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7123
7123
|
/**
|
|
7124
7124
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-flat.md
|
|
7126
7126
|
*/
|
|
7127
7127
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7128
7128
|
/**
|
|
7129
7129
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-flat-map.md
|
|
7131
7131
|
*/
|
|
7132
7132
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7133
7133
|
/**
|
|
7134
7134
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-from-async.md
|
|
7136
7136
|
*/
|
|
7137
7137
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7138
7138
|
/**
|
|
7139
7139
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-from-map.md
|
|
7141
7141
|
*/
|
|
7142
7142
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7143
7143
|
/**
|
|
7144
7144
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-from-range.md
|
|
7146
7146
|
*/
|
|
7147
7147
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7148
7148
|
/**
|
|
7149
7149
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-index-of.md
|
|
7151
7151
|
*/
|
|
7152
7152
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7153
7153
|
/**
|
|
7154
7154
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7156
7156
|
*/
|
|
7157
7157
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7158
7158
|
/**
|
|
7159
7159
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-last-methods.md
|
|
7161
7161
|
*/
|
|
7162
7162
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7163
7163
|
/**
|
|
7164
7164
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-slice.md
|
|
7166
7166
|
*/
|
|
7167
7167
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7168
7168
|
/**
|
|
7169
7169
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-array-some.md
|
|
7171
7171
|
*/
|
|
7172
7172
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7173
7173
|
/**
|
|
7174
7174
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-at.md
|
|
7176
7176
|
*/
|
|
7177
7177
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7178
7178
|
/**
|
|
7179
7179
|
* Prefer `await` over promise chaining.
|
|
7180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-await.md
|
|
7181
7181
|
*/
|
|
7182
7182
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7183
7183
|
/**
|
|
7184
7184
|
* Prefer `BigInt` literals over the constructor.
|
|
7185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-bigint-literals.md
|
|
7186
7186
|
*/
|
|
7187
7187
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7191
7191
|
*/
|
|
7192
7192
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7193
7193
|
/**
|
|
7194
7194
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7196
7196
|
*/
|
|
7197
7197
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7198
7198
|
/**
|
|
7199
7199
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-boolean-return.md
|
|
7201
7201
|
*/
|
|
7202
7202
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7203
7203
|
/**
|
|
7204
7204
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-class-fields.md
|
|
7206
7206
|
*/
|
|
7207
7207
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7208
7208
|
/**
|
|
7209
7209
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7211
7211
|
*/
|
|
7212
7212
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7213
7213
|
/**
|
|
7214
7214
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-code-point.md
|
|
7216
7216
|
*/
|
|
7217
7217
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7218
7218
|
/**
|
|
7219
7219
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
7220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-continue.md
|
|
7221
7221
|
*/
|
|
7222
7222
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7223
7223
|
/**
|
|
7224
7224
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-date-now.md
|
|
7226
7226
|
*/
|
|
7227
7227
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7228
7228
|
/**
|
|
7229
7229
|
* Prefer default parameters over reassignment.
|
|
7230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-default-parameters.md
|
|
7231
7231
|
*/
|
|
7232
7232
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7233
7233
|
/**
|
|
7234
7234
|
* Prefer direct iteration over default iterator method calls.
|
|
7235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-direct-iteration.md
|
|
7236
7236
|
*/
|
|
7237
7237
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7238
7238
|
/**
|
|
7239
7239
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-dispose.md
|
|
7241
7241
|
*/
|
|
7242
7242
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7243
7243
|
/**
|
|
7244
7244
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-dom-node-append.md
|
|
7246
7246
|
*/
|
|
7247
7247
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7248
7248
|
/**
|
|
7249
7249
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7251
7251
|
* @deprecated
|
|
7252
7252
|
*/
|
|
7253
7253
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7254
7254
|
/**
|
|
7255
7255
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7257
7257
|
*/
|
|
7258
7258
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
7259
7259
|
/**
|
|
7260
7260
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7262
7262
|
*/
|
|
7263
7263
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7264
7264
|
/**
|
|
7265
7265
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
7266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7267
7267
|
*/
|
|
7268
7268
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7269
7269
|
/**
|
|
7270
7270
|
* Prefer `.textContent` over `.innerText`.
|
|
7271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7272
7272
|
*/
|
|
7273
7273
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7274
7274
|
/**
|
|
7275
7275
|
* Prefer early returns over full-function conditional wrapping.
|
|
7276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-early-return.md
|
|
7277
7277
|
*/
|
|
7278
7278
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7279
7279
|
/**
|
|
7280
7280
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-else-if.md
|
|
7282
7282
|
*/
|
|
7283
7283
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7284
7284
|
/**
|
|
7285
7285
|
* Prefer `Error.isError()` when checking for errors.
|
|
7286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-error-is-error.md
|
|
7287
7287
|
*/
|
|
7288
7288
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7289
7289
|
/**
|
|
7290
7290
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-event-target.md
|
|
7292
7292
|
*/
|
|
7293
7293
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7294
7294
|
/**
|
|
7295
7295
|
* Prefer `export…from` when re-exporting.
|
|
7296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-export-from.md
|
|
7297
7297
|
*/
|
|
7298
7298
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7299
7299
|
/**
|
|
7300
7300
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7302
7302
|
*/
|
|
7303
7303
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7304
7304
|
/**
|
|
7305
7305
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7307
7307
|
*/
|
|
7308
7308
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7309
7309
|
/**
|
|
7310
7310
|
* Prefer global numeric constants over `Number` static properties.
|
|
7311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-global-number-constants.md
|
|
7312
7312
|
*/
|
|
7313
7313
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7314
7314
|
/**
|
|
7315
7315
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-global-this.md
|
|
7317
7317
|
*/
|
|
7318
7318
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7319
7319
|
/**
|
|
7320
7320
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
7321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-group-by.md
|
|
7322
7322
|
*/
|
|
7323
7323
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7324
7324
|
/**
|
|
7325
7325
|
* Prefer `.has()` when checking existence.
|
|
7326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-has-check.md
|
|
7327
7327
|
*/
|
|
7328
7328
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7329
7329
|
/**
|
|
7330
7330
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7332
7332
|
*/
|
|
7333
7333
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7334
7334
|
/**
|
|
7335
7335
|
* Prefer HTTPS over HTTP.
|
|
7336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-https.md
|
|
7337
7337
|
*/
|
|
7338
7338
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7339
7339
|
/**
|
|
7340
7340
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7342
7342
|
*/
|
|
7343
7343
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7344
7344
|
/**
|
|
7345
7345
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7347
7347
|
*/
|
|
7348
7348
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7349
7349
|
/**
|
|
7350
7350
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-includes.md
|
|
7352
7352
|
*/
|
|
7353
7353
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7354
7354
|
/**
|
|
7355
7355
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7357
7357
|
*/
|
|
7358
7358
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7359
7359
|
/**
|
|
7360
7360
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7362
7362
|
*/
|
|
7363
7363
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7364
7364
|
/**
|
|
7365
7365
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-iterator-concat.md
|
|
7367
7367
|
*/
|
|
7368
7368
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7369
7369
|
/**
|
|
7370
7370
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7372
7372
|
*/
|
|
7373
7373
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7374
7374
|
/**
|
|
7375
7375
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7377
7377
|
*/
|
|
7378
7378
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7379
7379
|
/**
|
|
7380
7380
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7382
7382
|
*/
|
|
7383
7383
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7384
7384
|
/**
|
|
7385
7385
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7387
7387
|
* @deprecated
|
|
7388
7388
|
*/
|
|
7389
7389
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7390
7390
|
/**
|
|
7391
7391
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7393
7393
|
*/
|
|
7394
7394
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7395
7395
|
/**
|
|
7396
7396
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-location-assign.md
|
|
7398
7398
|
*/
|
|
7399
7399
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7400
7400
|
/**
|
|
7401
7401
|
* Prefer using a logical operator over a ternary.
|
|
7402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7403
7403
|
*/
|
|
7404
7404
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7405
7405
|
/**
|
|
7406
7406
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-map-from-entries.md
|
|
7408
7408
|
*/
|
|
7409
7409
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7410
7410
|
/**
|
|
7411
7411
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-math-abs.md
|
|
7413
7413
|
*/
|
|
7414
7414
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7415
7415
|
/**
|
|
7416
7416
|
* Prefer `Math` constants over their approximate numeric values.
|
|
7417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-math-constants.md
|
|
7418
7418
|
*/
|
|
7419
7419
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7420
7420
|
/**
|
|
7421
7421
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-math-min-max.md
|
|
7423
7423
|
*/
|
|
7424
7424
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7425
7425
|
/**
|
|
7426
7426
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-math-trunc.md
|
|
7428
7428
|
*/
|
|
7429
7429
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7430
7430
|
/**
|
|
7431
7431
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7433
7433
|
*/
|
|
7434
7434
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7435
7435
|
/**
|
|
7436
7436
|
* Prefer modern DOM APIs.
|
|
7437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7438
7438
|
*/
|
|
7439
7439
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7440
7440
|
/**
|
|
7441
7441
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7443
7443
|
*/
|
|
7444
7444
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7445
7445
|
/**
|
|
7446
7446
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-module.md
|
|
7448
7448
|
*/
|
|
7449
7449
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7450
7450
|
/**
|
|
7451
7451
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7453
7453
|
*/
|
|
7454
7454
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7455
7455
|
/**
|
|
7456
7456
|
* Prefer negative index over `.length - index` when possible.
|
|
7457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-negative-index.md
|
|
7458
7458
|
*/
|
|
7459
7459
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7460
7460
|
/**
|
|
7461
7461
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-node-protocol.md
|
|
7463
7463
|
*/
|
|
7464
7464
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7465
7465
|
/**
|
|
7466
7466
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-number-coercion.md
|
|
7468
7468
|
*/
|
|
7469
7469
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7470
7470
|
/**
|
|
7471
7471
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7473
7473
|
*/
|
|
7474
7474
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7475
7475
|
/**
|
|
7476
7476
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-number-properties.md
|
|
7478
7478
|
*/
|
|
7479
7479
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7480
7480
|
/**
|
|
7481
7481
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-object-define-properties.md
|
|
7483
7483
|
*/
|
|
7484
7484
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7485
7485
|
/**
|
|
7486
7486
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7488
7488
|
*/
|
|
7489
7489
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7490
7490
|
/**
|
|
7491
7491
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-object-from-entries.md
|
|
7493
7493
|
*/
|
|
7494
7494
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7495
7495
|
/**
|
|
7496
7496
|
* Prefer the most specific `Object` iterable method.
|
|
7497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7498
7498
|
*/
|
|
7499
7499
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7500
7500
|
/**
|
|
7501
7501
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-observer-apis.md
|
|
7503
7503
|
*/
|
|
7504
7504
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7505
7505
|
/**
|
|
7506
7506
|
* Prefer omitting the `catch` binding parameter.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7508
7508
|
*/
|
|
7509
7509
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7510
7510
|
/**
|
|
7511
7511
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-path2d.md
|
|
7513
7513
|
*/
|
|
7514
7514
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7515
7515
|
/**
|
|
7516
7516
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-private-class-fields.md
|
|
7518
7518
|
*/
|
|
7519
7519
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7520
7520
|
/**
|
|
7521
7521
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-promise-try.md
|
|
7523
7523
|
*/
|
|
7524
7524
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
7525
7525
|
/**
|
|
7526
7526
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7528
7528
|
*/
|
|
7529
7529
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7530
7530
|
/**
|
|
7531
7531
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-prototype-methods.md
|
|
7533
7533
|
*/
|
|
7534
7534
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7535
7535
|
/**
|
|
7536
7536
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-query-selector.md
|
|
7538
7538
|
*/
|
|
7539
7539
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7540
7540
|
/**
|
|
7541
7541
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-queue-microtask.md
|
|
7543
7543
|
*/
|
|
7544
7544
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7545
7545
|
/**
|
|
7546
7546
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-reflect-apply.md
|
|
7548
7548
|
*/
|
|
7549
7549
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7550
7550
|
/**
|
|
7551
7551
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-regexp-escape.md
|
|
7553
7553
|
*/
|
|
7554
7554
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7555
7555
|
/**
|
|
7556
7556
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-regexp-test.md
|
|
7558
7558
|
*/
|
|
7559
7559
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7560
7560
|
/**
|
|
7561
7561
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-response-static-json.md
|
|
7563
7563
|
*/
|
|
7564
7564
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7565
7565
|
/**
|
|
7566
7566
|
* Prefer `:scope` when using element query selector methods.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-scoped-selector.md
|
|
7568
7568
|
*/
|
|
7569
7569
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7570
7570
|
/**
|
|
7571
7571
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-set-has.md
|
|
7573
7573
|
*/
|
|
7574
7574
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7575
7575
|
/**
|
|
7576
7576
|
* Prefer `Set` methods for Set operations.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-set-methods.md
|
|
7578
7578
|
*/
|
|
7579
7579
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7580
7580
|
/**
|
|
7581
7581
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-set-size.md
|
|
7583
7583
|
*/
|
|
7584
7584
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7585
7585
|
/**
|
|
7586
7586
|
* Prefer arrow function properties over methods with a single return.
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7588
7588
|
*/
|
|
7589
7589
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
7590
7590
|
/**
|
|
7591
7591
|
* Prefer simple conditions first in logical expressions.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7593
7593
|
*/
|
|
7594
7594
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7595
7595
|
/**
|
|
7596
7596
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7598
7598
|
*/
|
|
7599
7599
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7600
7600
|
/**
|
|
7601
7601
|
* Prefer simplified conditions.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-simplified-conditions.md
|
|
7603
7603
|
*/
|
|
7604
7604
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
7605
7605
|
/**
|
|
7606
7606
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7608
7608
|
*/
|
|
7609
7609
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7610
7610
|
/**
|
|
7611
7611
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-single-call.md
|
|
7613
7613
|
*/
|
|
7614
7614
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7615
7615
|
/**
|
|
7616
7616
|
* Prefer a single object destructuring declaration per local const source.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7618
7618
|
*/
|
|
7619
7619
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7620
7620
|
/**
|
|
7621
7621
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-single-replace.md
|
|
7623
7623
|
*/
|
|
7624
7624
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7625
7625
|
/**
|
|
7626
7626
|
* Prefer declaring variables in the smallest possible scope.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-smaller-scope.md
|
|
7628
7628
|
*/
|
|
7629
7629
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7630
7630
|
/**
|
|
7631
7631
|
* Prefer `String#split()` with a limit.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-split-limit.md
|
|
7633
7633
|
*/
|
|
7634
7634
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7635
7635
|
/**
|
|
7636
7636
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-spread.md
|
|
7638
7638
|
*/
|
|
7639
7639
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7640
7640
|
/**
|
|
7641
7641
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-match-all.md
|
|
7643
7643
|
*/
|
|
7644
7644
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7645
7645
|
/**
|
|
7646
7646
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7648
7648
|
*/
|
|
7649
7649
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7650
7650
|
/**
|
|
7651
7651
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-raw.md
|
|
7653
7653
|
*/
|
|
7654
7654
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7655
7655
|
/**
|
|
7656
7656
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-repeat.md
|
|
7658
7658
|
*/
|
|
7659
7659
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7660
7660
|
/**
|
|
7661
7661
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-replace-all.md
|
|
7663
7663
|
*/
|
|
7664
7664
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7665
7665
|
/**
|
|
7666
7666
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-slice.md
|
|
7668
7668
|
*/
|
|
7669
7669
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7670
7670
|
/**
|
|
7671
7671
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
7672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7673
7673
|
*/
|
|
7674
7674
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7675
7675
|
/**
|
|
7676
7676
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7678
7678
|
*/
|
|
7679
7679
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7680
7680
|
/**
|
|
7681
7681
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-structured-clone.md
|
|
7683
7683
|
*/
|
|
7684
7684
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7685
7685
|
/**
|
|
7686
7686
|
* Prefer `switch` over multiple `else-if`.
|
|
7687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-switch.md
|
|
7688
7688
|
*/
|
|
7689
7689
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7690
7690
|
/**
|
|
7691
7691
|
* Prefer `Temporal` over `Date`.
|
|
7692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-temporal.md
|
|
7693
7693
|
*/
|
|
7694
7694
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7695
7695
|
/**
|
|
7696
7696
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-ternary.md
|
|
7698
7698
|
*/
|
|
7699
7699
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7700
7700
|
/**
|
|
7701
7701
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-toggle-attribute.md
|
|
7703
7703
|
*/
|
|
7704
7704
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7705
7705
|
/**
|
|
7706
7706
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-top-level-await.md
|
|
7708
7708
|
*/
|
|
7709
7709
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7710
7710
|
/**
|
|
7711
7711
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-type-error.md
|
|
7713
7713
|
*/
|
|
7714
7714
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7715
7715
|
/**
|
|
7716
7716
|
* Require type literals to be last in union types.
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-type-literal-last.md
|
|
7718
7718
|
*/
|
|
7719
7719
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7720
7720
|
/**
|
|
7721
7721
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7723
7723
|
*/
|
|
7724
7724
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7725
7725
|
/**
|
|
7726
7726
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-unary-minus.md
|
|
7728
7728
|
*/
|
|
7729
7729
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7730
7730
|
/**
|
|
7731
7731
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7733
7733
|
*/
|
|
7734
7734
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7735
7735
|
/**
|
|
7736
7736
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-url-can-parse.md
|
|
7738
7738
|
*/
|
|
7739
7739
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7740
7740
|
/**
|
|
7741
7741
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-url-href.md
|
|
7743
7743
|
*/
|
|
7744
7744
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7745
7745
|
/**
|
|
7746
7746
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-url-search-parameters.md
|
|
7748
7748
|
*/
|
|
7749
7749
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
7750
7750
|
/**
|
|
7751
7751
|
* Prefer putting the condition in the while statement.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7753
7753
|
*/
|
|
7754
7754
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7755
7755
|
/**
|
|
7756
7756
|
* Renamed to `unicorn/name-replacements`.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7758
7758
|
* @deprecated
|
|
7759
7759
|
*/
|
|
7760
7760
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7761
7761
|
/**
|
|
7762
7762
|
* Enforce consistent relative URL style.
|
|
7763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/relative-url-style.md
|
|
7764
7764
|
*/
|
|
7765
7765
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7766
7766
|
/**
|
|
7767
7767
|
* Enforce using the separator argument with `Array#join()`.
|
|
7768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-array-join-separator.md
|
|
7769
7769
|
*/
|
|
7770
7770
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7771
7771
|
/**
|
|
7772
7772
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-array-sort-compare.md
|
|
7774
7774
|
*/
|
|
7775
7775
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7776
7776
|
/**
|
|
7777
7777
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-css-escape.md
|
|
7779
7779
|
*/
|
|
7780
7780
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7781
7781
|
/**
|
|
7782
7782
|
* Require non-empty module attributes for imports and exports
|
|
7783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-module-attributes.md
|
|
7784
7784
|
*/
|
|
7785
7785
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7786
7786
|
/**
|
|
7787
7787
|
* Require non-empty specifier list in import and export statements.
|
|
7788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-module-specifiers.md
|
|
7789
7789
|
*/
|
|
7790
7790
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7791
7791
|
/**
|
|
7792
7792
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7794
7794
|
*/
|
|
7795
7795
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7796
7796
|
/**
|
|
7797
7797
|
* Require passive event listeners for high-frequency events.
|
|
7798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-passive-events.md
|
|
7799
7799
|
*/
|
|
7800
7800
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7801
7801
|
/**
|
|
7802
7802
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-post-message-target-origin.md
|
|
7804
7804
|
*/
|
|
7805
7805
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7806
7806
|
/**
|
|
7807
7807
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7809
7809
|
*/
|
|
7810
7810
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7811
7811
|
/**
|
|
7812
7812
|
* Enforce better string content.
|
|
7813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/string-content.md
|
|
7814
7814
|
*/
|
|
7815
7815
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7816
7816
|
/**
|
|
7817
7817
|
* Enforce consistent brace style for `case` clauses.
|
|
7818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/switch-case-braces.md
|
|
7819
7819
|
*/
|
|
7820
7820
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7821
7821
|
/**
|
|
7822
7822
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/switch-case-break-position.md
|
|
7824
7824
|
*/
|
|
7825
7825
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7826
7826
|
/**
|
|
7827
7827
|
* Fix whitespace-insensitive template indentation.
|
|
7828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/template-indent.md
|
|
7829
7829
|
*/
|
|
7830
7830
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7831
7831
|
/**
|
|
7832
7832
|
* Enforce consistent case for text encoding identifiers.
|
|
7833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7834
7834
|
*/
|
|
7835
7835
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7836
7836
|
/**
|
|
7837
7837
|
* Require `new` when creating an error.
|
|
7838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/throw-new-error.md
|
|
7839
7839
|
*/
|
|
7840
7840
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7841
7841
|
/**
|
|
7842
7842
|
* Limit the complexity of `try` blocks.
|
|
7843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.0.0/docs/rules/try-complexity.md
|
|
7844
7844
|
*/
|
|
7845
7845
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7846
7846
|
/**
|