@kitschpatrol/eslint-config 8.8.0 → 8.9.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 +2 -2
- package/dist/index.d.ts +529 -356
- package/dist/index.js +1 -1
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -505,6 +505,7 @@ interface RuleOptions {
|
|
|
505
505
|
curly?: Linter.RuleEntry<Curly>;
|
|
506
506
|
/**
|
|
507
507
|
* Transforms the negation of a conjunction !(A && B) into the equivalent !A
|
|
508
|
+
*
|
|
508
509
|
* || !B according to De Morgan’s law
|
|
509
510
|
*
|
|
510
511
|
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
@@ -1055,7 +1056,7 @@ interface RuleOptions {
|
|
|
1055
1056
|
*/
|
|
1056
1057
|
'html/no-redundant-role'?: Linter.RuleEntry<[]>;
|
|
1057
1058
|
/**
|
|
1058
|
-
* Disallow specified
|
|
1059
|
+
* Disallow specified attribute values
|
|
1059
1060
|
*
|
|
1060
1061
|
* @see https://html-eslint.org/docs/rules/no-restricted-attr-values
|
|
1061
1062
|
*/
|
|
@@ -2037,6 +2038,13 @@ interface RuleOptions {
|
|
|
2037
2038
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
2038
2039
|
*/
|
|
2039
2040
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
2041
|
+
/**
|
|
2042
|
+
* Disallows (or requires descriptions for) `@ts-<directive>` comments,
|
|
2043
|
+
* mirroring `@typescript-eslint/ban-ts-comment`.
|
|
2044
|
+
*
|
|
2045
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-ban-ts-comment.md#repos-sticky-header
|
|
2046
|
+
*/
|
|
2047
|
+
'jsdoc/ts-ban-ts-comment'?: Linter.RuleEntry<JsdocTsBanTsComment>;
|
|
2040
2048
|
/**
|
|
2041
2049
|
* Prefers either function properties or method signatures
|
|
2042
2050
|
*
|
|
@@ -9280,519 +9288,543 @@ interface RuleOptions {
|
|
|
9280
9288
|
/**
|
|
9281
9289
|
* Prefer better DOM traversal APIs.
|
|
9282
9290
|
*
|
|
9283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/better-dom-traversing.md
|
|
9284
9292
|
*/
|
|
9285
9293
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
9286
9294
|
/**
|
|
9287
9295
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
9288
9296
|
*
|
|
9289
9297
|
* @deprecated
|
|
9290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
9291
9299
|
*/
|
|
9292
9300
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
9293
9301
|
/**
|
|
9294
9302
|
* Enforce a specific parameter name in catch clauses.
|
|
9295
9303
|
*
|
|
9296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/catch-error-name.md
|
|
9297
9305
|
*/
|
|
9298
9306
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
9299
9307
|
/**
|
|
9300
9308
|
* Enforce consistent class references in static methods.
|
|
9301
9309
|
*
|
|
9302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/class-reference-in-static-methods.md
|
|
9303
9311
|
*/
|
|
9304
9312
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
9305
9313
|
/**
|
|
9306
9314
|
* Enforce better comment content.
|
|
9307
9315
|
*
|
|
9308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/comment-content.md
|
|
9309
9317
|
*/
|
|
9310
9318
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
9311
9319
|
/**
|
|
9312
9320
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
9313
9321
|
*
|
|
9314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-arrow-return-style.md
|
|
9315
9323
|
*/
|
|
9316
9324
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
9317
9325
|
/**
|
|
9318
9326
|
* Enforce consistent assertion style with `node:assert`.
|
|
9319
9327
|
*
|
|
9320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-assert.md
|
|
9321
9329
|
*/
|
|
9322
9330
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
9323
9331
|
/**
|
|
9324
9332
|
* Enforce consistent naming for boolean names.
|
|
9325
9333
|
*
|
|
9326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-boolean-name.md
|
|
9327
9335
|
*/
|
|
9328
9336
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
9329
9337
|
/**
|
|
9330
9338
|
* Enforce consistent class member order.
|
|
9331
9339
|
*
|
|
9332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-class-member-order.md
|
|
9333
9341
|
*/
|
|
9334
9342
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
9335
9343
|
/**
|
|
9336
9344
|
* Enforce consistent spelling of compound words in identifiers.
|
|
9337
9345
|
*
|
|
9338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-compound-words.md
|
|
9339
9347
|
*/
|
|
9340
9348
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
9341
9349
|
/**
|
|
9342
9350
|
* Enforce consistent conditional object spread style.
|
|
9343
9351
|
*
|
|
9344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
9345
9353
|
*/
|
|
9346
9354
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
9347
9355
|
/**
|
|
9348
9356
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
9349
9357
|
*
|
|
9350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-date-clone.md
|
|
9351
9359
|
*/
|
|
9352
9360
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
9353
9361
|
/**
|
|
9354
9362
|
* Use destructured variables over properties.
|
|
9355
9363
|
*
|
|
9356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-destructuring.md
|
|
9357
9365
|
*/
|
|
9358
9366
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
9359
9367
|
/**
|
|
9360
9368
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
9361
9369
|
*
|
|
9362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-empty-array-spread.md
|
|
9363
9371
|
*/
|
|
9364
9372
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
9365
9373
|
/**
|
|
9366
9374
|
* Enforce consistent style for element existence checks with `indexOf()`,
|
|
9367
9375
|
* `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
9368
9376
|
*
|
|
9369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-existence-index-check.md
|
|
9370
9378
|
*/
|
|
9371
9379
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
9372
9380
|
/**
|
|
9373
9381
|
* Enforce consistent decorator position on exported classes.
|
|
9374
9382
|
*
|
|
9375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-export-decorator-position.md
|
|
9376
9384
|
*/
|
|
9377
9385
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
9378
9386
|
/**
|
|
9379
9387
|
* Move function definitions to the highest possible scope.
|
|
9380
9388
|
*
|
|
9381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-function-scoping.md
|
|
9382
9390
|
*/
|
|
9383
9391
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
9384
9392
|
/**
|
|
9385
9393
|
* Enforce function syntax by role.
|
|
9386
9394
|
*
|
|
9387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-function-style.md
|
|
9388
9396
|
*/
|
|
9389
9397
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
9390
9398
|
/**
|
|
9391
9399
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
9392
9400
|
*
|
|
9393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-json-file-read.md
|
|
9394
9402
|
*/
|
|
9395
9403
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
9396
9404
|
/**
|
|
9397
9405
|
* Enforce consistent optional chaining for same-base member access.
|
|
9398
9406
|
*
|
|
9399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-optional-chaining.md
|
|
9400
9408
|
*/
|
|
9401
9409
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
9402
9410
|
/**
|
|
9403
9411
|
* Enforce consistent style for escaping `${` in template literals.
|
|
9404
9412
|
*
|
|
9405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-template-literal-escape.md
|
|
9406
9414
|
*/
|
|
9407
9415
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
9408
9416
|
/**
|
|
9409
9417
|
* Enforce consistent labels on tuple type elements.
|
|
9410
9418
|
*
|
|
9411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-tuple-labels.md
|
|
9412
9420
|
*/
|
|
9413
9421
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
9414
9422
|
/**
|
|
9415
9423
|
* Enforce correct `Error` subclassing.
|
|
9416
9424
|
*
|
|
9417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/custom-error-definition.md
|
|
9418
9426
|
*/
|
|
9419
9427
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
9420
9428
|
/**
|
|
9421
9429
|
* Enforce consistent default export declarations.
|
|
9422
9430
|
*
|
|
9423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/default-export-style.md
|
|
9424
9432
|
*/
|
|
9425
9433
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
9426
9434
|
/**
|
|
9427
9435
|
* Enforce consistent style for DOM element dataset access.
|
|
9428
9436
|
*
|
|
9429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/dom-node-dataset.md
|
|
9430
9438
|
*/
|
|
9431
9439
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
9432
9440
|
/**
|
|
9433
9441
|
* Enforce no spaces between braces.
|
|
9434
9442
|
*
|
|
9435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/empty-brace-spaces.md
|
|
9436
9444
|
*/
|
|
9437
9445
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
9438
9446
|
/**
|
|
9439
9447
|
* Enforce passing a `message` value when creating a built-in error.
|
|
9440
9448
|
*
|
|
9441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/error-message.md
|
|
9442
9450
|
*/
|
|
9443
9451
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
9444
9452
|
/**
|
|
9445
9453
|
* Require escape sequences to use uppercase or lowercase values.
|
|
9446
9454
|
*
|
|
9447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/escape-case.md
|
|
9448
9456
|
*/
|
|
9449
9457
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
9450
9458
|
/**
|
|
9451
9459
|
* Add expiration conditions to TODO comments.
|
|
9452
9460
|
*
|
|
9453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/expiring-todo-comments.md
|
|
9454
9462
|
*/
|
|
9455
9463
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
9456
9464
|
/**
|
|
9457
9465
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
9458
9466
|
*
|
|
9459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/explicit-length-check.md
|
|
9460
9468
|
*/
|
|
9461
9469
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
9462
9470
|
/**
|
|
9463
9471
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and
|
|
9464
9472
|
* `setInterval()`.
|
|
9465
9473
|
*
|
|
9466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/explicit-timer-delay.md
|
|
9467
9475
|
*/
|
|
9468
9476
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
9469
9477
|
/**
|
|
9470
9478
|
* Enforce a case style for filenames and directory names.
|
|
9471
9479
|
*
|
|
9472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/filename-case.md
|
|
9473
9481
|
*/
|
|
9474
9482
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
9475
9483
|
/**
|
|
9476
9484
|
* Require identifiers to match a specified regular expression.
|
|
9477
9485
|
*
|
|
9478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/id-match.md
|
|
9479
9487
|
*/
|
|
9480
9488
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
9481
9489
|
/**
|
|
9482
9490
|
* Enforce specific import styles per module.
|
|
9483
9491
|
*
|
|
9484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/import-style.md
|
|
9485
9493
|
*/
|
|
9486
9494
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
9487
9495
|
/**
|
|
9488
9496
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
9489
9497
|
*
|
|
9490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/isolated-functions.md
|
|
9491
9499
|
*/
|
|
9492
9500
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
9493
9501
|
/**
|
|
9494
9502
|
* Enforce a consistent style for optional loop sources.
|
|
9495
9503
|
*
|
|
9496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/iteration-fallback-style.md
|
|
9497
9505
|
*/
|
|
9498
9506
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
9499
9507
|
/**
|
|
9500
9508
|
* Require or disallow logical assignment operator shorthand
|
|
9501
9509
|
*
|
|
9502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/logical-assignment-operators.md
|
|
9503
9511
|
*/
|
|
9504
9512
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
9505
9513
|
/**
|
|
9506
9514
|
* Limit the depth of nested calls.
|
|
9507
9515
|
*
|
|
9508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/max-nested-calls.md
|
|
9509
9517
|
*/
|
|
9510
9518
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
9511
9519
|
/**
|
|
9512
9520
|
* Enforce replacements for variable, property, and filenames.
|
|
9513
9521
|
*
|
|
9514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/name-replacements.md
|
|
9515
9523
|
*/
|
|
9516
9524
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
9517
9525
|
/**
|
|
9518
9526
|
* Enforce correct use of `new` for builtin constructors.
|
|
9519
9527
|
*
|
|
9520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/new-for-builtins.md
|
|
9521
9529
|
*/
|
|
9522
9530
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
9523
9531
|
/**
|
|
9524
9532
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
9525
9533
|
*
|
|
9526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
9527
9535
|
*/
|
|
9528
9536
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
9529
9537
|
/**
|
|
9530
9538
|
* Disallow recursive access to `this` within getters and setters.
|
|
9531
9539
|
*
|
|
9532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-accessor-recursion.md
|
|
9533
9541
|
*/
|
|
9534
9542
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
9535
9543
|
/**
|
|
9536
9544
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
9537
9545
|
*
|
|
9538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
9539
9547
|
*/
|
|
9540
9548
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
9541
9549
|
/**
|
|
9542
9550
|
* Disallow anonymous functions and classes as the default export.
|
|
9543
9551
|
*
|
|
9544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-anonymous-default-export.md
|
|
9545
9553
|
*/
|
|
9546
9554
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
9547
9555
|
/**
|
|
9548
9556
|
* Prevent passing a function reference directly to iterator methods.
|
|
9549
9557
|
*
|
|
9550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-callback-reference.md
|
|
9551
9559
|
*/
|
|
9552
9560
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
9553
9561
|
/**
|
|
9554
9562
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
9555
9563
|
*
|
|
9556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-concat-in-loop.md
|
|
9557
9565
|
*/
|
|
9558
9566
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
9559
9567
|
/**
|
|
9560
9568
|
* Disallow using reference values as `Array#fill()` values.
|
|
9561
9569
|
*
|
|
9562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
9563
9571
|
*/
|
|
9564
9572
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
9565
9573
|
/**
|
|
9566
9574
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
9567
9575
|
*
|
|
9568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-from-fill.md
|
|
9569
9577
|
*/
|
|
9570
9578
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
9571
9579
|
/**
|
|
9572
9580
|
* Disallow front-of-array mutation.
|
|
9573
9581
|
*
|
|
9574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-front-mutation.md
|
|
9575
9583
|
*/
|
|
9576
9584
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
9577
9585
|
/**
|
|
9578
9586
|
* Disallow using the `this` argument in array methods.
|
|
9579
9587
|
*
|
|
9580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-method-this-argument.md
|
|
9581
9589
|
*/
|
|
9582
9590
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
9583
9591
|
/**
|
|
9584
9592
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
9585
9593
|
*
|
|
9586
9594
|
* @deprecated
|
|
9587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
9588
9596
|
*/
|
|
9589
9597
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
9590
9598
|
/**
|
|
9591
9599
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
9592
9600
|
*
|
|
9593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-reduce.md
|
|
9594
9602
|
*/
|
|
9595
9603
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
9596
9604
|
/**
|
|
9597
9605
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
9598
9606
|
*
|
|
9599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-reverse.md
|
|
9600
9608
|
*/
|
|
9601
9609
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
9602
9610
|
/**
|
|
9603
9611
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
9604
9612
|
*
|
|
9605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-sort.md
|
|
9606
9614
|
*/
|
|
9607
9615
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
9608
9616
|
/**
|
|
9609
9617
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
9610
9618
|
*
|
|
9611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
9612
9620
|
*/
|
|
9613
9621
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
9614
9622
|
/**
|
|
9615
9623
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
9616
9624
|
*
|
|
9617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-splice.md
|
|
9618
9626
|
*/
|
|
9619
9627
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
9620
9628
|
/**
|
|
9621
9629
|
* Disallow asterisk prefixes in documentation comments.
|
|
9622
9630
|
*
|
|
9623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
9624
9632
|
*/
|
|
9625
9633
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
9634
|
+
/**
|
|
9635
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
9636
|
+
*
|
|
9637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-async-iterator-callback.md
|
|
9638
|
+
*/
|
|
9639
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
9626
9640
|
/**
|
|
9627
9641
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
9628
9642
|
*
|
|
9629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-async-promise-finally.md
|
|
9630
9644
|
*/
|
|
9631
9645
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
9632
9646
|
/**
|
|
9633
9647
|
* Disallow member access from await expression.
|
|
9634
9648
|
*
|
|
9635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-await-expression-member.md
|
|
9636
9650
|
*/
|
|
9637
9651
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
9638
9652
|
/**
|
|
9639
9653
|
* Disallow using `await` in `Promise` method parameters.
|
|
9640
9654
|
*
|
|
9641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-await-in-promise-methods.md
|
|
9642
9656
|
*/
|
|
9643
9657
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
9644
9658
|
/**
|
|
9645
9659
|
* Disallow barrel files.
|
|
9646
9660
|
*
|
|
9647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-barrel-files.md
|
|
9648
9662
|
*/
|
|
9649
9663
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
9650
9664
|
/**
|
|
9651
9665
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
9652
9666
|
*
|
|
9653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-blob-to-file.md
|
|
9654
9668
|
*/
|
|
9655
9669
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
9656
9670
|
/**
|
|
9657
9671
|
* Disallow boolean-returning sort comparators.
|
|
9658
9672
|
*
|
|
9659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
9660
9674
|
*/
|
|
9661
9675
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9662
9676
|
/**
|
|
9663
9677
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
9664
9678
|
*
|
|
9665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-break-in-nested-loop.md
|
|
9666
9680
|
*/
|
|
9667
9681
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
9668
9682
|
/**
|
|
9669
9683
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
9670
9684
|
*
|
|
9671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-canvas-to-image.md
|
|
9672
9686
|
*/
|
|
9673
9687
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
9674
9688
|
/**
|
|
9675
9689
|
* Disallow chained comparisons such as `a < b < c`.
|
|
9676
9690
|
*
|
|
9677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-chained-comparison.md
|
|
9678
9692
|
*/
|
|
9679
9693
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
9680
9694
|
/**
|
|
9681
9695
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with
|
|
9682
9696
|
* bracket notation.
|
|
9683
9697
|
*
|
|
9684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-collection-bracket-access.md
|
|
9685
9699
|
*/
|
|
9686
9700
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
9687
9701
|
/**
|
|
9688
9702
|
* Disallow dynamic object property existence checks.
|
|
9689
9703
|
*
|
|
9690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-computed-property-existence-check.md
|
|
9691
9705
|
*/
|
|
9692
9706
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
9693
9707
|
/**
|
|
9694
9708
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
9695
9709
|
*
|
|
9696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-confusing-array-splice.md
|
|
9697
9711
|
*/
|
|
9698
9712
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
9699
9713
|
/**
|
|
9700
9714
|
* Disallow confusing uses of `Array#with()`.
|
|
9701
9715
|
*
|
|
9702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-confusing-array-with.md
|
|
9703
9717
|
*/
|
|
9704
9718
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
9705
9719
|
/**
|
|
9706
9720
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
9707
9721
|
*
|
|
9708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-console-spaces.md
|
|
9709
9723
|
*/
|
|
9710
9724
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
9711
9725
|
/**
|
|
9712
9726
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
9713
9727
|
*
|
|
9714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-constant-zero-expression.md
|
|
9715
9729
|
*/
|
|
9716
9730
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
9717
9731
|
/**
|
|
9718
9732
|
* Disallow declarations before conditional early exits when they are only
|
|
9719
9733
|
* used after the exit.
|
|
9720
9734
|
*
|
|
9721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
9722
9736
|
*/
|
|
9723
9737
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
9738
|
+
/**
|
|
9739
|
+
* Disallow deprecated CSS features.
|
|
9740
|
+
*
|
|
9741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-deprecated-css-features.md
|
|
9742
|
+
*/
|
|
9743
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<UnicornNoDeprecatedCssFeatures>;
|
|
9724
9744
|
/**
|
|
9725
9745
|
* Do not use `document.cookie` directly.
|
|
9726
9746
|
*
|
|
9727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-document-cookie.md
|
|
9728
9748
|
*/
|
|
9729
9749
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
9730
9750
|
/**
|
|
9731
9751
|
* Disallow two comparisons of the same operands that can be combined into
|
|
9732
9752
|
* one.
|
|
9733
9753
|
*
|
|
9734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-double-comparison.md
|
|
9735
9755
|
*/
|
|
9736
9756
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
9757
|
+
/**
|
|
9758
|
+
* Disallow duplicate CSS selectors.
|
|
9759
|
+
*
|
|
9760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-css-selectors.md
|
|
9761
|
+
*/
|
|
9762
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
9763
|
+
/**
|
|
9764
|
+
* Disallow duplicate font family names.
|
|
9765
|
+
*
|
|
9766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-font-family-names.md
|
|
9767
|
+
*/
|
|
9768
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
9737
9769
|
/**
|
|
9738
9770
|
* Disallow duplicate adjacent branches in if chains.
|
|
9739
9771
|
*
|
|
9740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-if-branches.md
|
|
9741
9773
|
*/
|
|
9742
9774
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
9743
9775
|
/**
|
|
9744
9776
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
9745
9777
|
*
|
|
9746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
9747
9779
|
*/
|
|
9748
9780
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
9749
9781
|
/**
|
|
9750
9782
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop
|
|
9751
9783
|
* headers.
|
|
9752
9784
|
*
|
|
9753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-loops.md
|
|
9754
9786
|
*/
|
|
9755
9787
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
9756
9788
|
/**
|
|
9757
9789
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
9758
9790
|
*
|
|
9759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-set-values.md
|
|
9760
9792
|
*/
|
|
9761
9793
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
9762
9794
|
/**
|
|
9763
9795
|
* Disallow empty files.
|
|
9764
9796
|
*
|
|
9765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-empty-file.md
|
|
9766
9798
|
*/
|
|
9767
9799
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
9768
9800
|
/**
|
|
9769
9801
|
* Disallow assigning to built-in error properties.
|
|
9770
9802
|
*
|
|
9771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-error-property-assignment.md
|
|
9772
9804
|
*/
|
|
9773
9805
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9774
9806
|
/**
|
|
9775
9807
|
* Disallow exports in scripts.
|
|
9776
9808
|
*
|
|
9777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-exports-in-scripts.md
|
|
9778
9810
|
*/
|
|
9779
9811
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
9780
9812
|
/**
|
|
9781
9813
|
* Prefer `for…of` over the `forEach` method.
|
|
9782
9814
|
*
|
|
9783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-for-each.md
|
|
9784
9816
|
*/
|
|
9785
9817
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
9786
9818
|
/**
|
|
9787
9819
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
9788
9820
|
*
|
|
9789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-for-loop.md
|
|
9790
9822
|
*/
|
|
9791
9823
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
9792
9824
|
/**
|
|
9793
9825
|
* Disallow assigning properties on the global object.
|
|
9794
9826
|
*
|
|
9795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-global-object-property-assignment.md
|
|
9796
9828
|
*/
|
|
9797
9829
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9798
9830
|
/**
|
|
@@ -9800,1635 +9832,1738 @@ interface RuleOptions {
|
|
|
9800
9832
|
* cases.
|
|
9801
9833
|
*
|
|
9802
9834
|
* @deprecated
|
|
9803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
9804
9836
|
*/
|
|
9805
9837
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
9806
9838
|
/**
|
|
9807
9839
|
* Disallow immediate mutation after variable assignment.
|
|
9808
9840
|
*
|
|
9809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-immediate-mutation.md
|
|
9810
9842
|
*/
|
|
9811
9843
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
9812
9844
|
/**
|
|
9813
9845
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
9814
9846
|
*
|
|
9815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-impossible-length-comparison.md
|
|
9816
9848
|
*/
|
|
9817
9849
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
9818
9850
|
/**
|
|
9819
9851
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
9820
9852
|
*
|
|
9821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-incorrect-query-selector.md
|
|
9822
9854
|
*/
|
|
9823
9855
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
9824
9856
|
/**
|
|
9825
9857
|
* Disallow incorrect template literal interpolation syntax.
|
|
9826
9858
|
*
|
|
9827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
9828
9860
|
*/
|
|
9829
9861
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
9830
9862
|
/**
|
|
9831
9863
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
9832
9864
|
*
|
|
9833
9865
|
* @deprecated
|
|
9834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
9835
9867
|
*/
|
|
9836
9868
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
9837
9869
|
/**
|
|
9838
9870
|
* Disallow `instanceof` with built-in objects
|
|
9839
9871
|
*
|
|
9840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-instanceof-builtins.md
|
|
9841
9873
|
*/
|
|
9842
9874
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
9843
9875
|
/**
|
|
9844
9876
|
* Disallow calling functions and constructors with an invalid number of
|
|
9845
9877
|
* arguments.
|
|
9846
9878
|
*
|
|
9847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-argument-count.md
|
|
9848
9880
|
*/
|
|
9849
9881
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
9850
9882
|
/**
|
|
9851
9883
|
* Disallow comparing a single character from a string to a multi-character
|
|
9852
9884
|
* string.
|
|
9853
9885
|
*
|
|
9854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-character-comparison.md
|
|
9855
9887
|
*/
|
|
9856
9888
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
9857
9889
|
/**
|
|
9858
9890
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
9859
9891
|
*
|
|
9860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-fetch-options.md
|
|
9861
9893
|
*/
|
|
9862
9894
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
9863
9895
|
/**
|
|
9864
9896
|
* Disallow invalid `accept` values on file inputs.
|
|
9865
9897
|
*
|
|
9866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
9867
9899
|
*/
|
|
9868
9900
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
9901
|
+
/**
|
|
9902
|
+
* Disallow unknown media features and invalid values for known media
|
|
9903
|
+
* features.
|
|
9904
|
+
*
|
|
9905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-media-features.md
|
|
9906
|
+
*/
|
|
9907
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
9869
9908
|
/**
|
|
9870
9909
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an
|
|
9871
9910
|
* expression.
|
|
9872
9911
|
*
|
|
9873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
9874
9913
|
*/
|
|
9875
9914
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
9876
9915
|
/**
|
|
9877
9916
|
* Disallow invalid implementations of well-known symbol methods.
|
|
9878
9917
|
*
|
|
9879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
9880
9919
|
*/
|
|
9881
9920
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
9882
9921
|
/**
|
|
9883
9922
|
* Disallow identifiers starting with `new` or `class`.
|
|
9884
9923
|
*
|
|
9885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-keyword-prefix.md
|
|
9886
9925
|
*/
|
|
9887
9926
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
9888
9927
|
/**
|
|
9889
9928
|
* Disallow accessing `event.currentTarget` after the synchronous event
|
|
9890
9929
|
* dispatch has finished.
|
|
9891
9930
|
*
|
|
9892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-late-current-target-access.md
|
|
9893
9932
|
*/
|
|
9894
9933
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
9895
9934
|
/**
|
|
9896
9935
|
* Disallow event-control method calls after the synchronous event dispatch
|
|
9897
9936
|
* has finished.
|
|
9898
9937
|
*
|
|
9899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-late-event-control.md
|
|
9900
9939
|
*/
|
|
9901
9940
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
9902
9941
|
/**
|
|
9903
9942
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
9904
9943
|
*
|
|
9905
9944
|
* @deprecated
|
|
9906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
9907
9946
|
*/
|
|
9908
9947
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
9909
9948
|
/**
|
|
9910
9949
|
* Disallow `if` statements as the only statement in `if` blocks without
|
|
9911
9950
|
* `else`.
|
|
9912
9951
|
*
|
|
9913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-lonely-if.md
|
|
9914
9953
|
*/
|
|
9915
9954
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
9916
9955
|
/**
|
|
9917
9956
|
* Disallow mutating a loop iterable during iteration.
|
|
9918
9957
|
*
|
|
9919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
9920
9959
|
*/
|
|
9921
9960
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
9922
9961
|
/**
|
|
9923
9962
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
9924
9963
|
*
|
|
9925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
9926
9965
|
*/
|
|
9927
9966
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
9928
9967
|
/**
|
|
9929
9968
|
* Disallow manually wrapped comments.
|
|
9930
9969
|
*
|
|
9931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
9932
9971
|
*/
|
|
9933
9972
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
9934
9973
|
/**
|
|
9935
9974
|
* Disallow checking a Map key before accessing a different key.
|
|
9936
9975
|
*
|
|
9937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-mismatched-map-key.md
|
|
9938
9977
|
*/
|
|
9939
9978
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
9940
9979
|
/**
|
|
9941
9980
|
* Disallow misrefactored compound assignments where the target is duplicated
|
|
9942
9981
|
* in the right-hand side.
|
|
9943
9982
|
*
|
|
9944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-misrefactored-assignment.md
|
|
9945
9984
|
*/
|
|
9946
9985
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
9947
9986
|
/**
|
|
9948
9987
|
* Disallow references to missing local resources.
|
|
9949
9988
|
*
|
|
9950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-missing-local-resource.md
|
|
9951
9990
|
*/
|
|
9952
9991
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
9953
9992
|
/**
|
|
9954
9993
|
* Disallow calling Promise executor resolver functions more than once on the
|
|
9955
9994
|
* same execution path.
|
|
9956
9995
|
*
|
|
9957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
9958
9997
|
*/
|
|
9959
9998
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
9960
9999
|
/**
|
|
9961
10000
|
* Disallow named usage of default import and export.
|
|
9962
10001
|
*
|
|
9963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-named-default.md
|
|
9964
10003
|
*/
|
|
9965
10004
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
9966
10005
|
/**
|
|
9967
10006
|
* Disallow negated array predicate calls.
|
|
9968
10007
|
*
|
|
9969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negated-array-predicate.md
|
|
9970
10009
|
*/
|
|
9971
10010
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9972
10011
|
/**
|
|
9973
10012
|
* Disallow negated comparisons.
|
|
9974
10013
|
*
|
|
9975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negated-comparison.md
|
|
9976
10015
|
*/
|
|
9977
10016
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
9978
10017
|
/**
|
|
9979
10018
|
* Disallow negated conditions.
|
|
9980
10019
|
*
|
|
9981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negated-condition.md
|
|
9982
10021
|
*/
|
|
9983
10022
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
9984
10023
|
/**
|
|
9985
10024
|
* Disallow negated expression in equality check.
|
|
9986
10025
|
*
|
|
9987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negation-in-equality-check.md
|
|
9988
10027
|
*/
|
|
9989
10028
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
9990
10029
|
/**
|
|
9991
10030
|
* Disallow nested ternary expressions.
|
|
9992
10031
|
*
|
|
9993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-nested-ternary.md
|
|
9994
10033
|
*/
|
|
9995
10034
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10035
|
+
/**
|
|
10036
|
+
* Disallow nesting under selector lists with mixed specificity.
|
|
10037
|
+
*
|
|
10038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-nesting-with-mixed-specificity.md
|
|
10039
|
+
*/
|
|
10040
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
9996
10041
|
/**
|
|
9997
10042
|
* Disallow `new Array()`.
|
|
9998
10043
|
*
|
|
9999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-new-array.md
|
|
10000
10045
|
*/
|
|
10001
10046
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
10002
10047
|
/**
|
|
10003
10048
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the
|
|
10004
10049
|
* deprecated `new Buffer()`.
|
|
10005
10050
|
*
|
|
10006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-new-buffer.md
|
|
10007
10052
|
*/
|
|
10008
10053
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
10009
10054
|
/**
|
|
10010
10055
|
* Disallow non-function values with function-style verb prefixes.
|
|
10011
10056
|
*
|
|
10012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
10013
10058
|
*/
|
|
10014
10059
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
10015
10060
|
/**
|
|
10016
10061
|
* Disallow non-standard properties on built-in objects.
|
|
10017
10062
|
*
|
|
10018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
10019
10064
|
*/
|
|
10020
10065
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
10021
10066
|
/**
|
|
10022
10067
|
* Disallow the use of the `null` literal.
|
|
10023
10068
|
*
|
|
10024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-null.md
|
|
10025
10070
|
*/
|
|
10026
10071
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
10027
10072
|
/**
|
|
10028
10073
|
* Disallow the use of objects as default parameters.
|
|
10029
10074
|
*
|
|
10030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-object-as-default-parameter.md
|
|
10031
10076
|
*/
|
|
10032
10077
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
10033
10078
|
/**
|
|
10034
10079
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
10035
10080
|
*
|
|
10036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-object-methods-with-collections.md
|
|
10037
10082
|
*/
|
|
10038
10083
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
10039
10084
|
/**
|
|
10040
10085
|
* Disallow optional chaining on undeclared variables.
|
|
10041
10086
|
*
|
|
10042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
10043
10088
|
*/
|
|
10044
10089
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
10045
10090
|
/**
|
|
10046
10091
|
* Disallow `process.exit()`.
|
|
10047
10092
|
*
|
|
10048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-process-exit.md
|
|
10049
10094
|
*/
|
|
10050
10095
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
10051
10096
|
/**
|
|
10052
10097
|
* Disallow comparisons made redundant by an equality check in the same
|
|
10053
10098
|
* logical AND.
|
|
10054
10099
|
*
|
|
10055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-redundant-comparison.md
|
|
10056
10101
|
*/
|
|
10057
10102
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
10103
|
+
/**
|
|
10104
|
+
* Disallow nested style rules that do not modify the parent selector.
|
|
10105
|
+
*
|
|
10106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-redundant-nested-style-rules.md
|
|
10107
|
+
*/
|
|
10108
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
10058
10109
|
/**
|
|
10059
10110
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
10060
10111
|
*
|
|
10061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-return-array-push.md
|
|
10062
10113
|
*/
|
|
10063
10114
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
10064
10115
|
/**
|
|
10065
10116
|
* Disallow selector syntax in DOM names.
|
|
10066
10117
|
*
|
|
10067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-selector-as-dom-name.md
|
|
10068
10119
|
*/
|
|
10069
10120
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
10070
10121
|
/**
|
|
10071
10122
|
* Disallow shorthand properties that override related longhand properties.
|
|
10072
10123
|
*
|
|
10073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
10074
10125
|
*/
|
|
10075
10126
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
10076
10127
|
/**
|
|
10077
10128
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
10078
10129
|
*
|
|
10079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
10080
10131
|
*/
|
|
10081
10132
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
10082
10133
|
/**
|
|
10083
10134
|
* Disallow classes that only have static members.
|
|
10084
10135
|
*
|
|
10085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-static-only-class.md
|
|
10086
10137
|
*/
|
|
10087
10138
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
10088
10139
|
/**
|
|
10089
10140
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
10090
10141
|
*
|
|
10091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-subtraction-comparison.md
|
|
10092
10143
|
*/
|
|
10093
10144
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
10094
10145
|
/**
|
|
10095
10146
|
* Disallow `then` property.
|
|
10096
10147
|
*
|
|
10097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-thenable.md
|
|
10098
10149
|
*/
|
|
10099
10150
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
10100
10151
|
/**
|
|
10101
10152
|
* Disallow assigning `this` to a variable.
|
|
10102
10153
|
*
|
|
10103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-this-assignment.md
|
|
10104
10155
|
*/
|
|
10105
10156
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
10106
10157
|
/**
|
|
10107
10158
|
* Disallow `this` outside of classes.
|
|
10108
10159
|
*
|
|
10109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-this-outside-of-class.md
|
|
10110
10161
|
*/
|
|
10111
10162
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
10112
10163
|
/**
|
|
10113
10164
|
* Disallow assigning to top-level variables from inside functions.
|
|
10114
10165
|
*
|
|
10115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
10116
10167
|
*/
|
|
10117
10168
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
10118
10169
|
/**
|
|
10119
10170
|
* Disallow top-level side effects in exported modules.
|
|
10120
10171
|
*
|
|
10121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-top-level-side-effects.md
|
|
10122
10173
|
*/
|
|
10123
10174
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
10124
10175
|
/**
|
|
10125
10176
|
* Disallow `all` as a transition property.
|
|
10126
10177
|
*
|
|
10127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-transition-all.md
|
|
10128
10179
|
*/
|
|
10129
10180
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
10130
10181
|
/**
|
|
10131
10182
|
* Disallow comparing `undefined` using `typeof`.
|
|
10132
10183
|
*
|
|
10133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-typeof-undefined.md
|
|
10134
10185
|
*/
|
|
10135
10186
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
10136
10187
|
/**
|
|
10137
10188
|
* Disallow referencing methods without calling them.
|
|
10138
10189
|
*
|
|
10139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-uncalled-method.md
|
|
10140
10191
|
*/
|
|
10141
10192
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
10142
10193
|
/**
|
|
10143
10194
|
* Require class members to be declared.
|
|
10144
10195
|
*
|
|
10145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-undeclared-class-members.md
|
|
10146
10197
|
*/
|
|
10147
10198
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
10199
|
+
/**
|
|
10200
|
+
* Disallow unknown and noncanonical CSS annotations.
|
|
10201
|
+
*
|
|
10202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unknown-css-annotations.md
|
|
10203
|
+
*/
|
|
10204
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
10205
|
+
/**
|
|
10206
|
+
* Disallow unknown pseudo-class and pseudo-element selectors.
|
|
10207
|
+
*
|
|
10208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unknown-pseudo-selectors.md
|
|
10209
|
+
*/
|
|
10210
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<UnicornNoUnknownPseudoSelectors>;
|
|
10148
10211
|
/**
|
|
10149
10212
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
10150
10213
|
*
|
|
10151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
10152
10215
|
*/
|
|
10153
10216
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
10154
10217
|
/**
|
|
10155
10218
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
10156
10219
|
*
|
|
10157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
10158
10221
|
*/
|
|
10159
10222
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10160
10223
|
/**
|
|
10161
10224
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount`
|
|
10162
10225
|
* argument of `Array#{splice,toSpliced}()`.
|
|
10163
10226
|
*
|
|
10164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
10165
10228
|
*/
|
|
10166
10229
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
10167
10230
|
/**
|
|
10168
10231
|
* Disallow awaiting non-promise values.
|
|
10169
10232
|
*
|
|
10170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-await.md
|
|
10171
10234
|
*/
|
|
10172
10235
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
10173
10236
|
/**
|
|
10174
10237
|
* Disallow unnecessary comparisons against boolean literals.
|
|
10175
10238
|
*
|
|
10176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
10177
10240
|
*/
|
|
10178
10241
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
10179
10242
|
/**
|
|
10180
10243
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
10181
10244
|
*
|
|
10182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
10183
10246
|
*/
|
|
10184
10247
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
10185
10248
|
/**
|
|
10186
10249
|
* Disallow unnecessary `globalThis` references.
|
|
10187
10250
|
*
|
|
10188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-global-this.md
|
|
10189
10252
|
*/
|
|
10190
10253
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
10191
10254
|
/**
|
|
10192
10255
|
* Disallow unnecessary nested ternary expressions.
|
|
10193
10256
|
*
|
|
10194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
10195
10258
|
*/
|
|
10196
10259
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10197
10260
|
/**
|
|
10198
10261
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
10199
10262
|
*
|
|
10200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
10201
10264
|
*/
|
|
10202
10265
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
10203
10266
|
/**
|
|
10204
10267
|
* Disallow using `.length` or `Infinity` as the `end` argument of
|
|
10205
10268
|
* `{Array,String,TypedArray}#slice()`.
|
|
10206
10269
|
*
|
|
10207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
10208
10271
|
*/
|
|
10209
10272
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
10210
10273
|
/**
|
|
10211
10274
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
10212
10275
|
*
|
|
10213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-splice.md
|
|
10214
10277
|
*/
|
|
10215
10278
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
10216
10279
|
/**
|
|
10217
10280
|
* Disallow `String#trim()` before `String#startsWith()` or
|
|
10218
10281
|
* `String#endsWith()`.
|
|
10219
10282
|
*
|
|
10220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
10221
10284
|
*/
|
|
10222
10285
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
10223
10286
|
/**
|
|
10224
10287
|
* Disallow unreadable array destructuring.
|
|
10225
10288
|
*
|
|
10226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
10227
10290
|
*/
|
|
10228
10291
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
10229
10292
|
/**
|
|
10230
10293
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of`
|
|
10231
10294
|
* loop headers.
|
|
10232
10295
|
*
|
|
10233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
10234
10297
|
*/
|
|
10235
10298
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
10236
10299
|
/**
|
|
10237
10300
|
* Disallow unreadable IIFEs.
|
|
10238
10301
|
*
|
|
10239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-iife.md
|
|
10240
10303
|
*/
|
|
10241
10304
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
10242
10305
|
/**
|
|
10243
10306
|
* Disallow unreadable `new` expressions.
|
|
10244
10307
|
*
|
|
10245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-new-expression.md
|
|
10246
10309
|
*/
|
|
10247
10310
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
10248
10311
|
/**
|
|
10249
10312
|
* Disallow unreadable object destructuring.
|
|
10250
10313
|
*
|
|
10251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
10252
10315
|
*/
|
|
10253
10316
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
10254
10317
|
/**
|
|
10255
10318
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
10256
10319
|
*
|
|
10257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
10258
10321
|
*/
|
|
10259
10322
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
10260
10323
|
/**
|
|
10261
10324
|
* Disallow unsafe DOM HTML APIs.
|
|
10262
10325
|
*
|
|
10263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-dom-html.md
|
|
10264
10327
|
*/
|
|
10265
10328
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
10266
10329
|
/**
|
|
10267
10330
|
* Disallow reading `.value` from `Promise.allSettled()` results without a
|
|
10268
10331
|
* fulfilled status guard.
|
|
10269
10332
|
*
|
|
10270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
10271
10334
|
*/
|
|
10272
10335
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
10273
10336
|
/**
|
|
10274
10337
|
* Disallow unsafe values as property keys.
|
|
10275
10338
|
*
|
|
10276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-property-key.md
|
|
10277
10340
|
*/
|
|
10278
10341
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
10279
10342
|
/**
|
|
10280
10343
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite`
|
|
10281
10344
|
* APIs.
|
|
10282
10345
|
*
|
|
10283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
10284
10347
|
*/
|
|
10285
10348
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
10286
10349
|
/**
|
|
10287
10350
|
* Disallow non-literal replacement values in `String#replace()` and
|
|
10288
10351
|
* `String#replaceAll()`.
|
|
10289
10352
|
*
|
|
10290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
10291
10354
|
*/
|
|
10292
10355
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
10293
10356
|
/**
|
|
10294
|
-
* Disallow
|
|
10357
|
+
* Disallow unscoped CSS nesting selectors.
|
|
10295
10358
|
*
|
|
10296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unscoped-css-nesting-selector.md
|
|
10360
|
+
*/
|
|
10361
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<UnicornNoUnscopedCssNestingSelector>;
|
|
10362
|
+
/**
|
|
10363
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more
|
|
10364
|
+
* cases.
|
|
10365
|
+
*
|
|
10366
|
+
* @deprecated
|
|
10367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
10297
10368
|
*/
|
|
10298
10369
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
10370
|
+
/**
|
|
10371
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
10372
|
+
*
|
|
10373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
10374
|
+
*/
|
|
10375
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
10376
|
+
/**
|
|
10377
|
+
* Disallow discarding lazy iterator helpers.
|
|
10378
|
+
*
|
|
10379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unused-iterator-helper.md
|
|
10380
|
+
*/
|
|
10381
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
10299
10382
|
/**
|
|
10300
10383
|
* Disallow unused object properties.
|
|
10301
10384
|
*
|
|
10302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unused-properties.md
|
|
10303
10386
|
*/
|
|
10304
10387
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
10305
10388
|
/**
|
|
10306
10389
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
10307
10390
|
*
|
|
10308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-boolean-cast.md
|
|
10309
10392
|
*/
|
|
10310
10393
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
10311
10394
|
/**
|
|
10312
10395
|
* Disallow useless type coercions of values that are already of the target
|
|
10313
10396
|
* type.
|
|
10314
10397
|
*
|
|
10315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-coercion.md
|
|
10316
10399
|
*/
|
|
10317
10400
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
10318
10401
|
/**
|
|
10319
10402
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or
|
|
10320
10403
|
* `WeakMap`.
|
|
10321
10404
|
*
|
|
10322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-collection-argument.md
|
|
10323
10406
|
*/
|
|
10324
10407
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
10325
10408
|
/**
|
|
10326
10409
|
* Disallow useless compound assignments such as `x += 0`.
|
|
10327
10410
|
*
|
|
10328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-compound-assignment.md
|
|
10329
10412
|
*/
|
|
10330
10413
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
10331
10414
|
/**
|
|
10332
10415
|
* Disallow useless concatenation of literals.
|
|
10333
10416
|
*
|
|
10334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-concat.md
|
|
10335
10418
|
*/
|
|
10336
10419
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
10337
10420
|
/**
|
|
10338
10421
|
* Disallow useless `continue` statements.
|
|
10339
10422
|
*
|
|
10340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-continue.md
|
|
10341
10424
|
*/
|
|
10342
10425
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
10343
10426
|
/**
|
|
10344
10427
|
* Disallow unnecessary existence checks before deletion.
|
|
10345
10428
|
*
|
|
10346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-delete-check.md
|
|
10347
10430
|
*/
|
|
10348
10431
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
10349
10432
|
/**
|
|
10350
10433
|
* Disallow `else` after a statement that exits.
|
|
10351
10434
|
*
|
|
10352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-else.md
|
|
10353
10436
|
*/
|
|
10354
10437
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
10355
10438
|
/**
|
|
10356
10439
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
10357
10440
|
*
|
|
10358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
10359
10442
|
*/
|
|
10360
10443
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
10361
10444
|
/**
|
|
10362
10445
|
* Disallow useless fallback when spreading in object literals.
|
|
10363
10446
|
*
|
|
10364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
10365
10448
|
*/
|
|
10366
10449
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
10367
10450
|
/**
|
|
10368
10451
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
10369
10452
|
*
|
|
10370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
10371
10454
|
*/
|
|
10372
10455
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10373
10456
|
/**
|
|
10374
10457
|
* Disallow useless array length check.
|
|
10375
10458
|
*
|
|
10376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-length-check.md
|
|
10377
10460
|
*/
|
|
10378
10461
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
10379
10462
|
/**
|
|
10380
10463
|
* Disallow unnecessary operands in logical expressions involving boolean
|
|
10381
10464
|
* literals.
|
|
10382
10465
|
*
|
|
10383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-logical-operand.md
|
|
10384
10467
|
*/
|
|
10385
10468
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
10386
10469
|
/**
|
|
10387
10470
|
* Disallow useless overrides of class methods.
|
|
10388
10471
|
*
|
|
10389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-override.md
|
|
10390
10473
|
*/
|
|
10391
10474
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
10392
10475
|
/**
|
|
10393
10476
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions
|
|
10394
10477
|
* or promise callbacks
|
|
10395
10478
|
*
|
|
10396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
10397
10480
|
*/
|
|
10398
10481
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
10399
10482
|
/**
|
|
10400
10483
|
* Disallow redundant re-exports.
|
|
10401
10484
|
*
|
|
10402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-re-export.md
|
|
10403
10486
|
*/
|
|
10404
10487
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
10405
10488
|
/**
|
|
10406
10489
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
10407
10490
|
*
|
|
10408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-recursion.md
|
|
10409
10492
|
*/
|
|
10410
10493
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
10494
|
+
/**
|
|
10495
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
10496
|
+
*
|
|
10497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-set-construction.md
|
|
10498
|
+
*/
|
|
10499
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
10411
10500
|
/**
|
|
10412
10501
|
* Disallow unnecessary spread.
|
|
10413
10502
|
*
|
|
10414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-spread.md
|
|
10415
10504
|
*/
|
|
10416
10505
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
10417
10506
|
/**
|
|
10418
10507
|
* Disallow useless case in switch statements.
|
|
10419
10508
|
*
|
|
10420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-switch-case.md
|
|
10421
10510
|
*/
|
|
10422
10511
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
10423
10512
|
/**
|
|
10424
10513
|
* Disallow useless template literal expressions.
|
|
10425
10514
|
*
|
|
10426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-template-literals.md
|
|
10427
10516
|
*/
|
|
10428
10517
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
10429
10518
|
/**
|
|
10430
10519
|
* Disallow useless `undefined`.
|
|
10431
10520
|
*
|
|
10432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-undefined.md
|
|
10433
10522
|
*/
|
|
10434
10523
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
10524
|
+
/**
|
|
10525
|
+
* Disallow returning or exporting resources declared with `using`, including
|
|
10526
|
+
* through capturing functions.
|
|
10527
|
+
*
|
|
10528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-using-resource-escape.md
|
|
10529
|
+
*/
|
|
10530
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
10435
10531
|
/**
|
|
10436
10532
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
10437
10533
|
*
|
|
10438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
10439
10535
|
*/
|
|
10440
10536
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
10441
10537
|
/**
|
|
10442
10538
|
* Disallow number literals with zero fractions or dangling dots.
|
|
10443
10539
|
*
|
|
10444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-zero-fractions.md
|
|
10445
10541
|
*/
|
|
10446
10542
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
10447
10543
|
/**
|
|
10448
10544
|
* Enforce proper case for numeric literals.
|
|
10449
10545
|
*
|
|
10450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/number-literal-case.md
|
|
10451
10547
|
*/
|
|
10452
10548
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
10453
10549
|
/**
|
|
10454
10550
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
10455
10551
|
*
|
|
10456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/numeric-separators-style.md
|
|
10457
10553
|
*/
|
|
10458
10554
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
10459
10555
|
/**
|
|
10460
10556
|
* Require assignment operator shorthand where possible.
|
|
10461
10557
|
*
|
|
10462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/operator-assignment.md
|
|
10463
10559
|
*/
|
|
10464
10560
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
10465
10561
|
/**
|
|
10466
10562
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between
|
|
10467
10563
|
* signals.
|
|
10468
10564
|
*
|
|
10469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-abort-signal-any.md
|
|
10470
10566
|
*/
|
|
10471
10567
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
10472
10568
|
/**
|
|
10473
10569
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController`
|
|
10474
10570
|
* with `setTimeout()`.
|
|
10475
10571
|
*
|
|
10476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
10477
10573
|
*/
|
|
10478
10574
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
10479
10575
|
/**
|
|
10480
10576
|
* Prefer `.addEventListener()` and `.removeEventListener()` over
|
|
10481
10577
|
* `on`-functions.
|
|
10482
10578
|
*
|
|
10483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-add-event-listener.md
|
|
10484
10580
|
*/
|
|
10485
10581
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
10486
10582
|
/**
|
|
10487
10583
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
10488
10584
|
*
|
|
10489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
10490
10586
|
*/
|
|
10491
10587
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
10492
10588
|
/**
|
|
10493
10589
|
* Prefer `AggregateError` when throwing collected errors.
|
|
10494
10590
|
*
|
|
10495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-aggregate-error.md
|
|
10496
10592
|
*/
|
|
10497
10593
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
10498
10594
|
/**
|
|
10499
10595
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from
|
|
10500
10596
|
* `.filter(…)`.
|
|
10501
10597
|
*
|
|
10502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-find.md
|
|
10503
10599
|
*/
|
|
10504
10600
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
10505
10601
|
/**
|
|
10506
10602
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
10507
10603
|
*
|
|
10508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-flat.md
|
|
10509
10605
|
*/
|
|
10510
10606
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
10511
10607
|
/**
|
|
10512
10608
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
10513
10609
|
*
|
|
10514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-flat-map.md
|
|
10515
10611
|
*/
|
|
10516
10612
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10517
10613
|
/**
|
|
10518
|
-
* Prefer `Array.fromAsync()` over
|
|
10614
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
10519
10615
|
*
|
|
10520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-from-async.md
|
|
10521
10617
|
*/
|
|
10522
10618
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
10523
10619
|
/**
|
|
10524
10620
|
* Prefer using the `Array.from()` mapping function argument.
|
|
10525
10621
|
*
|
|
10526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-from-map.md
|
|
10527
10623
|
*/
|
|
10528
10624
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
10529
10625
|
/**
|
|
10530
10626
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
10531
10627
|
*
|
|
10532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-from-range.md
|
|
10533
10629
|
*/
|
|
10534
10630
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
10535
10631
|
/**
|
|
10536
10632
|
* Prefer `Array#{indexOf,lastIndexOf}()` over
|
|
10537
10633
|
* `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
10538
10634
|
*
|
|
10539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-index-of.md
|
|
10540
10636
|
*/
|
|
10541
10637
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
10542
10638
|
/**
|
|
10543
10639
|
* Prefer iterating an array directly or with `Array#keys()` over
|
|
10544
10640
|
* `Array#entries()` when the index or value is unused.
|
|
10545
10641
|
*
|
|
10546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
10547
10643
|
*/
|
|
10548
10644
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10549
10645
|
/**
|
|
10550
10646
|
* Prefer last-oriented array methods over `Array#reverse()` or
|
|
10551
10647
|
* `Array#toReversed()` followed by a method.
|
|
10552
10648
|
*
|
|
10553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-last-methods.md
|
|
10554
10650
|
*/
|
|
10555
10651
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
10556
10652
|
/**
|
|
10557
10653
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned
|
|
10558
10654
|
* array.
|
|
10559
10655
|
*
|
|
10560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-slice.md
|
|
10561
10657
|
*/
|
|
10562
10658
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
10563
10659
|
/**
|
|
10564
10660
|
* Prefer `.some(…)` over `.filter(…).length` check and
|
|
10565
10661
|
* `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
10566
10662
|
*
|
|
10567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-some.md
|
|
10568
10664
|
*/
|
|
10569
10665
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
10570
10666
|
/**
|
|
10571
10667
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
10572
10668
|
*
|
|
10573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-at.md
|
|
10574
10670
|
*/
|
|
10575
10671
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
10576
10672
|
/**
|
|
10577
10673
|
* Prefer `await` over promise chaining.
|
|
10578
10674
|
*
|
|
10579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-await.md
|
|
10580
10676
|
*/
|
|
10581
10677
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
10582
10678
|
/**
|
|
10583
10679
|
* Prefer `BigInt` literals over the constructor.
|
|
10584
10680
|
*
|
|
10585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-bigint-literals.md
|
|
10586
10682
|
*/
|
|
10587
10683
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
10588
10684
|
/**
|
|
10589
10685
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and
|
|
10590
10686
|
* `Blob#text()` over `FileReader#readAsText(…)`.
|
|
10591
10687
|
*
|
|
10592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
10593
10689
|
*/
|
|
10594
10690
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
10595
10691
|
/**
|
|
10596
10692
|
* Prefer block statements over IIFEs used only for scoping.
|
|
10597
10693
|
*
|
|
10598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
10599
10695
|
*/
|
|
10600
10696
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
10601
10697
|
/**
|
|
10602
10698
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
10603
10699
|
*
|
|
10604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-boolean-return.md
|
|
10605
10701
|
*/
|
|
10606
10702
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
10607
10703
|
/**
|
|
10608
10704
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
10609
10705
|
*
|
|
10610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-class-fields.md
|
|
10611
10707
|
*/
|
|
10612
10708
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
10613
10709
|
/**
|
|
10614
10710
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
10615
10711
|
*
|
|
10616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-classlist-toggle.md
|
|
10617
10713
|
*/
|
|
10618
10714
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
10619
10715
|
/**
|
|
10620
10716
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and
|
|
10621
10717
|
* `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
10622
10718
|
*
|
|
10623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-code-point.md
|
|
10624
10720
|
*/
|
|
10625
10721
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
10626
10722
|
/**
|
|
10627
|
-
* Prefer
|
|
10723
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
10724
|
+
*
|
|
10725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-combined-guards.md
|
|
10726
|
+
*/
|
|
10727
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<[]>;
|
|
10728
|
+
/**
|
|
10729
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop
|
|
10730
|
+
* body.
|
|
10628
10731
|
*
|
|
10629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-continue.md
|
|
10630
10733
|
*/
|
|
10631
10734
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
10632
10735
|
/**
|
|
10633
10736
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
10634
10737
|
*
|
|
10635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-date-now.md
|
|
10636
10739
|
*/
|
|
10637
10740
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
10638
10741
|
/**
|
|
10639
10742
|
* Prefer default parameters over reassignment.
|
|
10640
10743
|
*
|
|
10641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-default-parameters.md
|
|
10642
10745
|
*/
|
|
10643
10746
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
10644
10747
|
/**
|
|
10645
10748
|
* Prefer direct iteration over default iterator method calls.
|
|
10646
10749
|
*
|
|
10647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-direct-iteration.md
|
|
10648
10751
|
*/
|
|
10649
10752
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
10650
10753
|
/**
|
|
10651
10754
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource
|
|
10652
10755
|
* disposal.
|
|
10653
10756
|
*
|
|
10654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dispose.md
|
|
10655
10758
|
*/
|
|
10656
10759
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
10657
10760
|
/**
|
|
10658
10761
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
10659
10762
|
*
|
|
10660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-append.md
|
|
10661
10764
|
*/
|
|
10662
10765
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
10663
10766
|
/**
|
|
10664
10767
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
10665
10768
|
*
|
|
10666
10769
|
* @deprecated
|
|
10667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
10668
10771
|
*/
|
|
10669
10772
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
10670
10773
|
/**
|
|
10671
10774
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
10672
10775
|
*
|
|
10673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
10674
10777
|
*/
|
|
10675
10778
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
10676
10779
|
/**
|
|
10677
10780
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
10678
10781
|
*
|
|
10679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-remove.md
|
|
10680
10783
|
*/
|
|
10681
10784
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
10682
10785
|
/**
|
|
10683
|
-
* Prefer `.replaceChildren()` when
|
|
10786
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
10684
10787
|
*
|
|
10685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
10686
10789
|
*/
|
|
10687
10790
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
10688
10791
|
/**
|
|
10689
10792
|
* Prefer `.textContent` over `.innerText`.
|
|
10690
10793
|
*
|
|
10691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
10692
10795
|
*/
|
|
10693
10796
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
10694
10797
|
/**
|
|
10695
|
-
* Prefer early returns over
|
|
10798
|
+
* Prefer early returns over conditionals wrapping the remainder of the
|
|
10799
|
+
* function body.
|
|
10696
10800
|
*
|
|
10697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-early-return.md
|
|
10698
10802
|
*/
|
|
10699
10803
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
10700
10804
|
/**
|
|
10701
10805
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
10702
10806
|
*
|
|
10703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-else-if.md
|
|
10704
10808
|
*/
|
|
10705
10809
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
10706
10810
|
/**
|
|
10707
10811
|
* Prefer `Error.isError()` when checking for errors.
|
|
10708
10812
|
*
|
|
10709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-error-is-error.md
|
|
10710
10814
|
*/
|
|
10711
10815
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
10712
10816
|
/**
|
|
10713
10817
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
10714
10818
|
*
|
|
10715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-event-target.md
|
|
10716
10820
|
*/
|
|
10717
10821
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
10718
10822
|
/**
|
|
10719
10823
|
* Prefer explicit viewport units.
|
|
10720
10824
|
*
|
|
10721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
10722
10826
|
*/
|
|
10723
10827
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
10724
10828
|
/**
|
|
10725
10829
|
* Prefer `export…from` when re-exporting.
|
|
10726
10830
|
*
|
|
10727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-export-from.md
|
|
10728
10832
|
*/
|
|
10729
10833
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
10730
10834
|
/**
|
|
10731
10835
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
10732
10836
|
*
|
|
10733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
10734
10838
|
*/
|
|
10735
10839
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10736
10840
|
/**
|
|
10737
10841
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
10738
10842
|
*
|
|
10739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
10740
10844
|
*/
|
|
10741
10845
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
10742
10846
|
/**
|
|
10743
10847
|
* Prefer global numeric constants over `Number` static properties.
|
|
10744
10848
|
*
|
|
10745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-global-number-constants.md
|
|
10746
10850
|
*/
|
|
10747
10851
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
10748
10852
|
/**
|
|
10749
10853
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
10750
10854
|
*
|
|
10751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-global-this.md
|
|
10752
10856
|
*/
|
|
10753
10857
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
10754
10858
|
/**
|
|
10755
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
10859
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
10756
10860
|
*
|
|
10757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-group-by.md
|
|
10758
10862
|
*/
|
|
10759
10863
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
10760
10864
|
/**
|
|
10761
10865
|
* Prefer `.has()` when checking existence.
|
|
10762
10866
|
*
|
|
10763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-has-check.md
|
|
10764
10868
|
*/
|
|
10765
10869
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
10766
10870
|
/**
|
|
10767
10871
|
* Prefer moving code shared by all branches of an `if` statement out of the
|
|
10768
10872
|
* branches.
|
|
10769
10873
|
*
|
|
10770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
10771
10875
|
*/
|
|
10772
10876
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
10773
10877
|
/**
|
|
10774
10878
|
* Prefer HTTPS over HTTP.
|
|
10775
10879
|
*
|
|
10776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-https.md
|
|
10777
10881
|
*/
|
|
10778
10882
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
10779
10883
|
/**
|
|
10780
10884
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
10781
10885
|
*
|
|
10782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
10783
10887
|
*/
|
|
10784
10888
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
10785
10889
|
/**
|
|
10786
10890
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting
|
|
10787
10891
|
* file paths.
|
|
10788
10892
|
*
|
|
10789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-import-meta-properties.md
|
|
10790
10894
|
*/
|
|
10791
10895
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
10792
10896
|
/**
|
|
10793
10897
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and
|
|
10794
10898
|
* `Array#some()` when checking for existence or non-existence.
|
|
10795
10899
|
*
|
|
10796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-includes.md
|
|
10797
10901
|
*/
|
|
10798
10902
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
10799
10903
|
/**
|
|
10800
10904
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
10801
10905
|
*
|
|
10802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
10803
10907
|
*/
|
|
10804
10908
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
10805
10909
|
/**
|
|
10806
10910
|
* Prefer passing iterables directly to constructors instead of filling empty
|
|
10807
10911
|
* collections.
|
|
10808
10912
|
*
|
|
10809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
10810
10914
|
*/
|
|
10811
10915
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
10812
10916
|
/**
|
|
10813
10917
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
10814
10918
|
*
|
|
10815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-concat.md
|
|
10816
10920
|
*/
|
|
10817
10921
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
10818
10922
|
/**
|
|
10819
10923
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
10820
10924
|
*
|
|
10821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-helpers.md
|
|
10822
10926
|
*/
|
|
10823
10927
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
10824
10928
|
/**
|
|
10825
10929
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
10826
10930
|
*
|
|
10827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-to-array.md
|
|
10828
10932
|
*/
|
|
10829
10933
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10830
10934
|
/**
|
|
10831
10935
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
10832
10936
|
*
|
|
10833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
10834
10938
|
*/
|
|
10835
10939
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
10940
|
+
/**
|
|
10941
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
10942
|
+
*
|
|
10943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-zip.md
|
|
10944
|
+
*/
|
|
10945
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
10946
|
+
/**
|
|
10947
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
10948
|
+
*
|
|
10949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-json-import.md
|
|
10950
|
+
*/
|
|
10951
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
10836
10952
|
/**
|
|
10837
10953
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
10838
10954
|
*
|
|
10839
10955
|
* @deprecated
|
|
10840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
10841
10957
|
*/
|
|
10842
10958
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
10843
10959
|
/**
|
|
10844
10960
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
10845
10961
|
*
|
|
10846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
10847
10963
|
*/
|
|
10848
10964
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
10849
10965
|
/**
|
|
10850
10966
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
10851
10967
|
*
|
|
10852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-location-assign.md
|
|
10853
10969
|
*/
|
|
10854
10970
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
10855
10971
|
/**
|
|
10856
10972
|
* Prefer using a logical operator over a ternary.
|
|
10857
10973
|
*
|
|
10858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
10859
10975
|
*/
|
|
10860
10976
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
10861
10977
|
/**
|
|
10862
10978
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a
|
|
10863
10979
|
* map.
|
|
10864
10980
|
*
|
|
10865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-map-from-entries.md
|
|
10866
10982
|
*/
|
|
10867
10983
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
10868
10984
|
/**
|
|
10869
10985
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric
|
|
10870
10986
|
* range checks.
|
|
10871
10987
|
*
|
|
10872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-abs.md
|
|
10873
10989
|
*/
|
|
10874
10990
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
10875
10991
|
/**
|
|
10876
10992
|
* Prefer `Math` constants over their approximate numeric values.
|
|
10877
10993
|
*
|
|
10878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-constants.md
|
|
10879
10995
|
*/
|
|
10880
10996
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
10881
10997
|
/**
|
|
10882
10998
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
10883
10999
|
*
|
|
10884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-min-max.md
|
|
10885
11001
|
*/
|
|
10886
11002
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10887
11003
|
/**
|
|
10888
11004
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
10889
11005
|
*
|
|
10890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-trunc.md
|
|
10891
11007
|
*/
|
|
10892
11008
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
11009
|
+
/**
|
|
11010
|
+
* Prefer modern media feature range syntax.
|
|
11011
|
+
*
|
|
11012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-media-feature-range-syntax.md
|
|
11013
|
+
*/
|
|
11014
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
10893
11015
|
/**
|
|
10894
11016
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
10895
11017
|
*
|
|
10896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-minimal-ternary.md
|
|
10897
11019
|
*/
|
|
10898
11020
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
10899
11021
|
/**
|
|
10900
11022
|
* Prefer modern DOM APIs.
|
|
10901
11023
|
*
|
|
10902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
10903
11025
|
*/
|
|
10904
11026
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
10905
11027
|
/**
|
|
10906
11028
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
10907
11029
|
*
|
|
10908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-modern-math-apis.md
|
|
10909
11031
|
*/
|
|
10910
11032
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
10911
11033
|
/**
|
|
10912
11034
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
10913
11035
|
*
|
|
10914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-module.md
|
|
10915
11037
|
*/
|
|
10916
11038
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
10917
11039
|
/**
|
|
10918
11040
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol`
|
|
10919
11041
|
* directly.
|
|
10920
11042
|
*
|
|
10921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
10922
11044
|
*/
|
|
10923
11045
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
10924
11046
|
/**
|
|
10925
11047
|
* Prefer negative index over `.length - index` when possible.
|
|
10926
11048
|
*
|
|
10927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-negative-index.md
|
|
10928
11050
|
*/
|
|
10929
11051
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
10930
11052
|
/**
|
|
10931
11053
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
10932
11054
|
*
|
|
10933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-node-protocol.md
|
|
10934
11056
|
*/
|
|
10935
11057
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
10936
11058
|
/**
|
|
10937
11059
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
10938
11060
|
*
|
|
10939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-number-coercion.md
|
|
10940
11062
|
*/
|
|
10941
11063
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
10942
11064
|
/**
|
|
10943
11065
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
10944
11066
|
*
|
|
10945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
10946
11068
|
*/
|
|
10947
11069
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
10948
11070
|
/**
|
|
10949
11071
|
* Prefer `Number` static methods over global functions and optionally static
|
|
10950
11072
|
* properties over global constants.
|
|
10951
11073
|
*
|
|
10952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-number-properties.md
|
|
10953
11075
|
*/
|
|
10954
11076
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
10955
11077
|
/**
|
|
10956
11078
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()`
|
|
10957
11079
|
* calls.
|
|
10958
11080
|
*
|
|
10959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-define-properties.md
|
|
10960
11082
|
*/
|
|
10961
11083
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
10962
11084
|
/**
|
|
10963
11085
|
* Prefer object destructuring defaults over default object literals with
|
|
10964
11086
|
* spread.
|
|
10965
11087
|
*
|
|
10966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
10967
11089
|
*/
|
|
10968
11090
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
10969
11091
|
/**
|
|
10970
11092
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs
|
|
10971
11093
|
* into an object.
|
|
10972
11094
|
*
|
|
10973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-from-entries.md
|
|
10974
11096
|
*/
|
|
10975
11097
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
10976
11098
|
/**
|
|
10977
11099
|
* Prefer the most specific `Object` iterable method.
|
|
10978
11100
|
*
|
|
10979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
10980
11102
|
*/
|
|
10981
11103
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10982
11104
|
/**
|
|
10983
11105
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
10984
11106
|
*
|
|
10985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-observer-apis.md
|
|
10986
11108
|
*/
|
|
10987
11109
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
10988
11110
|
/**
|
|
10989
11111
|
* Prefer omitting the `catch` binding parameter.
|
|
10990
11112
|
*
|
|
10991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
10992
11114
|
*/
|
|
10993
11115
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
10994
11116
|
/**
|
|
10995
11117
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
10996
11118
|
*
|
|
10997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-path2d.md
|
|
10998
11120
|
*/
|
|
10999
11121
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
11000
11122
|
/**
|
|
11001
11123
|
* Prefer private class fields over the underscore-prefix convention.
|
|
11002
11124
|
*
|
|
11003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-private-class-fields.md
|
|
11004
11126
|
*/
|
|
11005
11127
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
11006
11128
|
/**
|
|
11007
11129
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
11008
11130
|
*
|
|
11009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-promise-try.md
|
|
11010
11132
|
*/
|
|
11011
11133
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
11012
11134
|
/**
|
|
11013
11135
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from
|
|
11014
11136
|
* `new Promise()`.
|
|
11015
11137
|
*
|
|
11016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
11017
11139
|
*/
|
|
11018
11140
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
11019
11141
|
/**
|
|
11020
11142
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
11021
11143
|
*
|
|
11022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-prototype-methods.md
|
|
11023
11145
|
*/
|
|
11024
11146
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
11025
11147
|
/**
|
|
11026
11148
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query
|
|
11027
11149
|
* methods.
|
|
11028
11150
|
*
|
|
11029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-query-selector.md
|
|
11030
11152
|
*/
|
|
11031
11153
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
11032
11154
|
/**
|
|
11033
11155
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and
|
|
11034
11156
|
* `setTimeout(…, 0)`.
|
|
11035
11157
|
*
|
|
11036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-queue-microtask.md
|
|
11037
11159
|
*/
|
|
11038
11160
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
11039
11161
|
/**
|
|
11040
11162
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
11041
11163
|
*
|
|
11042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-reflect-apply.md
|
|
11043
11165
|
*/
|
|
11044
11166
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
11045
11167
|
/**
|
|
11046
11168
|
* Prefer `RegExp.escape()` for escaping strings to use in regular
|
|
11047
11169
|
* expressions.
|
|
11048
11170
|
*
|
|
11049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-regexp-escape.md
|
|
11050
11172
|
*/
|
|
11051
11173
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
11052
11174
|
/**
|
|
11053
11175
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and
|
|
11054
11176
|
* `RegExp#exec()`.
|
|
11055
11177
|
*
|
|
11056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-regexp-test.md
|
|
11057
11179
|
*/
|
|
11058
11180
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
11059
11181
|
/**
|
|
11060
11182
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
11061
11183
|
*
|
|
11062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-response-static-json.md
|
|
11063
11185
|
*/
|
|
11064
11186
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
11065
11187
|
/**
|
|
11066
11188
|
* Prefer `:scope` when using element query selector methods.
|
|
11067
11189
|
*
|
|
11068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-scoped-selector.md
|
|
11069
11191
|
*/
|
|
11070
11192
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
11071
11193
|
/**
|
|
11072
11194
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or
|
|
11073
11195
|
* non-existence.
|
|
11074
11196
|
*
|
|
11075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-set-has.md
|
|
11076
11198
|
*/
|
|
11077
11199
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
11078
11200
|
/**
|
|
11079
11201
|
* Prefer `Set` methods for Set operations.
|
|
11080
11202
|
*
|
|
11081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-set-methods.md
|
|
11082
11204
|
*/
|
|
11083
11205
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
11084
11206
|
/**
|
|
11085
11207
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
11086
11208
|
*
|
|
11087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-set-size.md
|
|
11088
11210
|
*/
|
|
11089
11211
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
11090
11212
|
/**
|
|
11091
11213
|
* Prefer arrow function properties over methods with a single return.
|
|
11092
11214
|
*
|
|
11093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-short-arrow-method.md
|
|
11094
11216
|
*/
|
|
11095
11217
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
11096
11218
|
/**
|
|
11097
11219
|
* Prefer simple conditions first in logical expressions.
|
|
11098
11220
|
*
|
|
11099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-simple-condition-first.md
|
|
11100
11222
|
*/
|
|
11101
11223
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
11102
11224
|
/**
|
|
11103
11225
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
11104
11226
|
*
|
|
11105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
11106
11228
|
*/
|
|
11107
11229
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11108
11230
|
/**
|
|
11109
11231
|
* Prefer simplified conditions.
|
|
11110
11232
|
*
|
|
11111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-simplified-conditions.md
|
|
11112
11234
|
*/
|
|
11113
11235
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
11114
11236
|
/**
|
|
11115
11237
|
* Prefer a single `Array#some()` or `Array#every()` with a combined
|
|
11116
11238
|
* predicate.
|
|
11117
11239
|
*
|
|
11118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-array-predicate.md
|
|
11119
11241
|
*/
|
|
11120
11242
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
11121
11243
|
/**
|
|
11122
11244
|
* Enforce combining multiple `Array#{push,unshift}()`,
|
|
11123
11245
|
* `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
11124
11246
|
*
|
|
11125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-call.md
|
|
11126
11248
|
*/
|
|
11127
11249
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
11128
11250
|
/**
|
|
11129
11251
|
* Prefer a single object destructuring declaration per local const source.
|
|
11130
11252
|
*
|
|
11131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
11132
11254
|
*/
|
|
11133
11255
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
11134
11256
|
/**
|
|
11135
11257
|
* Enforce combining multiple single-character replacements into a single
|
|
11136
11258
|
* `String#replaceAll()` with a regular expression.
|
|
11137
11259
|
*
|
|
11138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-replace.md
|
|
11139
11261
|
*/
|
|
11140
11262
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
11141
11263
|
/**
|
|
11142
11264
|
* Prefer declaring variables in the smallest possible scope.
|
|
11143
11265
|
*
|
|
11144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-smaller-scope.md
|
|
11145
11267
|
*/
|
|
11146
11268
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
11147
11269
|
/**
|
|
11148
11270
|
* Prefer `String#split()` with a limit.
|
|
11149
11271
|
*
|
|
11150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-split-limit.md
|
|
11151
11273
|
*/
|
|
11152
11274
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
11153
11275
|
/**
|
|
11154
11276
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`,
|
|
11155
11277
|
* `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
11156
11278
|
*
|
|
11157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-spread.md
|
|
11158
11280
|
*/
|
|
11159
11281
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
11160
11282
|
/**
|
|
11161
11283
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
11162
11284
|
*
|
|
11163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-match-all.md
|
|
11164
11286
|
*/
|
|
11165
11287
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
11166
11288
|
/**
|
|
11167
11289
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string
|
|
11168
11290
|
* padding.
|
|
11169
11291
|
*
|
|
11170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
11171
11293
|
*/
|
|
11172
11294
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
11173
11295
|
/**
|
|
11174
11296
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
11175
11297
|
*
|
|
11176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-raw.md
|
|
11177
11299
|
*/
|
|
11178
11300
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
11179
11301
|
/**
|
|
11180
11302
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
11181
11303
|
*
|
|
11182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-repeat.md
|
|
11183
11305
|
*/
|
|
11184
11306
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
11185
11307
|
/**
|
|
11186
11308
|
* Prefer `String#replaceAll()` over regex searches with the global flag and
|
|
11187
11309
|
* `String#split().join()`.
|
|
11188
11310
|
*
|
|
11189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-replace-all.md
|
|
11190
11312
|
*/
|
|
11191
11313
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
11192
11314
|
/**
|
|
11193
11315
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
11194
11316
|
*
|
|
11195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-slice.md
|
|
11196
11318
|
*/
|
|
11197
11319
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
11198
11320
|
/**
|
|
11199
11321
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes,
|
|
11200
11322
|
* `String#indexOf() === 0`, and slice checks.
|
|
11201
11323
|
*
|
|
11202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
11203
11325
|
*/
|
|
11204
11326
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
11205
11327
|
/**
|
|
11206
11328
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` /
|
|
11207
11329
|
* `String#trimRight()`.
|
|
11208
11330
|
*
|
|
11209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
11210
11332
|
*/
|
|
11211
11333
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
11212
11334
|
/**
|
|
11213
11335
|
* Prefer using `structuredClone` to create a deep clone.
|
|
11214
11336
|
*
|
|
11215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-structured-clone.md
|
|
11216
11338
|
*/
|
|
11217
11339
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
11218
11340
|
/**
|
|
11219
11341
|
* Prefer `switch` over multiple `else-if`.
|
|
11220
11342
|
*
|
|
11221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-switch.md
|
|
11222
11344
|
*/
|
|
11223
11345
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
11224
11346
|
/**
|
|
11225
11347
|
* Prefer `Temporal` over `Date`.
|
|
11226
11348
|
*
|
|
11227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-temporal.md
|
|
11228
11350
|
*/
|
|
11229
11351
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
11352
|
+
/**
|
|
11353
|
+
* Prefer direct Temporal conversion methods.
|
|
11354
|
+
*
|
|
11355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-temporal-conversion.md
|
|
11356
|
+
*/
|
|
11357
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
11230
11358
|
/**
|
|
11231
11359
|
* Prefer ternary expressions over simple `if` statements that return or
|
|
11232
11360
|
* assign values.
|
|
11233
11361
|
*
|
|
11234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-ternary.md
|
|
11235
11363
|
*/
|
|
11236
11364
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
11237
11365
|
/**
|
|
11238
11366
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
11239
11367
|
*
|
|
11240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-then-catch.md
|
|
11241
11369
|
*/
|
|
11242
11370
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
11243
11371
|
/**
|
|
11244
11372
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
11245
11373
|
*
|
|
11246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-toggle-attribute.md
|
|
11247
11375
|
*/
|
|
11248
11376
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
11249
11377
|
/**
|
|
11250
11378
|
* Prefer top-level await over top-level promises and async function calls.
|
|
11251
11379
|
*
|
|
11252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-top-level-await.md
|
|
11253
11381
|
*/
|
|
11254
11382
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
11255
11383
|
/**
|
|
11256
11384
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
11257
11385
|
*
|
|
11258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-type-error.md
|
|
11259
11387
|
*/
|
|
11260
11388
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
11261
11389
|
/**
|
|
11262
11390
|
* Require type literals to be last in union types.
|
|
11263
11391
|
*
|
|
11264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-type-literal-last.md
|
|
11265
11393
|
*/
|
|
11266
11394
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
11267
11395
|
/**
|
|
11268
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
11269
|
-
*
|
|
11396
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy
|
|
11397
|
+
* base64 conversions and manual postprocessing.
|
|
11270
11398
|
*
|
|
11271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-uint8array-base64.md
|
|
11272
11400
|
*/
|
|
11273
11401
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
11402
|
+
/**
|
|
11403
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and
|
|
11404
|
+
* Buffer hex conversions.
|
|
11405
|
+
*
|
|
11406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-uint8array-hex.md
|
|
11407
|
+
*/
|
|
11408
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
11274
11409
|
/**
|
|
11275
11410
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
11276
11411
|
*
|
|
11277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-unary-minus.md
|
|
11278
11413
|
*/
|
|
11279
11414
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
11280
11415
|
/**
|
|
11281
11416
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
11282
11417
|
*
|
|
11283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
11284
11419
|
*/
|
|
11285
11420
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
11286
11421
|
/**
|
|
11287
11422
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for
|
|
11288
11423
|
* validation.
|
|
11289
11424
|
*
|
|
11290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-url-can-parse.md
|
|
11291
11426
|
*/
|
|
11292
11427
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
11293
11428
|
/**
|
|
11294
11429
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
11295
11430
|
*
|
|
11296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-url-href.md
|
|
11297
11432
|
*/
|
|
11298
11433
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
11299
11434
|
/**
|
|
11300
11435
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
11301
11436
|
*
|
|
11302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-url-search-parameters.md
|
|
11303
11438
|
*/
|
|
11304
11439
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
11305
11440
|
/**
|
|
11306
11441
|
* Prefer putting the condition in the while statement.
|
|
11307
11442
|
*
|
|
11308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-while-loop-condition.md
|
|
11309
11444
|
*/
|
|
11310
11445
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
11311
11446
|
/**
|
|
11312
11447
|
* Renamed to `unicorn/name-replacements`.
|
|
11313
11448
|
*
|
|
11314
11449
|
* @deprecated
|
|
11315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
11316
11451
|
*/
|
|
11317
11452
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
11318
11453
|
/**
|
|
11319
11454
|
* Enforce consistent relative URL style.
|
|
11320
11455
|
*
|
|
11321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/relative-url-style.md
|
|
11322
11457
|
*/
|
|
11323
11458
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
11324
11459
|
/**
|
|
11325
11460
|
* Enforce using the separator argument with `Array#join()`.
|
|
11326
11461
|
*
|
|
11327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-array-join-separator.md
|
|
11328
11463
|
*/
|
|
11329
11464
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
11330
11465
|
/**
|
|
11331
11466
|
* Require a compare function when calling `Array#sort()` or
|
|
11332
11467
|
* `Array#toSorted()`.
|
|
11333
11468
|
*
|
|
11334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-array-sort-compare.md
|
|
11335
11470
|
*/
|
|
11336
11471
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
11337
11472
|
/**
|
|
11338
11473
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
11339
11474
|
*
|
|
11340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-css-escape.md
|
|
11341
11476
|
*/
|
|
11342
11477
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
11343
11478
|
/**
|
|
11344
11479
|
* Require configured YAML frontmatter fields.
|
|
11345
11480
|
*
|
|
11346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-frontmatter-fields.md
|
|
11347
11482
|
*/
|
|
11348
11483
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
11349
11484
|
/**
|
|
11350
11485
|
* Require non-empty module attributes for imports and exports
|
|
11351
11486
|
*
|
|
11352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-module-attributes.md
|
|
11353
11488
|
*/
|
|
11354
11489
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
11355
11490
|
/**
|
|
11356
11491
|
* Require non-empty specifier list in import and export statements.
|
|
11357
11492
|
*
|
|
11358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-module-specifiers.md
|
|
11359
11494
|
*/
|
|
11360
11495
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
11361
11496
|
/**
|
|
11362
11497
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
11363
11498
|
*
|
|
11364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
11365
11500
|
*/
|
|
11366
11501
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
11367
11502
|
/**
|
|
11368
11503
|
* Require passive event listeners for high-frequency events.
|
|
11369
11504
|
*
|
|
11370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-passive-events.md
|
|
11371
11506
|
*/
|
|
11372
11507
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
11373
11508
|
/**
|
|
11374
11509
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
11375
11510
|
*
|
|
11376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-post-message-target-origin.md
|
|
11377
11512
|
*/
|
|
11378
11513
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
11379
11514
|
/**
|
|
11380
11515
|
* Require boolean-returning Proxy traps to return booleans.
|
|
11381
11516
|
*
|
|
11382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
11383
11518
|
*/
|
|
11384
11519
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
11385
11520
|
/**
|
|
11386
11521
|
* Enforce a consistent style for single-line block comments.
|
|
11387
11522
|
*
|
|
11388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/single-line-block-comment-style.md
|
|
11389
11524
|
*/
|
|
11390
11525
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
11391
11526
|
/**
|
|
11392
11527
|
* Enforce better string content.
|
|
11393
11528
|
*
|
|
11394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/string-content.md
|
|
11395
11530
|
*/
|
|
11396
11531
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
11397
11532
|
/**
|
|
11398
11533
|
* Enforce consistent brace style for `case` clauses.
|
|
11399
11534
|
*
|
|
11400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/switch-case-braces.md
|
|
11401
11536
|
*/
|
|
11402
11537
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
11403
11538
|
/**
|
|
11404
11539
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case`
|
|
11405
11540
|
* clauses.
|
|
11406
11541
|
*
|
|
11407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/switch-case-break-position.md
|
|
11408
11543
|
*/
|
|
11409
11544
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
11410
11545
|
/**
|
|
11411
11546
|
* Fix whitespace-insensitive template indentation.
|
|
11412
11547
|
*
|
|
11413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/template-indent.md
|
|
11414
11549
|
*/
|
|
11415
11550
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
11416
11551
|
/**
|
|
11417
11552
|
* Enforce consistent case for text encoding identifiers.
|
|
11418
11553
|
*
|
|
11419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/text-encoding-identifier-case.md
|
|
11420
11555
|
*/
|
|
11421
11556
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
11422
11557
|
/**
|
|
11423
11558
|
* Require `new` when creating an error.
|
|
11424
11559
|
*
|
|
11425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/throw-new-error.md
|
|
11426
11561
|
*/
|
|
11427
11562
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
11428
11563
|
/**
|
|
11429
11564
|
* Limit the complexity of `try` blocks.
|
|
11430
11565
|
*
|
|
11431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/try-complexity.md
|
|
11432
11567
|
*/
|
|
11433
11568
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
11434
11569
|
/**
|
|
@@ -12026,10 +12161,12 @@ type EslintCommentsDisableEnablePair = [] | [{
|
|
|
12026
12161
|
type EslintCommentsNoRestrictedDisable = string[];
|
|
12027
12162
|
// ----- eslint-comments/no-use -----
|
|
12028
12163
|
type EslintCommentsNoUse = [] | [{
|
|
12029
|
-
|
|
12164
|
+
additionalDirectives?: string[];
|
|
12165
|
+
allow?: string[];
|
|
12030
12166
|
}];
|
|
12031
12167
|
// ----- eslint-comments/require-description -----
|
|
12032
12168
|
type EslintCommentsRequireDescription = [] | [{
|
|
12169
|
+
additionalDirectives?: string[];
|
|
12033
12170
|
ignore?: ('eslint' | 'eslint-disable' | 'eslint-disable-line' | 'eslint-disable-next-line' | 'eslint-enable' | 'eslint-env' | 'exported' | 'global' | 'globals')[];
|
|
12034
12171
|
}];
|
|
12035
12172
|
// ----- func-call-spacing -----
|
|
@@ -13076,6 +13213,22 @@ type JsdocTextEscaping = [] | [{
|
|
|
13076
13213
|
escapeHTML?: boolean;
|
|
13077
13214
|
escapeMarkdown?: boolean;
|
|
13078
13215
|
}];
|
|
13216
|
+
// ----- jsdoc/ts-ban-ts-comment -----
|
|
13217
|
+
type JsdocTsBanTsComment = [] | [{
|
|
13218
|
+
minimumDescriptionLength?: number;
|
|
13219
|
+
'ts-check'?: boolean | 'allow-with-description' | {
|
|
13220
|
+
descriptionFormat?: string;
|
|
13221
|
+
};
|
|
13222
|
+
'ts-expect-error'?: boolean | 'allow-with-description' | {
|
|
13223
|
+
descriptionFormat?: string;
|
|
13224
|
+
};
|
|
13225
|
+
'ts-ignore'?: boolean | 'allow-with-description' | {
|
|
13226
|
+
descriptionFormat?: string;
|
|
13227
|
+
};
|
|
13228
|
+
'ts-nocheck'?: boolean | 'allow-with-description' | {
|
|
13229
|
+
descriptionFormat?: string;
|
|
13230
|
+
};
|
|
13231
|
+
}];
|
|
13079
13232
|
// ----- jsdoc/ts-method-signature-style -----
|
|
13080
13233
|
type JsdocTsMethodSignatureStyle = [] | ['method' | 'property'] | ['method' | 'property', {
|
|
13081
13234
|
enableFixer?: boolean;
|
|
@@ -21039,6 +21192,9 @@ type UnicornFilenameCase = [] | [{
|
|
|
21039
21192
|
})[];
|
|
21040
21193
|
multipleFileExtensions?: boolean;
|
|
21041
21194
|
checkDirectories?: boolean;
|
|
21195
|
+
directoryRoots?: (string | {
|
|
21196
|
+
[k: string]: unknown | undefined;
|
|
21197
|
+
})[];
|
|
21042
21198
|
} | {
|
|
21043
21199
|
cases?: {
|
|
21044
21200
|
camelCase?: boolean;
|
|
@@ -21052,6 +21208,9 @@ type UnicornFilenameCase = [] | [{
|
|
|
21052
21208
|
})[];
|
|
21053
21209
|
multipleFileExtensions?: boolean;
|
|
21054
21210
|
checkDirectories?: boolean;
|
|
21211
|
+
directoryRoots?: (string | {
|
|
21212
|
+
[k: string]: unknown | undefined;
|
|
21213
|
+
})[];
|
|
21055
21214
|
}];
|
|
21056
21215
|
// ----- unicorn/id-match -----
|
|
21057
21216
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -21138,6 +21297,10 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
21138
21297
|
type UnicornNoArraySort = [] | [{
|
|
21139
21298
|
allowExpressionStatement?: boolean;
|
|
21140
21299
|
}];
|
|
21300
|
+
// ----- unicorn/no-deprecated-css-features -----
|
|
21301
|
+
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
21302
|
+
allow?: string[];
|
|
21303
|
+
}];
|
|
21141
21304
|
// ----- unicorn/no-empty-file -----
|
|
21142
21305
|
type UnicornNoEmptyFile = [] | [{
|
|
21143
21306
|
allowComments?: boolean;
|
|
@@ -21182,6 +21345,10 @@ type UnicornNoNull = [] | [{
|
|
|
21182
21345
|
type UnicornNoTypeofUndefined = [] | [{
|
|
21183
21346
|
checkGlobalVariables?: boolean;
|
|
21184
21347
|
}];
|
|
21348
|
+
// ----- unicorn/no-unknown-pseudo-selectors -----
|
|
21349
|
+
type UnicornNoUnknownPseudoSelectors = [] | [{
|
|
21350
|
+
allow?: string[];
|
|
21351
|
+
}];
|
|
21185
21352
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
21186
21353
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
21187
21354
|
targets?: string | string[] | {
|
|
@@ -21192,6 +21359,10 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
21192
21359
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
21193
21360
|
maximumIgnoredElements?: number;
|
|
21194
21361
|
}];
|
|
21362
|
+
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
21363
|
+
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
21364
|
+
scopingRootAtRules?: string[];
|
|
21365
|
+
}];
|
|
21195
21366
|
// ----- unicorn/no-useless-undefined -----
|
|
21196
21367
|
type UnicornNoUselessUndefined = [] | [{
|
|
21197
21368
|
checkArguments?: boolean;
|
|
@@ -21248,6 +21419,7 @@ type UnicornPreferAt = [] | [{
|
|
|
21248
21419
|
// ----- unicorn/prefer-continue -----
|
|
21249
21420
|
type UnicornPreferContinue = [] | [{
|
|
21250
21421
|
maximumStatements?: number;
|
|
21422
|
+
checkShortBodies?: boolean;
|
|
21251
21423
|
}];
|
|
21252
21424
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
21253
21425
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -21257,6 +21429,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
21257
21429
|
// ----- unicorn/prefer-early-return -----
|
|
21258
21430
|
type UnicornPreferEarlyReturn = [] | [{
|
|
21259
21431
|
maximumStatements?: number;
|
|
21432
|
+
checkShortBodies?: boolean;
|
|
21260
21433
|
}];
|
|
21261
21434
|
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
21262
21435
|
type UnicornPreferExplicitViewportUnits = [] | [{
|