@kitschpatrol/eslint-config 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +6 -7
- package/dist/index.d.ts +418 -338
- package/dist/index.js +1 -1
- package/init/.vscode/tasks.json +73 -0
- package/package.json +8 -8
- package/readme.md +30 -8
package/dist/index.d.ts
CHANGED
|
@@ -322,6 +322,7 @@ interface RuleOptions {
|
|
|
322
322
|
/**
|
|
323
323
|
* Disallow omitted end tags
|
|
324
324
|
*
|
|
325
|
+
* @deprecated
|
|
325
326
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
326
327
|
*/
|
|
327
328
|
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
@@ -394,6 +395,7 @@ interface RuleOptions {
|
|
|
394
395
|
/**
|
|
395
396
|
* Disallow warnings when compiling.
|
|
396
397
|
*
|
|
398
|
+
* @deprecated
|
|
397
399
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
398
400
|
*/
|
|
399
401
|
'astro/valid-compile'?: Linter.RuleEntry<[]>;
|
|
@@ -8650,6 +8652,7 @@ interface RuleOptions {
|
|
|
8650
8652
|
* Disallow function declarations that contain unsafe references inside loop
|
|
8651
8653
|
* statements
|
|
8652
8654
|
*
|
|
8655
|
+
* @deprecated
|
|
8653
8656
|
* @see https://typescript-eslint.io/rules/no-loop-func
|
|
8654
8657
|
*/
|
|
8655
8658
|
'ts/no-loop-func'?: Linter.RuleEntry<[]>;
|
|
@@ -9205,501 +9208,501 @@ interface RuleOptions {
|
|
|
9205
9208
|
/**
|
|
9206
9209
|
* Prefer better DOM traversal APIs.
|
|
9207
9210
|
*
|
|
9208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/better-dom-traversing.md
|
|
9209
9212
|
*/
|
|
9210
9213
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
9211
9214
|
/**
|
|
9212
9215
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
9213
9216
|
*
|
|
9214
9217
|
* @deprecated
|
|
9215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
9216
9219
|
*/
|
|
9217
9220
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
9218
9221
|
/**
|
|
9219
9222
|
* Enforce a specific parameter name in catch clauses.
|
|
9220
9223
|
*
|
|
9221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/catch-error-name.md
|
|
9222
9225
|
*/
|
|
9223
9226
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
9224
9227
|
/**
|
|
9225
9228
|
* Enforce consistent class references in static methods.
|
|
9226
9229
|
*
|
|
9227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/class-reference-in-static-methods.md
|
|
9228
9231
|
*/
|
|
9229
9232
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
9230
9233
|
/**
|
|
9231
9234
|
* Enforce better comment content.
|
|
9232
9235
|
*
|
|
9233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/comment-content.md
|
|
9234
9237
|
*/
|
|
9235
9238
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
9236
9239
|
/**
|
|
9237
9240
|
* Enforce consistent assertion style with `node:assert`.
|
|
9238
9241
|
*
|
|
9239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-assert.md
|
|
9240
9243
|
*/
|
|
9241
9244
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
9242
9245
|
/**
|
|
9243
9246
|
* Enforce consistent naming for boolean names.
|
|
9244
9247
|
*
|
|
9245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-boolean-name.md
|
|
9246
9249
|
*/
|
|
9247
9250
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
9248
9251
|
/**
|
|
9249
9252
|
* Enforce consistent class member order.
|
|
9250
9253
|
*
|
|
9251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-class-member-order.md
|
|
9252
9255
|
*/
|
|
9253
9256
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
9254
9257
|
/**
|
|
9255
9258
|
* Enforce consistent spelling of compound words in identifiers.
|
|
9256
9259
|
*
|
|
9257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-compound-words.md
|
|
9258
9261
|
*/
|
|
9259
9262
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
9260
9263
|
/**
|
|
9261
9264
|
* Enforce consistent conditional object spread style.
|
|
9262
9265
|
*
|
|
9263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
9264
9267
|
*/
|
|
9265
9268
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
9266
9269
|
/**
|
|
9267
9270
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
9268
9271
|
*
|
|
9269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-date-clone.md
|
|
9270
9273
|
*/
|
|
9271
9274
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
9272
9275
|
/**
|
|
9273
9276
|
* Use destructured variables over properties.
|
|
9274
9277
|
*
|
|
9275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-destructuring.md
|
|
9276
9279
|
*/
|
|
9277
9280
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
9278
9281
|
/**
|
|
9279
9282
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
9280
9283
|
*
|
|
9281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-empty-array-spread.md
|
|
9282
9285
|
*/
|
|
9283
9286
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
9284
9287
|
/**
|
|
9285
9288
|
* Enforce consistent style for element existence checks with `indexOf()`,
|
|
9286
9289
|
* `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
9287
9290
|
*
|
|
9288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-existence-index-check.md
|
|
9289
9292
|
*/
|
|
9290
9293
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
9291
9294
|
/**
|
|
9292
9295
|
* Enforce consistent decorator position on exported classes.
|
|
9293
9296
|
*
|
|
9294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-export-decorator-position.md
|
|
9295
9298
|
*/
|
|
9296
9299
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
9297
9300
|
/**
|
|
9298
9301
|
* Move function definitions to the highest possible scope.
|
|
9299
9302
|
*
|
|
9300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-scoping.md
|
|
9301
9304
|
*/
|
|
9302
9305
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
9303
9306
|
/**
|
|
9304
9307
|
* Enforce function syntax by role.
|
|
9305
9308
|
*
|
|
9306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-style.md
|
|
9307
9310
|
*/
|
|
9308
9311
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
9309
9312
|
/**
|
|
9310
9313
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
9311
9314
|
*
|
|
9312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-json-file-read.md
|
|
9313
9316
|
*/
|
|
9314
9317
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
9315
9318
|
/**
|
|
9316
9319
|
* Enforce consistent optional chaining for same-base member access.
|
|
9317
9320
|
*
|
|
9318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-optional-chaining.md
|
|
9319
9322
|
*/
|
|
9320
9323
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
9321
9324
|
/**
|
|
9322
9325
|
* Enforce consistent style for escaping `${` in template literals.
|
|
9323
9326
|
*
|
|
9324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-template-literal-escape.md
|
|
9325
9328
|
*/
|
|
9326
9329
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
9327
9330
|
/**
|
|
9328
9331
|
* Enforce consistent labels on tuple type elements.
|
|
9329
9332
|
*
|
|
9330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-tuple-labels.md
|
|
9331
9334
|
*/
|
|
9332
9335
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
9333
9336
|
/**
|
|
9334
9337
|
* Enforce correct `Error` subclassing.
|
|
9335
9338
|
*
|
|
9336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/custom-error-definition.md
|
|
9337
9340
|
*/
|
|
9338
9341
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
9339
9342
|
/**
|
|
9340
9343
|
* Enforce consistent default export declarations.
|
|
9341
9344
|
*
|
|
9342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/default-export-style.md
|
|
9343
9346
|
*/
|
|
9344
9347
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
9345
9348
|
/**
|
|
9346
9349
|
* Enforce consistent style for DOM element dataset access.
|
|
9347
9350
|
*
|
|
9348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/dom-node-dataset.md
|
|
9349
9352
|
*/
|
|
9350
9353
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
9351
9354
|
/**
|
|
9352
9355
|
* Enforce no spaces between braces.
|
|
9353
9356
|
*
|
|
9354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/empty-brace-spaces.md
|
|
9355
9358
|
*/
|
|
9356
9359
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
9357
9360
|
/**
|
|
9358
9361
|
* Enforce passing a `message` value when creating a built-in error.
|
|
9359
9362
|
*
|
|
9360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/error-message.md
|
|
9361
9364
|
*/
|
|
9362
9365
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
9363
9366
|
/**
|
|
9364
9367
|
* Require escape sequences to use uppercase or lowercase values.
|
|
9365
9368
|
*
|
|
9366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/escape-case.md
|
|
9367
9370
|
*/
|
|
9368
9371
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
9369
9372
|
/**
|
|
9370
9373
|
* Add expiration conditions to TODO comments.
|
|
9371
9374
|
*
|
|
9372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/expiring-todo-comments.md
|
|
9373
9376
|
*/
|
|
9374
9377
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
9375
9378
|
/**
|
|
9376
9379
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
9377
9380
|
*
|
|
9378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-length-check.md
|
|
9379
9382
|
*/
|
|
9380
9383
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
9381
9384
|
/**
|
|
9382
9385
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and
|
|
9383
9386
|
* `setInterval()`.
|
|
9384
9387
|
*
|
|
9385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-timer-delay.md
|
|
9386
9389
|
*/
|
|
9387
9390
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
9388
9391
|
/**
|
|
9389
9392
|
* Enforce a case style for filenames and directory names.
|
|
9390
9393
|
*
|
|
9391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/filename-case.md
|
|
9392
9395
|
*/
|
|
9393
9396
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
9394
9397
|
/**
|
|
9395
9398
|
* Require identifiers to match a specified regular expression.
|
|
9396
9399
|
*
|
|
9397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/id-match.md
|
|
9398
9401
|
*/
|
|
9399
9402
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
9400
9403
|
/**
|
|
9401
9404
|
* Enforce specific import styles per module.
|
|
9402
9405
|
*
|
|
9403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/import-style.md
|
|
9404
9407
|
*/
|
|
9405
9408
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
9406
9409
|
/**
|
|
9407
9410
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
9408
9411
|
*
|
|
9409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/isolated-functions.md
|
|
9410
9413
|
*/
|
|
9411
9414
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
9412
9415
|
/**
|
|
9413
9416
|
* Require or disallow logical assignment operator shorthand
|
|
9414
9417
|
*
|
|
9415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/logical-assignment-operators.md
|
|
9416
9419
|
*/
|
|
9417
9420
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
9418
9421
|
/**
|
|
9419
9422
|
* Limit the depth of nested calls.
|
|
9420
9423
|
*
|
|
9421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/max-nested-calls.md
|
|
9422
9425
|
*/
|
|
9423
9426
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
9424
9427
|
/**
|
|
9425
9428
|
* Enforce replacements for variable, property, and filenames.
|
|
9426
9429
|
*
|
|
9427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/name-replacements.md
|
|
9428
9431
|
*/
|
|
9429
9432
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
9430
9433
|
/**
|
|
9431
9434
|
* Enforce correct use of `new` for builtin constructors.
|
|
9432
9435
|
*
|
|
9433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/new-for-builtins.md
|
|
9434
9437
|
*/
|
|
9435
9438
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
9436
9439
|
/**
|
|
9437
9440
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
9438
9441
|
*
|
|
9439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
9440
9443
|
*/
|
|
9441
9444
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
9442
9445
|
/**
|
|
9443
9446
|
* Disallow recursive access to `this` within getters and setters.
|
|
9444
9447
|
*
|
|
9445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accessor-recursion.md
|
|
9446
9449
|
*/
|
|
9447
9450
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
9448
9451
|
/**
|
|
9449
9452
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
9450
9453
|
*
|
|
9451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
9452
9455
|
*/
|
|
9453
9456
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
9454
9457
|
/**
|
|
9455
9458
|
* Disallow anonymous functions and classes as the default export.
|
|
9456
9459
|
*
|
|
9457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-anonymous-default-export.md
|
|
9458
9461
|
*/
|
|
9459
9462
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
9460
9463
|
/**
|
|
9461
9464
|
* Prevent passing a function reference directly to iterator methods.
|
|
9462
9465
|
*
|
|
9463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-callback-reference.md
|
|
9464
9467
|
*/
|
|
9465
9468
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
9466
9469
|
/**
|
|
9467
9470
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
9468
9471
|
*
|
|
9469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-concat-in-loop.md
|
|
9470
9473
|
*/
|
|
9471
9474
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
9472
9475
|
/**
|
|
9473
9476
|
* Disallow using reference values as `Array#fill()` values.
|
|
9474
9477
|
*
|
|
9475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
9476
9479
|
*/
|
|
9477
9480
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
9478
9481
|
/**
|
|
9479
9482
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
9480
9483
|
*
|
|
9481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-from-fill.md
|
|
9482
9485
|
*/
|
|
9483
9486
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
9484
9487
|
/**
|
|
9485
9488
|
* Disallow front-of-array mutation.
|
|
9486
9489
|
*
|
|
9487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-front-mutation.md
|
|
9488
9491
|
*/
|
|
9489
9492
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
9490
9493
|
/**
|
|
9491
9494
|
* Disallow using the `this` argument in array methods.
|
|
9492
9495
|
*
|
|
9493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-method-this-argument.md
|
|
9494
9497
|
*/
|
|
9495
9498
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
9496
9499
|
/**
|
|
9497
9500
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
9498
9501
|
*
|
|
9499
9502
|
* @deprecated
|
|
9500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
9501
9504
|
*/
|
|
9502
9505
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
9503
9506
|
/**
|
|
9504
9507
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
9505
9508
|
*
|
|
9506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reduce.md
|
|
9507
9510
|
*/
|
|
9508
9511
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
9509
9512
|
/**
|
|
9510
9513
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
9511
9514
|
*
|
|
9512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reverse.md
|
|
9513
9516
|
*/
|
|
9514
9517
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
9515
9518
|
/**
|
|
9516
9519
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
9517
9520
|
*
|
|
9518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort.md
|
|
9519
9522
|
*/
|
|
9520
9523
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
9521
9524
|
/**
|
|
9522
9525
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
9523
9526
|
*
|
|
9524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
9525
9528
|
*/
|
|
9526
9529
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
9527
9530
|
/**
|
|
9528
9531
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
9529
9532
|
*
|
|
9530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-splice.md
|
|
9531
9534
|
*/
|
|
9532
9535
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
9533
9536
|
/**
|
|
9534
9537
|
* Disallow asterisk prefixes in documentation comments.
|
|
9535
9538
|
*
|
|
9536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
9537
9540
|
*/
|
|
9538
9541
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
9539
9542
|
/**
|
|
9540
9543
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
9541
9544
|
*
|
|
9542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-async-promise-finally.md
|
|
9543
9546
|
*/
|
|
9544
9547
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
9545
9548
|
/**
|
|
9546
9549
|
* Disallow member access from await expression.
|
|
9547
9550
|
*
|
|
9548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-expression-member.md
|
|
9549
9552
|
*/
|
|
9550
9553
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
9551
9554
|
/**
|
|
9552
9555
|
* Disallow using `await` in `Promise` method parameters.
|
|
9553
9556
|
*
|
|
9554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-in-promise-methods.md
|
|
9555
9558
|
*/
|
|
9556
9559
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
9557
9560
|
/**
|
|
9558
9561
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
9559
9562
|
*
|
|
9560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-blob-to-file.md
|
|
9561
9564
|
*/
|
|
9562
9565
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
9563
9566
|
/**
|
|
9564
9567
|
* Disallow boolean-returning sort comparators.
|
|
9565
9568
|
*
|
|
9566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
9567
9570
|
*/
|
|
9568
9571
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9569
9572
|
/**
|
|
9570
9573
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
9571
9574
|
*
|
|
9572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-break-in-nested-loop.md
|
|
9573
9576
|
*/
|
|
9574
9577
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
9575
9578
|
/**
|
|
9576
9579
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
9577
9580
|
*
|
|
9578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-canvas-to-image.md
|
|
9579
9582
|
*/
|
|
9580
9583
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
9581
9584
|
/**
|
|
9582
9585
|
* Disallow chained comparisons such as `a < b < c`.
|
|
9583
9586
|
*
|
|
9584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-chained-comparison.md
|
|
9585
9588
|
*/
|
|
9586
9589
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
9587
9590
|
/**
|
|
9588
9591
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with
|
|
9589
9592
|
* bracket notation.
|
|
9590
9593
|
*
|
|
9591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-collection-bracket-access.md
|
|
9592
9595
|
*/
|
|
9593
9596
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
9594
9597
|
/**
|
|
9595
9598
|
* Disallow dynamic object property existence checks.
|
|
9596
9599
|
*
|
|
9597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-computed-property-existence-check.md
|
|
9598
9601
|
*/
|
|
9599
9602
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
9600
9603
|
/**
|
|
9601
9604
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
9602
9605
|
*
|
|
9603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-splice.md
|
|
9604
9607
|
*/
|
|
9605
9608
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
9606
9609
|
/**
|
|
9607
9610
|
* Disallow confusing uses of `Array#with()`.
|
|
9608
9611
|
*
|
|
9609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-with.md
|
|
9610
9613
|
*/
|
|
9611
9614
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
9612
9615
|
/**
|
|
9613
9616
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
9614
9617
|
*
|
|
9615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-console-spaces.md
|
|
9616
9619
|
*/
|
|
9617
9620
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
9618
9621
|
/**
|
|
9619
9622
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
9620
9623
|
*
|
|
9621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-constant-zero-expression.md
|
|
9622
9625
|
*/
|
|
9623
9626
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
9624
9627
|
/**
|
|
9625
9628
|
* Disallow declarations before conditional early exits when they are only
|
|
9626
9629
|
* used after the exit.
|
|
9627
9630
|
*
|
|
9628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
9629
9632
|
*/
|
|
9630
9633
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
9631
9634
|
/**
|
|
9632
9635
|
* Do not use `document.cookie` directly.
|
|
9633
9636
|
*
|
|
9634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-document-cookie.md
|
|
9635
9638
|
*/
|
|
9636
9639
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
9637
9640
|
/**
|
|
9638
9641
|
* Disallow two comparisons of the same operands that can be combined into
|
|
9639
9642
|
* one.
|
|
9640
9643
|
*
|
|
9641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-double-comparison.md
|
|
9642
9645
|
*/
|
|
9643
9646
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
9644
9647
|
/**
|
|
9645
9648
|
* Disallow duplicate adjacent branches in if chains.
|
|
9646
9649
|
*
|
|
9647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-if-branches.md
|
|
9648
9651
|
*/
|
|
9649
9652
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
9650
9653
|
/**
|
|
9651
9654
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
9652
9655
|
*
|
|
9653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
9654
9657
|
*/
|
|
9655
9658
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
9656
9659
|
/**
|
|
9657
9660
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop
|
|
9658
9661
|
* headers.
|
|
9659
9662
|
*
|
|
9660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-loops.md
|
|
9661
9664
|
*/
|
|
9662
9665
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
9663
9666
|
/**
|
|
9664
9667
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
9665
9668
|
*
|
|
9666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-set-values.md
|
|
9667
9670
|
*/
|
|
9668
9671
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
9669
9672
|
/**
|
|
9670
9673
|
* Disallow empty files.
|
|
9671
9674
|
*
|
|
9672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-empty-file.md
|
|
9673
9676
|
*/
|
|
9674
9677
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
9675
9678
|
/**
|
|
9676
9679
|
* Disallow assigning to built-in error properties.
|
|
9677
9680
|
*
|
|
9678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-error-property-assignment.md
|
|
9679
9682
|
*/
|
|
9680
9683
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9681
9684
|
/**
|
|
9682
9685
|
* Disallow exports in scripts.
|
|
9683
9686
|
*
|
|
9684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-exports-in-scripts.md
|
|
9685
9688
|
*/
|
|
9686
9689
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
9687
9690
|
/**
|
|
9688
9691
|
* Prefer `for…of` over the `forEach` method.
|
|
9689
9692
|
*
|
|
9690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-each.md
|
|
9691
9694
|
*/
|
|
9692
9695
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
9693
9696
|
/**
|
|
9694
9697
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
9695
9698
|
*
|
|
9696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-loop.md
|
|
9697
9700
|
*/
|
|
9698
9701
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
9699
9702
|
/**
|
|
9700
9703
|
* Disallow assigning properties on the global object.
|
|
9701
9704
|
*
|
|
9702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-global-object-property-assignment.md
|
|
9703
9706
|
*/
|
|
9704
9707
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9705
9708
|
/**
|
|
@@ -9707,1566 +9710,1622 @@ interface RuleOptions {
|
|
|
9707
9710
|
* cases.
|
|
9708
9711
|
*
|
|
9709
9712
|
* @deprecated
|
|
9710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
9711
9714
|
*/
|
|
9712
9715
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
9713
9716
|
/**
|
|
9714
9717
|
* Disallow immediate mutation after variable assignment.
|
|
9715
9718
|
*
|
|
9716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-immediate-mutation.md
|
|
9717
9720
|
*/
|
|
9718
9721
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
9719
9722
|
/**
|
|
9720
9723
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
9721
9724
|
*
|
|
9722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-impossible-length-comparison.md
|
|
9723
9726
|
*/
|
|
9724
9727
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
9725
9728
|
/**
|
|
9726
9729
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
9727
9730
|
*
|
|
9728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-query-selector.md
|
|
9729
9732
|
*/
|
|
9730
9733
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
9731
9734
|
/**
|
|
9732
9735
|
* Disallow incorrect template literal interpolation syntax.
|
|
9733
9736
|
*
|
|
9734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
9735
9738
|
*/
|
|
9736
9739
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
9737
9740
|
/**
|
|
9738
9741
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
9739
9742
|
*
|
|
9740
9743
|
* @deprecated
|
|
9741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
9742
9745
|
*/
|
|
9743
9746
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
9744
9747
|
/**
|
|
9745
9748
|
* Disallow `instanceof` with built-in objects
|
|
9746
9749
|
*
|
|
9747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-instanceof-builtins.md
|
|
9748
9751
|
*/
|
|
9749
9752
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
9750
9753
|
/**
|
|
9751
9754
|
* Disallow calling functions and constructors with an invalid number of
|
|
9752
9755
|
* arguments.
|
|
9753
9756
|
*
|
|
9754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-argument-count.md
|
|
9755
9758
|
*/
|
|
9756
9759
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
9757
9760
|
/**
|
|
9758
9761
|
* Disallow comparing a single character from a string to a multi-character
|
|
9759
9762
|
* string.
|
|
9760
9763
|
*
|
|
9761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-character-comparison.md
|
|
9762
9765
|
*/
|
|
9763
9766
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
9764
9767
|
/**
|
|
9765
9768
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
9766
9769
|
*
|
|
9767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-fetch-options.md
|
|
9768
9771
|
*/
|
|
9769
9772
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
9770
9773
|
/**
|
|
9771
9774
|
* Disallow invalid `accept` values on file inputs.
|
|
9772
9775
|
*
|
|
9773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
9774
9777
|
*/
|
|
9775
9778
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
9776
9779
|
/**
|
|
9777
9780
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an
|
|
9778
9781
|
* expression.
|
|
9779
9782
|
*
|
|
9780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
9781
9784
|
*/
|
|
9782
9785
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
9783
9786
|
/**
|
|
9784
9787
|
* Disallow invalid implementations of well-known symbol methods.
|
|
9785
9788
|
*
|
|
9786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
9787
9790
|
*/
|
|
9788
9791
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
9789
9792
|
/**
|
|
9790
9793
|
* Disallow identifiers starting with `new` or `class`.
|
|
9791
9794
|
*
|
|
9792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-keyword-prefix.md
|
|
9793
9796
|
*/
|
|
9794
9797
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
9795
9798
|
/**
|
|
9796
9799
|
* Disallow accessing `event.currentTarget` after the synchronous event
|
|
9797
9800
|
* dispatch has finished.
|
|
9798
9801
|
*
|
|
9799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-current-target-access.md
|
|
9800
9803
|
*/
|
|
9801
9804
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
9802
9805
|
/**
|
|
9803
9806
|
* Disallow event-control method calls after the synchronous event dispatch
|
|
9804
9807
|
* has finished.
|
|
9805
9808
|
*
|
|
9806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-event-control.md
|
|
9807
9810
|
*/
|
|
9808
9811
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
9809
9812
|
/**
|
|
9810
9813
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
9811
9814
|
*
|
|
9812
9815
|
* @deprecated
|
|
9813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
9814
9817
|
*/
|
|
9815
9818
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
9816
9819
|
/**
|
|
9817
9820
|
* Disallow `if` statements as the only statement in `if` blocks without
|
|
9818
9821
|
* `else`.
|
|
9819
9822
|
*
|
|
9820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-lonely-if.md
|
|
9821
9824
|
*/
|
|
9822
9825
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
9823
9826
|
/**
|
|
9824
9827
|
* Disallow mutating a loop iterable during iteration.
|
|
9825
9828
|
*
|
|
9826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
9827
9830
|
*/
|
|
9828
9831
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
9829
9832
|
/**
|
|
9830
9833
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
9831
9834
|
*
|
|
9832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
9833
9836
|
*/
|
|
9834
9837
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
9835
9838
|
/**
|
|
9836
9839
|
* Disallow manually wrapped comments.
|
|
9837
9840
|
*
|
|
9838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
9839
9842
|
*/
|
|
9840
9843
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
9841
9844
|
/**
|
|
9842
9845
|
* Disallow checking a Map key before accessing a different key.
|
|
9843
9846
|
*
|
|
9844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-mismatched-map-key.md
|
|
9845
9848
|
*/
|
|
9846
9849
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
9847
9850
|
/**
|
|
9848
9851
|
* Disallow misrefactored compound assignments where the target is duplicated
|
|
9849
9852
|
* in the right-hand side.
|
|
9850
9853
|
*
|
|
9851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-misrefactored-assignment.md
|
|
9852
9855
|
*/
|
|
9853
9856
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
9857
|
+
/**
|
|
9858
|
+
* Disallow references to missing local resources.
|
|
9859
|
+
*
|
|
9860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-missing-local-resource.md
|
|
9861
|
+
*/
|
|
9862
|
+
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
9863
|
+
/**
|
|
9864
|
+
* Disallow calling Promise executor resolver functions more than once on the
|
|
9865
|
+
* same execution path.
|
|
9866
|
+
*
|
|
9867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
9868
|
+
*/
|
|
9869
|
+
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
9854
9870
|
/**
|
|
9855
9871
|
* Disallow named usage of default import and export.
|
|
9856
9872
|
*
|
|
9857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-named-default.md
|
|
9858
9874
|
*/
|
|
9859
9875
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
9860
9876
|
/**
|
|
9861
9877
|
* Disallow negated array predicate calls.
|
|
9862
9878
|
*
|
|
9863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-array-predicate.md
|
|
9864
9880
|
*/
|
|
9865
9881
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9866
9882
|
/**
|
|
9867
9883
|
* Disallow negated comparisons.
|
|
9868
9884
|
*
|
|
9869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-comparison.md
|
|
9870
9886
|
*/
|
|
9871
9887
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
9872
9888
|
/**
|
|
9873
9889
|
* Disallow negated conditions.
|
|
9874
9890
|
*
|
|
9875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-condition.md
|
|
9876
9892
|
*/
|
|
9877
9893
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
9878
9894
|
/**
|
|
9879
9895
|
* Disallow negated expression in equality check.
|
|
9880
9896
|
*
|
|
9881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negation-in-equality-check.md
|
|
9882
9898
|
*/
|
|
9883
9899
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
9884
9900
|
/**
|
|
9885
9901
|
* Disallow nested ternary expressions.
|
|
9886
9902
|
*
|
|
9887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nested-ternary.md
|
|
9888
9904
|
*/
|
|
9889
9905
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
9890
9906
|
/**
|
|
9891
9907
|
* Disallow `new Array()`.
|
|
9892
9908
|
*
|
|
9893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-array.md
|
|
9894
9910
|
*/
|
|
9895
9911
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
9896
9912
|
/**
|
|
9897
9913
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the
|
|
9898
9914
|
* deprecated `new Buffer()`.
|
|
9899
9915
|
*
|
|
9900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-buffer.md
|
|
9901
9917
|
*/
|
|
9902
9918
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
9903
9919
|
/**
|
|
9904
9920
|
* Disallow non-function values with function-style verb prefixes.
|
|
9905
9921
|
*
|
|
9906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
9907
9923
|
*/
|
|
9908
9924
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
9909
9925
|
/**
|
|
9910
9926
|
* Disallow non-standard properties on built-in objects.
|
|
9911
9927
|
*
|
|
9912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
9913
9929
|
*/
|
|
9914
9930
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
9915
9931
|
/**
|
|
9916
9932
|
* Disallow the use of the `null` literal.
|
|
9917
9933
|
*
|
|
9918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-null.md
|
|
9919
9935
|
*/
|
|
9920
9936
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
9921
9937
|
/**
|
|
9922
9938
|
* Disallow the use of objects as default parameters.
|
|
9923
9939
|
*
|
|
9924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-as-default-parameter.md
|
|
9925
9941
|
*/
|
|
9926
9942
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
9927
9943
|
/**
|
|
9928
9944
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
9929
9945
|
*
|
|
9930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-methods-with-collections.md
|
|
9931
9947
|
*/
|
|
9932
9948
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
9933
9949
|
/**
|
|
9934
9950
|
* Disallow optional chaining on undeclared variables.
|
|
9935
9951
|
*
|
|
9936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
9937
9953
|
*/
|
|
9938
9954
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
9939
9955
|
/**
|
|
9940
9956
|
* Disallow `process.exit()`.
|
|
9941
9957
|
*
|
|
9942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-process-exit.md
|
|
9943
9959
|
*/
|
|
9944
9960
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
9945
9961
|
/**
|
|
9946
9962
|
* Disallow comparisons made redundant by an equality check in the same
|
|
9947
9963
|
* logical AND.
|
|
9948
9964
|
*
|
|
9949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-redundant-comparison.md
|
|
9950
9966
|
*/
|
|
9951
9967
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
9952
9968
|
/**
|
|
9953
9969
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
9954
9970
|
*
|
|
9955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-return-array-push.md
|
|
9956
9972
|
*/
|
|
9957
9973
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
9958
9974
|
/**
|
|
9959
9975
|
* Disallow selector syntax in DOM names.
|
|
9960
9976
|
*
|
|
9961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-selector-as-dom-name.md
|
|
9962
9978
|
*/
|
|
9963
9979
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
9980
|
+
/**
|
|
9981
|
+
* Disallow shorthand properties that override related longhand properties.
|
|
9982
|
+
*
|
|
9983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
9984
|
+
*/
|
|
9985
|
+
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
9964
9986
|
/**
|
|
9965
9987
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
9966
9988
|
*
|
|
9967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
9968
9990
|
*/
|
|
9969
9991
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
9970
9992
|
/**
|
|
9971
9993
|
* Disallow classes that only have static members.
|
|
9972
9994
|
*
|
|
9973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-static-only-class.md
|
|
9974
9996
|
*/
|
|
9975
9997
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
9976
9998
|
/**
|
|
9977
9999
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
9978
10000
|
*
|
|
9979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-subtraction-comparison.md
|
|
9980
10002
|
*/
|
|
9981
10003
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
9982
10004
|
/**
|
|
9983
10005
|
* Disallow `then` property.
|
|
9984
10006
|
*
|
|
9985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-thenable.md
|
|
9986
10008
|
*/
|
|
9987
10009
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
9988
10010
|
/**
|
|
9989
10011
|
* Disallow assigning `this` to a variable.
|
|
9990
10012
|
*
|
|
9991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-assignment.md
|
|
9992
10014
|
*/
|
|
9993
10015
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
9994
10016
|
/**
|
|
9995
10017
|
* Disallow `this` outside of classes.
|
|
9996
10018
|
*
|
|
9997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-outside-of-class.md
|
|
9998
10020
|
*/
|
|
9999
10021
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
10000
10022
|
/**
|
|
10001
10023
|
* Disallow assigning to top-level variables from inside functions.
|
|
10002
10024
|
*
|
|
10003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
10004
10026
|
*/
|
|
10005
10027
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
10006
10028
|
/**
|
|
10007
10029
|
* Disallow top-level side effects in exported modules.
|
|
10008
10030
|
*
|
|
10009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-side-effects.md
|
|
10010
10032
|
*/
|
|
10011
10033
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
10034
|
+
/**
|
|
10035
|
+
* Disallow `all` as a transition property.
|
|
10036
|
+
*
|
|
10037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-transition-all.md
|
|
10038
|
+
*/
|
|
10039
|
+
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
10012
10040
|
/**
|
|
10013
10041
|
* Disallow comparing `undefined` using `typeof`.
|
|
10014
10042
|
*
|
|
10015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-typeof-undefined.md
|
|
10016
10044
|
*/
|
|
10017
10045
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
10018
10046
|
/**
|
|
10019
10047
|
* Disallow referencing methods without calling them.
|
|
10020
10048
|
*
|
|
10021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-uncalled-method.md
|
|
10022
10050
|
*/
|
|
10023
10051
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
10024
10052
|
/**
|
|
10025
10053
|
* Require class members to be declared.
|
|
10026
10054
|
*
|
|
10027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-undeclared-class-members.md
|
|
10028
10056
|
*/
|
|
10029
10057
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
10030
10058
|
/**
|
|
10031
10059
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
10032
10060
|
*
|
|
10033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
10034
10062
|
*/
|
|
10035
10063
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
10036
10064
|
/**
|
|
10037
10065
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
10038
10066
|
*
|
|
10039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
10040
10068
|
*/
|
|
10041
10069
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10042
10070
|
/**
|
|
10043
10071
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount`
|
|
10044
10072
|
* argument of `Array#{splice,toSpliced}()`.
|
|
10045
10073
|
*
|
|
10046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
10047
10075
|
*/
|
|
10048
10076
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
10049
10077
|
/**
|
|
10050
10078
|
* Disallow awaiting non-promise values.
|
|
10051
10079
|
*
|
|
10052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-await.md
|
|
10053
10081
|
*/
|
|
10054
10082
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
10055
10083
|
/**
|
|
10056
10084
|
* Disallow unnecessary comparisons against boolean literals.
|
|
10057
10085
|
*
|
|
10058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
10059
10087
|
*/
|
|
10060
10088
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
10061
10089
|
/**
|
|
10062
10090
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
10063
10091
|
*
|
|
10064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
10065
10093
|
*/
|
|
10066
10094
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
10067
10095
|
/**
|
|
10068
10096
|
* Disallow unnecessary `globalThis` references.
|
|
10069
10097
|
*
|
|
10070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-global-this.md
|
|
10071
10099
|
*/
|
|
10072
10100
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
10073
10101
|
/**
|
|
10074
10102
|
* Disallow unnecessary nested ternary expressions.
|
|
10075
10103
|
*
|
|
10076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
10077
10105
|
*/
|
|
10078
10106
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10079
10107
|
/**
|
|
10080
10108
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
10081
10109
|
*
|
|
10082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
10083
10111
|
*/
|
|
10084
10112
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
10085
10113
|
/**
|
|
10086
10114
|
* Disallow using `.length` or `Infinity` as the `end` argument of
|
|
10087
10115
|
* `{Array,String,TypedArray}#slice()`.
|
|
10088
10116
|
*
|
|
10089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
10090
10118
|
*/
|
|
10091
10119
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
10092
10120
|
/**
|
|
10093
10121
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
10094
10122
|
*
|
|
10095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-splice.md
|
|
10096
10124
|
*/
|
|
10097
10125
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
10126
|
+
/**
|
|
10127
|
+
* Disallow `String#trim()` before `String#startsWith()` or
|
|
10128
|
+
* `String#endsWith()`.
|
|
10129
|
+
*
|
|
10130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
10131
|
+
*/
|
|
10132
|
+
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
10098
10133
|
/**
|
|
10099
10134
|
* Disallow unreadable array destructuring.
|
|
10100
10135
|
*
|
|
10101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
10102
10137
|
*/
|
|
10103
10138
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
10104
10139
|
/**
|
|
10105
10140
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of`
|
|
10106
10141
|
* loop headers.
|
|
10107
10142
|
*
|
|
10108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
10109
10144
|
*/
|
|
10110
10145
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
10111
10146
|
/**
|
|
10112
10147
|
* Disallow unreadable IIFEs.
|
|
10113
10148
|
*
|
|
10114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-iife.md
|
|
10115
10150
|
*/
|
|
10116
10151
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
10117
10152
|
/**
|
|
10118
10153
|
* Disallow unreadable `new` expressions.
|
|
10119
10154
|
*
|
|
10120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-new-expression.md
|
|
10121
10156
|
*/
|
|
10122
10157
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
10123
10158
|
/**
|
|
10124
10159
|
* Disallow unreadable object destructuring.
|
|
10125
10160
|
*
|
|
10126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
10127
10162
|
*/
|
|
10128
10163
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
10129
10164
|
/**
|
|
10130
10165
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
10131
10166
|
*
|
|
10132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
10133
10168
|
*/
|
|
10134
10169
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
10135
10170
|
/**
|
|
10136
10171
|
* Disallow unsafe DOM HTML APIs.
|
|
10137
10172
|
*
|
|
10138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-dom-html.md
|
|
10139
10174
|
*/
|
|
10140
10175
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
10141
10176
|
/**
|
|
10142
10177
|
* Disallow reading `.value` from `Promise.allSettled()` results without a
|
|
10143
10178
|
* fulfilled status guard.
|
|
10144
10179
|
*
|
|
10145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
10146
10181
|
*/
|
|
10147
10182
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
10148
10183
|
/**
|
|
10149
10184
|
* Disallow unsafe values as property keys.
|
|
10150
10185
|
*
|
|
10151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-property-key.md
|
|
10152
10187
|
*/
|
|
10153
10188
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
10154
10189
|
/**
|
|
10155
10190
|
* Disallow non-literal replacement values in `String#replace()` and
|
|
10156
10191
|
* `String#replaceAll()`.
|
|
10157
10192
|
*
|
|
10158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
10159
10194
|
*/
|
|
10160
10195
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
10161
10196
|
/**
|
|
10162
10197
|
* Disallow ignoring the return value of selected array methods.
|
|
10163
10198
|
*
|
|
10164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-array-method-return.md
|
|
10165
10200
|
*/
|
|
10166
10201
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
10167
10202
|
/**
|
|
10168
10203
|
* Disallow unused object properties.
|
|
10169
10204
|
*
|
|
10170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-properties.md
|
|
10171
10206
|
*/
|
|
10172
10207
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
10173
10208
|
/**
|
|
10174
10209
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
10175
10210
|
*
|
|
10176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-boolean-cast.md
|
|
10177
10212
|
*/
|
|
10178
10213
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
10179
10214
|
/**
|
|
10180
10215
|
* Disallow useless type coercions of values that are already of the target
|
|
10181
10216
|
* type.
|
|
10182
10217
|
*
|
|
10183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-coercion.md
|
|
10184
10219
|
*/
|
|
10185
10220
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
10186
10221
|
/**
|
|
10187
10222
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or
|
|
10188
10223
|
* `WeakMap`.
|
|
10189
10224
|
*
|
|
10190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-collection-argument.md
|
|
10191
10226
|
*/
|
|
10192
10227
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
10193
10228
|
/**
|
|
10194
10229
|
* Disallow useless compound assignments such as `x += 0`.
|
|
10195
10230
|
*
|
|
10196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-compound-assignment.md
|
|
10197
10232
|
*/
|
|
10198
10233
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
10199
10234
|
/**
|
|
10200
10235
|
* Disallow useless concatenation of literals.
|
|
10201
10236
|
*
|
|
10202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-concat.md
|
|
10203
10238
|
*/
|
|
10204
10239
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
10205
10240
|
/**
|
|
10206
10241
|
* Disallow useless `continue` statements.
|
|
10207
10242
|
*
|
|
10208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-continue.md
|
|
10209
10244
|
*/
|
|
10210
10245
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
10211
10246
|
/**
|
|
10212
10247
|
* Disallow unnecessary existence checks before deletion.
|
|
10213
10248
|
*
|
|
10214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-delete-check.md
|
|
10215
10250
|
*/
|
|
10216
10251
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
10217
10252
|
/**
|
|
10218
10253
|
* Disallow `else` after a statement that exits.
|
|
10219
10254
|
*
|
|
10220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-else.md
|
|
10221
10256
|
*/
|
|
10222
10257
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
10223
10258
|
/**
|
|
10224
10259
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
10225
10260
|
*
|
|
10226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
10227
10262
|
*/
|
|
10228
10263
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
10229
10264
|
/**
|
|
10230
10265
|
* Disallow useless fallback when spreading in object literals.
|
|
10231
10266
|
*
|
|
10232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
10233
10268
|
*/
|
|
10234
10269
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
10235
10270
|
/**
|
|
10236
10271
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
10237
10272
|
*
|
|
10238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
10239
10274
|
*/
|
|
10240
10275
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10241
10276
|
/**
|
|
10242
10277
|
* Disallow useless array length check.
|
|
10243
10278
|
*
|
|
10244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-length-check.md
|
|
10245
10280
|
*/
|
|
10246
10281
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
10247
10282
|
/**
|
|
10248
10283
|
* Disallow unnecessary operands in logical expressions involving boolean
|
|
10249
10284
|
* literals.
|
|
10250
10285
|
*
|
|
10251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-logical-operand.md
|
|
10252
10287
|
*/
|
|
10253
10288
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
10254
10289
|
/**
|
|
10255
10290
|
* Disallow useless overrides of class methods.
|
|
10256
10291
|
*
|
|
10257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-override.md
|
|
10258
10293
|
*/
|
|
10259
10294
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
10260
10295
|
/**
|
|
10261
10296
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions
|
|
10262
10297
|
* or promise callbacks
|
|
10263
10298
|
*
|
|
10264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
10265
10300
|
*/
|
|
10266
10301
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
10302
|
+
/**
|
|
10303
|
+
* Disallow redundant re-exports.
|
|
10304
|
+
*
|
|
10305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-re-export.md
|
|
10306
|
+
*/
|
|
10307
|
+
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
10267
10308
|
/**
|
|
10268
10309
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
10269
10310
|
*
|
|
10270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-recursion.md
|
|
10271
10312
|
*/
|
|
10272
10313
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
10273
10314
|
/**
|
|
10274
10315
|
* Disallow unnecessary spread.
|
|
10275
10316
|
*
|
|
10276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-spread.md
|
|
10277
10318
|
*/
|
|
10278
10319
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
10279
10320
|
/**
|
|
10280
10321
|
* Disallow useless case in switch statements.
|
|
10281
10322
|
*
|
|
10282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-switch-case.md
|
|
10283
10324
|
*/
|
|
10284
10325
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
10285
10326
|
/**
|
|
10286
10327
|
* Disallow useless template literal expressions.
|
|
10287
10328
|
*
|
|
10288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-template-literals.md
|
|
10289
10330
|
*/
|
|
10290
10331
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
10291
10332
|
/**
|
|
10292
10333
|
* Disallow useless `undefined`.
|
|
10293
10334
|
*
|
|
10294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-undefined.md
|
|
10295
10336
|
*/
|
|
10296
10337
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
10297
10338
|
/**
|
|
10298
10339
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
10299
10340
|
*
|
|
10300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
10301
10342
|
*/
|
|
10302
10343
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
10303
10344
|
/**
|
|
10304
10345
|
* Disallow number literals with zero fractions or dangling dots.
|
|
10305
10346
|
*
|
|
10306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-zero-fractions.md
|
|
10307
10348
|
*/
|
|
10308
10349
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
10309
10350
|
/**
|
|
10310
10351
|
* Enforce proper case for numeric literals.
|
|
10311
10352
|
*
|
|
10312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/number-literal-case.md
|
|
10313
10354
|
*/
|
|
10314
10355
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
10315
10356
|
/**
|
|
10316
10357
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
10317
10358
|
*
|
|
10318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/numeric-separators-style.md
|
|
10319
10360
|
*/
|
|
10320
10361
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
10321
10362
|
/**
|
|
10322
10363
|
* Require assignment operator shorthand where possible.
|
|
10323
10364
|
*
|
|
10324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/operator-assignment.md
|
|
10325
10366
|
*/
|
|
10326
10367
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
10327
10368
|
/**
|
|
10328
10369
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between
|
|
10329
10370
|
* signals.
|
|
10330
10371
|
*
|
|
10331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-any.md
|
|
10332
10373
|
*/
|
|
10333
10374
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
10334
10375
|
/**
|
|
10335
10376
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController`
|
|
10336
10377
|
* with `setTimeout()`.
|
|
10337
10378
|
*
|
|
10338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
10339
10380
|
*/
|
|
10340
10381
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
10341
10382
|
/**
|
|
10342
10383
|
* Prefer `.addEventListener()` and `.removeEventListener()` over
|
|
10343
10384
|
* `on`-functions.
|
|
10344
10385
|
*
|
|
10345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener.md
|
|
10346
10387
|
*/
|
|
10347
10388
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
10348
10389
|
/**
|
|
10349
10390
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
10350
10391
|
*
|
|
10351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
10352
10393
|
*/
|
|
10353
10394
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
10354
10395
|
/**
|
|
10355
10396
|
* Prefer `AggregateError` when throwing collected errors.
|
|
10356
10397
|
*
|
|
10357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-aggregate-error.md
|
|
10358
10399
|
*/
|
|
10359
10400
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
10360
10401
|
/**
|
|
10361
10402
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from
|
|
10362
10403
|
* `.filter(…)`.
|
|
10363
10404
|
*
|
|
10364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-find.md
|
|
10365
10406
|
*/
|
|
10366
10407
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
10367
10408
|
/**
|
|
10368
10409
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
10369
10410
|
*
|
|
10370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat.md
|
|
10371
10412
|
*/
|
|
10372
10413
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
10373
10414
|
/**
|
|
10374
10415
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
10375
10416
|
*
|
|
10376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat-map.md
|
|
10377
10418
|
*/
|
|
10378
10419
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10379
10420
|
/**
|
|
10380
10421
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
10381
10422
|
*
|
|
10382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-async.md
|
|
10383
10424
|
*/
|
|
10384
10425
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
10385
10426
|
/**
|
|
10386
10427
|
* Prefer using the `Array.from()` mapping function argument.
|
|
10387
10428
|
*
|
|
10388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-map.md
|
|
10389
10430
|
*/
|
|
10390
10431
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
10391
10432
|
/**
|
|
10392
10433
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
10393
10434
|
*
|
|
10394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-range.md
|
|
10395
10436
|
*/
|
|
10396
10437
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
10397
10438
|
/**
|
|
10398
10439
|
* Prefer `Array#{indexOf,lastIndexOf}()` over
|
|
10399
10440
|
* `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
10400
10441
|
*
|
|
10401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-index-of.md
|
|
10402
10443
|
*/
|
|
10403
10444
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
10404
10445
|
/**
|
|
10405
10446
|
* Prefer iterating an array directly or with `Array#keys()` over
|
|
10406
10447
|
* `Array#entries()` when the index or value is unused.
|
|
10407
10448
|
*
|
|
10408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
10409
10450
|
*/
|
|
10410
10451
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10411
10452
|
/**
|
|
10412
10453
|
* Prefer last-oriented array methods over `Array#reverse()` or
|
|
10413
10454
|
* `Array#toReversed()` followed by a method.
|
|
10414
10455
|
*
|
|
10415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-last-methods.md
|
|
10416
10457
|
*/
|
|
10417
10458
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
10418
10459
|
/**
|
|
10419
10460
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned
|
|
10420
10461
|
* array.
|
|
10421
10462
|
*
|
|
10422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-slice.md
|
|
10423
10464
|
*/
|
|
10424
10465
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
10425
10466
|
/**
|
|
10426
10467
|
* Prefer `.some(…)` over `.filter(…).length` check and
|
|
10427
10468
|
* `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
10428
10469
|
*
|
|
10429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-some.md
|
|
10430
10471
|
*/
|
|
10431
10472
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
10432
10473
|
/**
|
|
10433
10474
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
10434
10475
|
*
|
|
10435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-at.md
|
|
10436
10477
|
*/
|
|
10437
10478
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
10438
10479
|
/**
|
|
10439
10480
|
* Prefer `await` over promise chaining.
|
|
10440
10481
|
*
|
|
10441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-await.md
|
|
10442
10483
|
*/
|
|
10443
10484
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
10444
10485
|
/**
|
|
10445
10486
|
* Prefer `BigInt` literals over the constructor.
|
|
10446
10487
|
*
|
|
10447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-bigint-literals.md
|
|
10448
10489
|
*/
|
|
10449
10490
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
10450
10491
|
/**
|
|
10451
10492
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and
|
|
10452
10493
|
* `Blob#text()` over `FileReader#readAsText(…)`.
|
|
10453
10494
|
*
|
|
10454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
10455
10496
|
*/
|
|
10456
10497
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
10457
10498
|
/**
|
|
10458
10499
|
* Prefer block statements over IIFEs used only for scoping.
|
|
10459
10500
|
*
|
|
10460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
10461
10502
|
*/
|
|
10462
10503
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
10463
10504
|
/**
|
|
10464
10505
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
10465
10506
|
*
|
|
10466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-boolean-return.md
|
|
10467
10508
|
*/
|
|
10468
10509
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
10469
10510
|
/**
|
|
10470
10511
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
10471
10512
|
*
|
|
10472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-class-fields.md
|
|
10473
10514
|
*/
|
|
10474
10515
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
10475
10516
|
/**
|
|
10476
10517
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
10477
10518
|
*
|
|
10478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-classlist-toggle.md
|
|
10479
10520
|
*/
|
|
10480
10521
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
10481
10522
|
/**
|
|
10482
10523
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and
|
|
10483
10524
|
* `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
10484
10525
|
*
|
|
10485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-code-point.md
|
|
10486
10527
|
*/
|
|
10487
10528
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
10488
10529
|
/**
|
|
10489
10530
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
10490
10531
|
*
|
|
10491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-continue.md
|
|
10492
10533
|
*/
|
|
10493
10534
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
10494
10535
|
/**
|
|
10495
10536
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
10496
10537
|
*
|
|
10497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-date-now.md
|
|
10498
10539
|
*/
|
|
10499
10540
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
10500
10541
|
/**
|
|
10501
10542
|
* Prefer default parameters over reassignment.
|
|
10502
10543
|
*
|
|
10503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-default-parameters.md
|
|
10504
10545
|
*/
|
|
10505
10546
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
10506
10547
|
/**
|
|
10507
10548
|
* Prefer direct iteration over default iterator method calls.
|
|
10508
10549
|
*
|
|
10509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-direct-iteration.md
|
|
10510
10551
|
*/
|
|
10511
10552
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
10512
10553
|
/**
|
|
10513
10554
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource
|
|
10514
10555
|
* disposal.
|
|
10515
10556
|
*
|
|
10516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dispose.md
|
|
10517
10558
|
*/
|
|
10518
10559
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
10519
10560
|
/**
|
|
10520
10561
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
10521
10562
|
*
|
|
10522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-append.md
|
|
10523
10564
|
*/
|
|
10524
10565
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
10525
10566
|
/**
|
|
10526
10567
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
10527
10568
|
*
|
|
10528
10569
|
* @deprecated
|
|
10529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
10530
10571
|
*/
|
|
10531
10572
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
10532
10573
|
/**
|
|
10533
10574
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
10534
10575
|
*
|
|
10535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
10536
10577
|
*/
|
|
10537
|
-
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<
|
|
10578
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
10538
10579
|
/**
|
|
10539
10580
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
10540
10581
|
*
|
|
10541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-remove.md
|
|
10542
10583
|
*/
|
|
10543
10584
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
10544
10585
|
/**
|
|
10545
10586
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
10546
10587
|
*
|
|
10547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
10548
10589
|
*/
|
|
10549
10590
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
10550
10591
|
/**
|
|
10551
10592
|
* Prefer `.textContent` over `.innerText`.
|
|
10552
10593
|
*
|
|
10553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
10554
10595
|
*/
|
|
10555
10596
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
10556
10597
|
/**
|
|
10557
10598
|
* Prefer early returns over full-function conditional wrapping.
|
|
10558
10599
|
*
|
|
10559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-early-return.md
|
|
10560
10601
|
*/
|
|
10561
10602
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
10562
10603
|
/**
|
|
10563
10604
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
10564
10605
|
*
|
|
10565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-else-if.md
|
|
10566
10607
|
*/
|
|
10567
10608
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
10568
10609
|
/**
|
|
10569
10610
|
* Prefer `Error.isError()` when checking for errors.
|
|
10570
10611
|
*
|
|
10571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-error-is-error.md
|
|
10572
10613
|
*/
|
|
10573
10614
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
10574
10615
|
/**
|
|
10575
10616
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
10576
10617
|
*
|
|
10577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-event-target.md
|
|
10578
10619
|
*/
|
|
10579
10620
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
10621
|
+
/**
|
|
10622
|
+
* Prefer explicit viewport units.
|
|
10623
|
+
*
|
|
10624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
10625
|
+
*/
|
|
10626
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
10580
10627
|
/**
|
|
10581
10628
|
* Prefer `export…from` when re-exporting.
|
|
10582
10629
|
*
|
|
10583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-export-from.md
|
|
10584
10631
|
*/
|
|
10585
10632
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
10586
10633
|
/**
|
|
10587
10634
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
10588
10635
|
*
|
|
10589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
10590
10637
|
*/
|
|
10591
10638
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10592
10639
|
/**
|
|
10593
10640
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
10594
10641
|
*
|
|
10595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
10596
10643
|
*/
|
|
10597
10644
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
10598
10645
|
/**
|
|
10599
10646
|
* Prefer global numeric constants over `Number` static properties.
|
|
10600
10647
|
*
|
|
10601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-number-constants.md
|
|
10602
10649
|
*/
|
|
10603
10650
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
10604
10651
|
/**
|
|
10605
10652
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
10606
10653
|
*
|
|
10607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-this.md
|
|
10608
10655
|
*/
|
|
10609
10656
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
10610
10657
|
/**
|
|
10611
10658
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
10612
10659
|
*
|
|
10613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-group-by.md
|
|
10614
10661
|
*/
|
|
10615
10662
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
10616
10663
|
/**
|
|
10617
10664
|
* Prefer `.has()` when checking existence.
|
|
10618
10665
|
*
|
|
10619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-has-check.md
|
|
10620
10667
|
*/
|
|
10621
10668
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
10622
10669
|
/**
|
|
10623
10670
|
* Prefer moving code shared by all branches of an `if` statement out of the
|
|
10624
10671
|
* branches.
|
|
10625
10672
|
*
|
|
10626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
10627
10674
|
*/
|
|
10628
10675
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
10629
10676
|
/**
|
|
10630
10677
|
* Prefer HTTPS over HTTP.
|
|
10631
10678
|
*
|
|
10632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-https.md
|
|
10633
10680
|
*/
|
|
10634
10681
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
10635
10682
|
/**
|
|
10636
10683
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
10637
10684
|
*
|
|
10638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
10639
10686
|
*/
|
|
10640
10687
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
10641
10688
|
/**
|
|
10642
10689
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting
|
|
10643
10690
|
* file paths.
|
|
10644
10691
|
*
|
|
10645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-import-meta-properties.md
|
|
10646
10693
|
*/
|
|
10647
10694
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
10648
10695
|
/**
|
|
10649
10696
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and
|
|
10650
10697
|
* `Array#some()` when checking for existence or non-existence.
|
|
10651
10698
|
*
|
|
10652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes.md
|
|
10653
10700
|
*/
|
|
10654
10701
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
10655
10702
|
/**
|
|
10656
10703
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
10657
10704
|
*
|
|
10658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
10659
10706
|
*/
|
|
10660
10707
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
10661
10708
|
/**
|
|
10662
10709
|
* Prefer passing iterables directly to constructors instead of filling empty
|
|
10663
10710
|
* collections.
|
|
10664
10711
|
*
|
|
10665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
10666
10713
|
*/
|
|
10667
10714
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
10668
10715
|
/**
|
|
10669
10716
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
10670
10717
|
*
|
|
10671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-concat.md
|
|
10672
10719
|
*/
|
|
10673
10720
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
10674
10721
|
/**
|
|
10675
10722
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
10676
10723
|
*
|
|
10677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-helpers.md
|
|
10678
10725
|
*/
|
|
10679
10726
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
10680
10727
|
/**
|
|
10681
10728
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
10682
10729
|
*
|
|
10683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array.md
|
|
10684
10731
|
*/
|
|
10685
10732
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10686
10733
|
/**
|
|
10687
10734
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
10688
10735
|
*
|
|
10689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
10690
10737
|
*/
|
|
10691
10738
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
10692
10739
|
/**
|
|
10693
10740
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
10694
10741
|
*
|
|
10695
10742
|
* @deprecated
|
|
10696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
10697
10744
|
*/
|
|
10698
10745
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
10699
10746
|
/**
|
|
10700
10747
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
10701
10748
|
*
|
|
10702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
10703
10750
|
*/
|
|
10704
10751
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
10705
10752
|
/**
|
|
10706
10753
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
10707
10754
|
*
|
|
10708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-location-assign.md
|
|
10709
10756
|
*/
|
|
10710
10757
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
10711
10758
|
/**
|
|
10712
10759
|
* Prefer using a logical operator over a ternary.
|
|
10713
10760
|
*
|
|
10714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
10715
10762
|
*/
|
|
10716
10763
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
10717
10764
|
/**
|
|
10718
10765
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a
|
|
10719
10766
|
* map.
|
|
10720
10767
|
*
|
|
10721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-map-from-entries.md
|
|
10722
10769
|
*/
|
|
10723
10770
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
10724
10771
|
/**
|
|
10725
10772
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric
|
|
10726
10773
|
* range checks.
|
|
10727
10774
|
*
|
|
10728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-abs.md
|
|
10729
10776
|
*/
|
|
10730
10777
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
10731
10778
|
/**
|
|
10732
10779
|
* Prefer `Math` constants over their approximate numeric values.
|
|
10733
10780
|
*
|
|
10734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-constants.md
|
|
10735
10782
|
*/
|
|
10736
10783
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
10737
10784
|
/**
|
|
10738
10785
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
10739
10786
|
*
|
|
10740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-min-max.md
|
|
10741
10788
|
*/
|
|
10742
10789
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10743
10790
|
/**
|
|
10744
10791
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
10745
10792
|
*
|
|
10746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-trunc.md
|
|
10747
10794
|
*/
|
|
10748
10795
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
10749
10796
|
/**
|
|
10750
10797
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
10751
10798
|
*
|
|
10752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-minimal-ternary.md
|
|
10753
10800
|
*/
|
|
10754
10801
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
10755
10802
|
/**
|
|
10756
10803
|
* Prefer modern DOM APIs.
|
|
10757
10804
|
*
|
|
10758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
10759
10806
|
*/
|
|
10760
10807
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
10761
10808
|
/**
|
|
10762
10809
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
10763
10810
|
*
|
|
10764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-math-apis.md
|
|
10765
10812
|
*/
|
|
10766
10813
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
10767
10814
|
/**
|
|
10768
10815
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
10769
10816
|
*
|
|
10770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-module.md
|
|
10771
10818
|
*/
|
|
10772
10819
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
10773
10820
|
/**
|
|
10774
10821
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol`
|
|
10775
10822
|
* directly.
|
|
10776
10823
|
*
|
|
10777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
10778
10825
|
*/
|
|
10779
10826
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
10780
10827
|
/**
|
|
10781
10828
|
* Prefer negative index over `.length - index` when possible.
|
|
10782
10829
|
*
|
|
10783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-negative-index.md
|
|
10784
10831
|
*/
|
|
10785
10832
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
10786
10833
|
/**
|
|
10787
10834
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
10788
10835
|
*
|
|
10789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-node-protocol.md
|
|
10790
10837
|
*/
|
|
10791
10838
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
10792
10839
|
/**
|
|
10793
10840
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
10794
10841
|
*
|
|
10795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-coercion.md
|
|
10796
10843
|
*/
|
|
10797
10844
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
10798
10845
|
/**
|
|
10799
10846
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
10800
10847
|
*
|
|
10801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
10802
10849
|
*/
|
|
10803
10850
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
10804
10851
|
/**
|
|
10805
10852
|
* Prefer `Number` static methods over global functions and optionally static
|
|
10806
10853
|
* properties over global constants.
|
|
10807
10854
|
*
|
|
10808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-properties.md
|
|
10809
10856
|
*/
|
|
10810
10857
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
10811
10858
|
/**
|
|
10812
10859
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()`
|
|
10813
10860
|
* calls.
|
|
10814
10861
|
*
|
|
10815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-define-properties.md
|
|
10816
10863
|
*/
|
|
10817
10864
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
10818
10865
|
/**
|
|
10819
10866
|
* Prefer object destructuring defaults over default object literals with
|
|
10820
10867
|
* spread.
|
|
10821
10868
|
*
|
|
10822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
10823
10870
|
*/
|
|
10824
10871
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
10825
10872
|
/**
|
|
10826
10873
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs
|
|
10827
10874
|
* into an object.
|
|
10828
10875
|
*
|
|
10829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-from-entries.md
|
|
10830
10877
|
*/
|
|
10831
10878
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
10832
10879
|
/**
|
|
10833
10880
|
* Prefer the most specific `Object` iterable method.
|
|
10834
10881
|
*
|
|
10835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
10836
10883
|
*/
|
|
10837
10884
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10838
10885
|
/**
|
|
10839
10886
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
10840
10887
|
*
|
|
10841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-observer-apis.md
|
|
10842
10889
|
*/
|
|
10843
10890
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
10844
10891
|
/**
|
|
10845
10892
|
* Prefer omitting the `catch` binding parameter.
|
|
10846
10893
|
*
|
|
10847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
10848
10895
|
*/
|
|
10849
10896
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
10850
10897
|
/**
|
|
10851
10898
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
10852
10899
|
*
|
|
10853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-path2d.md
|
|
10854
10901
|
*/
|
|
10855
10902
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
10856
10903
|
/**
|
|
10857
10904
|
* Prefer private class fields over the underscore-prefix convention.
|
|
10858
10905
|
*
|
|
10859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-private-class-fields.md
|
|
10860
10907
|
*/
|
|
10861
10908
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
10862
10909
|
/**
|
|
10863
10910
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
10864
10911
|
*
|
|
10865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-try.md
|
|
10866
10913
|
*/
|
|
10867
10914
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
10868
10915
|
/**
|
|
10869
10916
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from
|
|
10870
10917
|
* `new Promise()`.
|
|
10871
10918
|
*
|
|
10872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
10873
10920
|
*/
|
|
10874
10921
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
10875
10922
|
/**
|
|
10876
10923
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
10877
10924
|
*
|
|
10878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-prototype-methods.md
|
|
10879
10926
|
*/
|
|
10880
10927
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
10881
10928
|
/**
|
|
10882
10929
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query
|
|
10883
10930
|
* methods.
|
|
10884
10931
|
*
|
|
10885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-query-selector.md
|
|
10886
10933
|
*/
|
|
10887
10934
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
10888
10935
|
/**
|
|
10889
10936
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and
|
|
10890
10937
|
* `setTimeout(…, 0)`.
|
|
10891
10938
|
*
|
|
10892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-queue-microtask.md
|
|
10893
10940
|
*/
|
|
10894
10941
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
10895
10942
|
/**
|
|
10896
10943
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
10897
10944
|
*
|
|
10898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-reflect-apply.md
|
|
10899
10946
|
*/
|
|
10900
10947
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
10901
10948
|
/**
|
|
10902
10949
|
* Prefer `RegExp.escape()` for escaping strings to use in regular
|
|
10903
10950
|
* expressions.
|
|
10904
10951
|
*
|
|
10905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-escape.md
|
|
10906
10953
|
*/
|
|
10907
10954
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
10908
10955
|
/**
|
|
10909
10956
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and
|
|
10910
10957
|
* `RegExp#exec()`.
|
|
10911
10958
|
*
|
|
10912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-test.md
|
|
10913
10960
|
*/
|
|
10914
10961
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
10915
10962
|
/**
|
|
10916
10963
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
10917
10964
|
*
|
|
10918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-response-static-json.md
|
|
10919
10966
|
*/
|
|
10920
10967
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
10921
10968
|
/**
|
|
10922
10969
|
* Prefer `:scope` when using element query selector methods.
|
|
10923
10970
|
*
|
|
10924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-scoped-selector.md
|
|
10925
10972
|
*/
|
|
10926
10973
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
10927
10974
|
/**
|
|
10928
10975
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or
|
|
10929
10976
|
* non-existence.
|
|
10930
10977
|
*
|
|
10931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-has.md
|
|
10932
10979
|
*/
|
|
10933
10980
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
10934
10981
|
/**
|
|
10935
10982
|
* Prefer `Set` methods for Set operations.
|
|
10936
10983
|
*
|
|
10937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-methods.md
|
|
10938
10985
|
*/
|
|
10939
10986
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
10940
10987
|
/**
|
|
10941
10988
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
10942
10989
|
*
|
|
10943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-size.md
|
|
10944
10991
|
*/
|
|
10945
10992
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
10946
10993
|
/**
|
|
10947
10994
|
* Prefer arrow function properties over methods with a single return.
|
|
10948
10995
|
*
|
|
10949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-short-arrow-method.md
|
|
10950
10997
|
*/
|
|
10951
|
-
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<
|
|
10998
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
10952
10999
|
/**
|
|
10953
11000
|
* Prefer simple conditions first in logical expressions.
|
|
10954
11001
|
*
|
|
10955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-condition-first.md
|
|
10956
11003
|
*/
|
|
10957
11004
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
10958
11005
|
/**
|
|
10959
11006
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
10960
11007
|
*
|
|
10961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
10962
11009
|
*/
|
|
10963
11010
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
10964
11011
|
/**
|
|
10965
11012
|
* Prefer simplified conditions.
|
|
10966
11013
|
*
|
|
10967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simplified-conditions.md
|
|
10968
11015
|
*/
|
|
10969
11016
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
10970
11017
|
/**
|
|
10971
11018
|
* Prefer a single `Array#some()` or `Array#every()` with a combined
|
|
10972
11019
|
* predicate.
|
|
10973
11020
|
*
|
|
10974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-array-predicate.md
|
|
10975
11022
|
*/
|
|
10976
11023
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
10977
11024
|
/**
|
|
10978
11025
|
* Enforce combining multiple `Array#{push,unshift}()`,
|
|
10979
11026
|
* `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
10980
11027
|
*
|
|
10981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-call.md
|
|
10982
11029
|
*/
|
|
10983
11030
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
10984
11031
|
/**
|
|
10985
11032
|
* Prefer a single object destructuring declaration per local const source.
|
|
10986
11033
|
*
|
|
10987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
10988
11035
|
*/
|
|
10989
11036
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
10990
11037
|
/**
|
|
10991
11038
|
* Enforce combining multiple single-character replacements into a single
|
|
10992
11039
|
* `String#replaceAll()` with a regular expression.
|
|
10993
11040
|
*
|
|
10994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-replace.md
|
|
10995
11042
|
*/
|
|
10996
11043
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
10997
11044
|
/**
|
|
10998
11045
|
* Prefer declaring variables in the smallest possible scope.
|
|
10999
11046
|
*
|
|
11000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-smaller-scope.md
|
|
11001
11048
|
*/
|
|
11002
11049
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
11003
11050
|
/**
|
|
11004
11051
|
* Prefer `String#split()` with a limit.
|
|
11005
11052
|
*
|
|
11006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-split-limit.md
|
|
11007
11054
|
*/
|
|
11008
11055
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
11009
11056
|
/**
|
|
11010
11057
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`,
|
|
11011
11058
|
* `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
11012
11059
|
*
|
|
11013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-spread.md
|
|
11014
11061
|
*/
|
|
11015
11062
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
11016
11063
|
/**
|
|
11017
11064
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
11018
11065
|
*
|
|
11019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-match-all.md
|
|
11020
11067
|
*/
|
|
11021
11068
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
11022
11069
|
/**
|
|
11023
11070
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string
|
|
11024
11071
|
* padding.
|
|
11025
11072
|
*
|
|
11026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
11027
11074
|
*/
|
|
11028
11075
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
11029
11076
|
/**
|
|
11030
11077
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
11031
11078
|
*
|
|
11032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-raw.md
|
|
11033
11080
|
*/
|
|
11034
11081
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
11035
11082
|
/**
|
|
11036
11083
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
11037
11084
|
*
|
|
11038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-repeat.md
|
|
11039
11086
|
*/
|
|
11040
11087
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
11041
11088
|
/**
|
|
11042
11089
|
* Prefer `String#replaceAll()` over regex searches with the global flag and
|
|
11043
11090
|
* `String#split().join()`.
|
|
11044
11091
|
*
|
|
11045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-replace-all.md
|
|
11046
11093
|
*/
|
|
11047
11094
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
11048
11095
|
/**
|
|
11049
11096
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
11050
11097
|
*
|
|
11051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-slice.md
|
|
11052
11099
|
*/
|
|
11053
11100
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
11054
11101
|
/**
|
|
11055
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over
|
|
11056
|
-
* `String#indexOf() === 0
|
|
11102
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over regexes,
|
|
11103
|
+
* `String#indexOf() === 0`, and slice checks.
|
|
11057
11104
|
*
|
|
11058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
11059
11106
|
*/
|
|
11060
11107
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
11061
11108
|
/**
|
|
11062
11109
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` /
|
|
11063
11110
|
* `String#trimRight()`.
|
|
11064
11111
|
*
|
|
11065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
11066
11113
|
*/
|
|
11067
11114
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
11068
11115
|
/**
|
|
11069
11116
|
* Prefer using `structuredClone` to create a deep clone.
|
|
11070
11117
|
*
|
|
11071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-structured-clone.md
|
|
11072
11119
|
*/
|
|
11073
11120
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
11074
11121
|
/**
|
|
11075
11122
|
* Prefer `switch` over multiple `else-if`.
|
|
11076
11123
|
*
|
|
11077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-switch.md
|
|
11078
11125
|
*/
|
|
11079
11126
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
11080
11127
|
/**
|
|
11081
11128
|
* Prefer `Temporal` over `Date`.
|
|
11082
11129
|
*
|
|
11083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-temporal.md
|
|
11084
11131
|
*/
|
|
11085
11132
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
11086
11133
|
/**
|
|
11087
11134
|
* Prefer ternary expressions over simple `if` statements that return or
|
|
11088
11135
|
* assign values.
|
|
11089
11136
|
*
|
|
11090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-ternary.md
|
|
11091
11138
|
*/
|
|
11092
11139
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
11140
|
+
/**
|
|
11141
|
+
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
11142
|
+
*
|
|
11143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-then-catch.md
|
|
11144
|
+
*/
|
|
11145
|
+
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
11093
11146
|
/**
|
|
11094
11147
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
11095
11148
|
*
|
|
11096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-toggle-attribute.md
|
|
11097
11150
|
*/
|
|
11098
11151
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
11099
11152
|
/**
|
|
11100
11153
|
* Prefer top-level await over top-level promises and async function calls.
|
|
11101
11154
|
*
|
|
11102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-top-level-await.md
|
|
11103
11156
|
*/
|
|
11104
11157
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
11105
11158
|
/**
|
|
11106
11159
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
11107
11160
|
*
|
|
11108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-error.md
|
|
11109
11162
|
*/
|
|
11110
11163
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
11111
11164
|
/**
|
|
11112
11165
|
* Require type literals to be last in union types.
|
|
11113
11166
|
*
|
|
11114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-literal-last.md
|
|
11115
11168
|
*/
|
|
11116
11169
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
11117
11170
|
/**
|
|
11118
11171
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`,
|
|
11119
11172
|
* `btoa()`, and `Buffer` base64 conversions.
|
|
11120
11173
|
*
|
|
11121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-uint8array-base64.md
|
|
11122
11175
|
*/
|
|
11123
11176
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
11124
11177
|
/**
|
|
11125
11178
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
11126
11179
|
*
|
|
11127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unary-minus.md
|
|
11128
11181
|
*/
|
|
11129
11182
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
11130
11183
|
/**
|
|
11131
11184
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
11132
11185
|
*
|
|
11133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
11134
11187
|
*/
|
|
11135
11188
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
11136
11189
|
/**
|
|
11137
11190
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for
|
|
11138
11191
|
* validation.
|
|
11139
11192
|
*
|
|
11140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-can-parse.md
|
|
11141
11194
|
*/
|
|
11142
11195
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
11143
11196
|
/**
|
|
11144
11197
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
11145
11198
|
*
|
|
11146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-href.md
|
|
11147
11200
|
*/
|
|
11148
11201
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
11149
11202
|
/**
|
|
11150
11203
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
11151
11204
|
*
|
|
11152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-search-parameters.md
|
|
11153
11206
|
*/
|
|
11154
11207
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
11155
11208
|
/**
|
|
11156
11209
|
* Prefer putting the condition in the while statement.
|
|
11157
11210
|
*
|
|
11158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-while-loop-condition.md
|
|
11159
11212
|
*/
|
|
11160
11213
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
11161
11214
|
/**
|
|
11162
11215
|
* Renamed to `unicorn/name-replacements`.
|
|
11163
11216
|
*
|
|
11164
11217
|
* @deprecated
|
|
11165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
11166
11219
|
*/
|
|
11167
11220
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
11168
11221
|
/**
|
|
11169
11222
|
* Enforce consistent relative URL style.
|
|
11170
11223
|
*
|
|
11171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/relative-url-style.md
|
|
11172
11225
|
*/
|
|
11173
11226
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
11174
11227
|
/**
|
|
11175
11228
|
* Enforce using the separator argument with `Array#join()`.
|
|
11176
11229
|
*
|
|
11177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-join-separator.md
|
|
11178
11231
|
*/
|
|
11179
11232
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
11180
11233
|
/**
|
|
11181
11234
|
* Require a compare function when calling `Array#sort()` or
|
|
11182
11235
|
* `Array#toSorted()`.
|
|
11183
11236
|
*
|
|
11184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-sort-compare.md
|
|
11185
11238
|
*/
|
|
11186
11239
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
11187
11240
|
/**
|
|
11188
11241
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
11189
11242
|
*
|
|
11190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-css-escape.md
|
|
11191
11244
|
*/
|
|
11192
11245
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
11246
|
+
/**
|
|
11247
|
+
* Require configured YAML frontmatter fields.
|
|
11248
|
+
*
|
|
11249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-frontmatter-fields.md
|
|
11250
|
+
*/
|
|
11251
|
+
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
11193
11252
|
/**
|
|
11194
11253
|
* Require non-empty module attributes for imports and exports
|
|
11195
11254
|
*
|
|
11196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-attributes.md
|
|
11197
11256
|
*/
|
|
11198
11257
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
11199
11258
|
/**
|
|
11200
11259
|
* Require non-empty specifier list in import and export statements.
|
|
11201
11260
|
*
|
|
11202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-specifiers.md
|
|
11203
11262
|
*/
|
|
11204
11263
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
11205
11264
|
/**
|
|
11206
11265
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
11207
11266
|
*
|
|
11208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
11209
11268
|
*/
|
|
11210
11269
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
11211
11270
|
/**
|
|
11212
11271
|
* Require passive event listeners for high-frequency events.
|
|
11213
11272
|
*
|
|
11214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-passive-events.md
|
|
11215
11274
|
*/
|
|
11216
11275
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
11217
11276
|
/**
|
|
11218
11277
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
11219
11278
|
*
|
|
11220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-post-message-target-origin.md
|
|
11221
11280
|
*/
|
|
11222
11281
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
11223
11282
|
/**
|
|
11224
11283
|
* Require boolean-returning Proxy traps to return booleans.
|
|
11225
11284
|
*
|
|
11226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
11227
11286
|
*/
|
|
11228
11287
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
11229
11288
|
/**
|
|
11230
11289
|
* Enforce better string content.
|
|
11231
11290
|
*
|
|
11232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/string-content.md
|
|
11233
11292
|
*/
|
|
11234
11293
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
11235
11294
|
/**
|
|
11236
11295
|
* Enforce consistent brace style for `case` clauses.
|
|
11237
11296
|
*
|
|
11238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-braces.md
|
|
11239
11298
|
*/
|
|
11240
11299
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
11241
11300
|
/**
|
|
11242
11301
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case`
|
|
11243
11302
|
* clauses.
|
|
11244
11303
|
*
|
|
11245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-break-position.md
|
|
11246
11305
|
*/
|
|
11247
11306
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
11248
11307
|
/**
|
|
11249
11308
|
* Fix whitespace-insensitive template indentation.
|
|
11250
11309
|
*
|
|
11251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/template-indent.md
|
|
11252
11311
|
*/
|
|
11253
11312
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
11254
11313
|
/**
|
|
11255
11314
|
* Enforce consistent case for text encoding identifiers.
|
|
11256
11315
|
*
|
|
11257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/text-encoding-identifier-case.md
|
|
11258
11317
|
*/
|
|
11259
11318
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
11260
11319
|
/**
|
|
11261
11320
|
* Require `new` when creating an error.
|
|
11262
11321
|
*
|
|
11263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/throw-new-error.md
|
|
11264
11323
|
*/
|
|
11265
11324
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
11266
11325
|
/**
|
|
11267
11326
|
* Limit the complexity of `try` blocks.
|
|
11268
11327
|
*
|
|
11269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/try-complexity.md
|
|
11270
11329
|
*/
|
|
11271
11330
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
11272
11331
|
/**
|
|
@@ -14112,6 +14171,7 @@ type MaxLinesPerFunction = [] | [{
|
|
|
14112
14171
|
type MaxNestedCallbacks = [] | [number | {
|
|
14113
14172
|
maximum?: number;
|
|
14114
14173
|
max?: number;
|
|
14174
|
+
checkConstructorCallCallbacks?: boolean;
|
|
14115
14175
|
}];
|
|
14116
14176
|
// ----- max-params -----
|
|
14117
14177
|
type MaxParams = [] | [number | {
|
|
@@ -17702,6 +17762,10 @@ type PreferRegexLiterals = [] | [{
|
|
|
17702
17762
|
// ----- preserve-caught-error -----
|
|
17703
17763
|
type PreserveCaughtError = [] | [{
|
|
17704
17764
|
requireCatchParameter?: boolean;
|
|
17765
|
+
errorClassNames?: (string | {
|
|
17766
|
+
name: string;
|
|
17767
|
+
argumentPosition: number;
|
|
17768
|
+
})[];
|
|
17705
17769
|
}];
|
|
17706
17770
|
// ----- quote-props -----
|
|
17707
17771
|
type QuoteProps = [] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed'] | [] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed'] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed', {
|
|
@@ -19528,6 +19592,7 @@ type TestPreferExpectAssertions = [] | [{
|
|
|
19528
19592
|
onlyFunctionsWithAsyncKeyword?: boolean;
|
|
19529
19593
|
onlyFunctionsWithExpectInLoop?: boolean;
|
|
19530
19594
|
onlyFunctionsWithExpectInCallback?: boolean;
|
|
19595
|
+
disallowHasAssertions?: boolean;
|
|
19531
19596
|
}];
|
|
19532
19597
|
// ----- test/prefer-import-in-mock -----
|
|
19533
19598
|
type TestPreferImportInMock = [] | [{
|
|
@@ -20987,10 +21052,19 @@ type UnicornPreferAt = [] | [{
|
|
|
20987
21052
|
type UnicornPreferContinue = [] | [{
|
|
20988
21053
|
maximumStatements?: number;
|
|
20989
21054
|
}];
|
|
21055
|
+
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
21056
|
+
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
21057
|
+
checkGetHTML?: boolean;
|
|
21058
|
+
checkSetHTML?: boolean;
|
|
21059
|
+
}];
|
|
20990
21060
|
// ----- unicorn/prefer-early-return -----
|
|
20991
21061
|
type UnicornPreferEarlyReturn = [] | [{
|
|
20992
21062
|
maximumStatements?: number;
|
|
20993
21063
|
}];
|
|
21064
|
+
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
21065
|
+
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
21066
|
+
unit?: 'dvh' | 'svh' | 'lvh';
|
|
21067
|
+
}];
|
|
20994
21068
|
// ----- unicorn/prefer-export-from -----
|
|
20995
21069
|
type UnicornPreferExportFrom = [] | [{
|
|
20996
21070
|
checkUsedVariables?: boolean;
|
|
@@ -21001,7 +21075,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
21001
21075
|
}];
|
|
21002
21076
|
// ----- unicorn/prefer-minimal-ternary -----
|
|
21003
21077
|
type UnicornPreferMinimalTernary = [] | [{
|
|
21004
|
-
|
|
21078
|
+
checkVaryingBase?: boolean;
|
|
21005
21079
|
checkComputedMemberAccess?: boolean;
|
|
21006
21080
|
}];
|
|
21007
21081
|
// ----- unicorn/prefer-number-properties -----
|
|
@@ -21026,6 +21100,8 @@ type UnicornPreferQueueMicrotask = [] | [{
|
|
|
21026
21100
|
type UnicornPreferSetHas = [] | [{
|
|
21027
21101
|
minimumItems?: number;
|
|
21028
21102
|
}];
|
|
21103
|
+
// ----- unicorn/prefer-short-arrow-method -----
|
|
21104
|
+
type UnicornPreferShortArrowMethod = [] | ['always' | 'consistent-as-needed'];
|
|
21029
21105
|
// ----- unicorn/prefer-single-call -----
|
|
21030
21106
|
type UnicornPreferSingleCall = [] | [{
|
|
21031
21107
|
ignore?: unknown[];
|
|
@@ -21057,6 +21133,10 @@ type UnicornRelativeUrlStyle = [] | ['never' | 'always'];
|
|
|
21057
21133
|
type UnicornRequireCssEscape = [] | [{
|
|
21058
21134
|
checkAllSelectors?: boolean;
|
|
21059
21135
|
}];
|
|
21136
|
+
// ----- unicorn/require-frontmatter-fields -----
|
|
21137
|
+
type UnicornRequireFrontmatterFields = [] | [{
|
|
21138
|
+
fields?: string[];
|
|
21139
|
+
}];
|
|
21060
21140
|
// ----- unicorn/string-content -----
|
|
21061
21141
|
type UnicornStringContent = [] | [{
|
|
21062
21142
|
patterns?: {
|
|
@@ -21446,7 +21526,7 @@ type OptionsTypeAware = {
|
|
|
21446
21526
|
};
|
|
21447
21527
|
};
|
|
21448
21528
|
type Rules = RuleOptions;
|
|
21449
|
-
type TypedFlatConfigItem = Omit<Linter.Config
|
|
21529
|
+
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins'> & {
|
|
21450
21530
|
/**
|
|
21451
21531
|
* An object containing a name-value mapping of plugin names to plugin
|
|
21452
21532
|
* objects. When `files` is specified, these plugins are only available to the
|