@moso/eslint-config 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +401 -397
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -5313,2002 +5313,2002 @@ interface RuleOptions {
|
|
|
5313
5313
|
'toml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>;
|
|
5314
5314
|
/**
|
|
5315
5315
|
* Prefer better DOM traversal APIs.
|
|
5316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/better-dom-traversing.md
|
|
5317
5317
|
*/
|
|
5318
5318
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
5319
5319
|
/**
|
|
5320
5320
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
5321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
5322
5322
|
* @deprecated
|
|
5323
5323
|
*/
|
|
5324
5324
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
5325
5325
|
/**
|
|
5326
5326
|
* Enforce a specific parameter name in catch clauses.
|
|
5327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/catch-error-name.md
|
|
5328
5328
|
*/
|
|
5329
5329
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5330
5330
|
/**
|
|
5331
5331
|
* Enforce consistent class references in static methods.
|
|
5332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/class-reference-in-static-methods.md
|
|
5333
5333
|
*/
|
|
5334
5334
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
5335
5335
|
/**
|
|
5336
5336
|
* Enforce consistent spacing before and after commas in JSON and SOML.
|
|
5337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comma-spacing.md
|
|
5338
5338
|
*/
|
|
5339
5339
|
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
5340
5340
|
/**
|
|
5341
5341
|
* Enforce better comment content.
|
|
5342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comment-content.md
|
|
5343
5343
|
*/
|
|
5344
5344
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
5345
5345
|
/**
|
|
5346
5346
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
5347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-arrow-return-style.md
|
|
5348
5348
|
*/
|
|
5349
5349
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
5350
5350
|
/**
|
|
5351
5351
|
* Enforce consistent assertion style with `node:assert`.
|
|
5352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-assert.md
|
|
5353
5353
|
*/
|
|
5354
5354
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5355
5355
|
/**
|
|
5356
5356
|
* Enforce consistent naming for boolean names.
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-boolean-name.md
|
|
5358
5358
|
*/
|
|
5359
5359
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
5360
5360
|
/**
|
|
5361
5361
|
* Enforce consistent class member order.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-class-member-order.md
|
|
5363
5363
|
*/
|
|
5364
5364
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
5365
5365
|
/**
|
|
5366
5366
|
* Enforce consistent spelling of compound words in identifiers.
|
|
5367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-compound-words.md
|
|
5368
5368
|
*/
|
|
5369
5369
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
5370
5370
|
/**
|
|
5371
5371
|
* Enforce consistent conditional object spread style.
|
|
5372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
5373
5373
|
*/
|
|
5374
5374
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
5375
5375
|
/**
|
|
5376
5376
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-date-clone.md
|
|
5378
5378
|
*/
|
|
5379
5379
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5380
5380
|
/**
|
|
5381
5381
|
* Use destructured variables over properties.
|
|
5382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-destructuring.md
|
|
5383
5383
|
*/
|
|
5384
5384
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5385
5385
|
/**
|
|
5386
5386
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5388
5388
|
*/
|
|
5389
5389
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5390
5390
|
/**
|
|
5391
5391
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-existence-index-check.md
|
|
5393
5393
|
*/
|
|
5394
5394
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5395
5395
|
/**
|
|
5396
5396
|
* Enforce consistent decorator position on exported classes.
|
|
5397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-export-decorator-position.md
|
|
5398
5398
|
*/
|
|
5399
5399
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
5400
5400
|
/**
|
|
5401
5401
|
* Move function definitions to the highest possible scope.
|
|
5402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-scoping.md
|
|
5403
5403
|
*/
|
|
5404
5404
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5405
5405
|
/**
|
|
5406
5406
|
* Enforce function syntax by role.
|
|
5407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-style.md
|
|
5408
5408
|
*/
|
|
5409
5409
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
5410
5410
|
/**
|
|
5411
5411
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
5412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-json-file-read.md
|
|
5413
5413
|
*/
|
|
5414
5414
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
5415
5415
|
/**
|
|
5416
5416
|
* Enforce consistent optional chaining for same-base member access.
|
|
5417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-optional-chaining.md
|
|
5418
5418
|
*/
|
|
5419
5419
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
5420
5420
|
/**
|
|
5421
5421
|
* Enforce consistent style for escaping `${` in template literals.
|
|
5422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-template-literal-escape.md
|
|
5423
5423
|
*/
|
|
5424
5424
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
5425
5425
|
/**
|
|
5426
5426
|
* Enforce consistent labels on tuple type elements.
|
|
5427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-tuple-labels.md
|
|
5428
5428
|
*/
|
|
5429
5429
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
5430
5430
|
/**
|
|
5431
5431
|
* Enforce correct `Error` subclassing.
|
|
5432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/custom-error-definition.md
|
|
5433
5433
|
*/
|
|
5434
5434
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5435
5435
|
/**
|
|
5436
5436
|
* Enforce consistent default export declarations.
|
|
5437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/default-export-style.md
|
|
5438
5438
|
*/
|
|
5439
5439
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
5440
5440
|
/**
|
|
5441
5441
|
* Enforce consistent style for DOM element dataset access.
|
|
5442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/dom-node-dataset.md
|
|
5443
5443
|
*/
|
|
5444
5444
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
5445
5445
|
/**
|
|
5446
5446
|
* Enforce no spaces between braces.
|
|
5447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/empty-brace-spaces.md
|
|
5448
5448
|
*/
|
|
5449
5449
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5450
5450
|
/**
|
|
5451
5451
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/error-message.md
|
|
5453
5453
|
*/
|
|
5454
5454
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5455
5455
|
/**
|
|
5456
5456
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/escape-case.md
|
|
5458
5458
|
*/
|
|
5459
5459
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5460
5460
|
/**
|
|
5461
5461
|
* Add expiration conditions to TODO comments.
|
|
5462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/expiring-todo-comments.md
|
|
5463
5463
|
*/
|
|
5464
5464
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5465
5465
|
/**
|
|
5466
5466
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-length-check.md
|
|
5468
5468
|
*/
|
|
5469
5469
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5470
5470
|
/**
|
|
5471
5471
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
5472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-timer-delay.md
|
|
5473
5473
|
*/
|
|
5474
5474
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
5475
5475
|
/**
|
|
5476
5476
|
* Enforce a case style for filenames and directory names.
|
|
5477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/filename-case.md
|
|
5478
5478
|
*/
|
|
5479
5479
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5480
5480
|
/**
|
|
5481
5481
|
* Require identifiers to match a specified regular expression.
|
|
5482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/id-match.md
|
|
5483
5483
|
*/
|
|
5484
5484
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
5485
5485
|
/**
|
|
5486
5486
|
* Enforce specific import styles per module.
|
|
5487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/import-style.md
|
|
5488
5488
|
*/
|
|
5489
5489
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5490
5490
|
/**
|
|
5491
5491
|
* Enforce consistent indentation in JSON and CSS.
|
|
5492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/indent.md
|
|
5493
5493
|
*/
|
|
5494
5494
|
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
5495
5495
|
/**
|
|
5496
5496
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/isolated-functions.md
|
|
5498
5498
|
*/
|
|
5499
5499
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
5500
5500
|
/**
|
|
5501
5501
|
* Enforce a consistent style for optional loop sources.
|
|
5502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/iteration-fallback-style.md
|
|
5503
5503
|
*/
|
|
5504
5504
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
5505
5505
|
/**
|
|
5506
5506
|
* Enforce a case style for data keys.
|
|
5507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/key-name-casing.md
|
|
5508
5508
|
*/
|
|
5509
5509
|
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
5510
5510
|
/**
|
|
5511
5511
|
* Require or disallow logical assignment operator shorthand
|
|
5512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/logical-assignment-operators.md
|
|
5513
5513
|
*/
|
|
5514
5514
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
5515
5515
|
/**
|
|
5516
5516
|
* Limit the depth of nested calls.
|
|
5517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/max-nested-calls.md
|
|
5518
5518
|
*/
|
|
5519
5519
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
5520
5520
|
/**
|
|
5521
5521
|
* Enforce replacements for variable, property, and filenames.
|
|
5522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/name-replacements.md
|
|
5523
5523
|
*/
|
|
5524
5524
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
5525
5525
|
/**
|
|
5526
5526
|
* Enforce correct use of `new` for builtin constructors.
|
|
5527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/new-for-builtins.md
|
|
5528
5528
|
*/
|
|
5529
5529
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5530
5530
|
/**
|
|
5531
5531
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5533
5533
|
*/
|
|
5534
5534
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5535
5535
|
/**
|
|
5536
5536
|
* Disallow recursive access to `this` within getters and setters.
|
|
5537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accessor-recursion.md
|
|
5538
5538
|
*/
|
|
5539
5539
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5540
5540
|
/**
|
|
5541
5541
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
5542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
5543
5543
|
*/
|
|
5544
5544
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
5545
5545
|
/**
|
|
5546
5546
|
* Disallow anonymous functions and classes as the default export.
|
|
5547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-anonymous-default-export.md
|
|
5548
5548
|
*/
|
|
5549
5549
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5550
5550
|
/**
|
|
5551
5551
|
* Prevent passing a function reference directly to iterator methods.
|
|
5552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-callback-reference.md
|
|
5553
5553
|
*/
|
|
5554
5554
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
5555
5555
|
/**
|
|
5556
5556
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
5557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-concat-in-loop.md
|
|
5558
5558
|
*/
|
|
5559
5559
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
5560
5560
|
/**
|
|
5561
5561
|
* Disallow using reference values as `Array#fill()` values.
|
|
5562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
5563
5563
|
*/
|
|
5564
5564
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
5565
5565
|
/**
|
|
5566
5566
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
5567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-from-fill.md
|
|
5568
5568
|
*/
|
|
5569
5569
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
5570
5570
|
/**
|
|
5571
5571
|
* Disallow front-of-array mutation.
|
|
5572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-front-mutation.md
|
|
5573
5573
|
*/
|
|
5574
5574
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
5575
5575
|
/**
|
|
5576
5576
|
* Disallow using the `this` argument in array methods.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-method-this-argument.md
|
|
5578
5578
|
*/
|
|
5579
5579
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5580
5580
|
/**
|
|
5581
5581
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5583
5583
|
* @deprecated
|
|
5584
5584
|
*/
|
|
5585
5585
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5586
5586
|
/**
|
|
5587
5587
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reduce.md
|
|
5589
5589
|
*/
|
|
5590
5590
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5591
5591
|
/**
|
|
5592
5592
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reverse.md
|
|
5594
5594
|
*/
|
|
5595
5595
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5596
5596
|
/**
|
|
5597
5597
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort.md
|
|
5599
5599
|
*/
|
|
5600
5600
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5601
5601
|
/**
|
|
5602
5602
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
5603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
5604
5604
|
*/
|
|
5605
5605
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
5606
5606
|
/**
|
|
5607
5607
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
5608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-splice.md
|
|
5609
5609
|
*/
|
|
5610
5610
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
5611
5611
|
/**
|
|
5612
5612
|
* Disallow asterisk prefixes and shared indentation in multiline comments.
|
|
5613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
5614
5614
|
*/
|
|
5615
5615
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
5616
5616
|
/**
|
|
5617
5617
|
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
5618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-iterator-callback.md
|
|
5619
5619
|
*/
|
|
5620
5620
|
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
5621
5621
|
/**
|
|
5622
5622
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
5623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-promise-finally.md
|
|
5624
5624
|
*/
|
|
5625
5625
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
5626
5626
|
/**
|
|
5627
5627
|
* Disallow member access from await expression.
|
|
5628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-expression-member.md
|
|
5629
5629
|
*/
|
|
5630
5630
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5631
5631
|
/**
|
|
5632
5632
|
* Disallow using `await` in `Promise` method parameters.
|
|
5633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5634
5634
|
*/
|
|
5635
5635
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5636
5636
|
/**
|
|
5637
5637
|
* Disallow barrel files.
|
|
5638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-barrel-files.md
|
|
5639
5639
|
*/
|
|
5640
5640
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
5641
5641
|
/**
|
|
5642
5642
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
5643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-blob-to-file.md
|
|
5644
5644
|
*/
|
|
5645
5645
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
5646
5646
|
/**
|
|
5647
5647
|
* Disallow boolean-returning sort comparators.
|
|
5648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
5649
5649
|
*/
|
|
5650
5650
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
5651
5651
|
/**
|
|
5652
5652
|
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
5653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-break-in-nested-loop.md
|
|
5654
5654
|
*/
|
|
5655
5655
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
5656
5656
|
/**
|
|
5657
5657
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
5658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-canvas-to-image.md
|
|
5659
5659
|
*/
|
|
5660
5660
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
5661
5661
|
/**
|
|
5662
5662
|
* Disallow chained comparisons such as `a < b < c`.
|
|
5663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-chained-comparison.md
|
|
5664
5664
|
*/
|
|
5665
5665
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
5666
5666
|
/**
|
|
5667
5667
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
5668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-collection-bracket-access.md
|
|
5669
5669
|
*/
|
|
5670
5670
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
5671
5671
|
/**
|
|
5672
5672
|
* Disallow dynamic object property existence checks.
|
|
5673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-computed-property-existence-check.md
|
|
5674
5674
|
*/
|
|
5675
5675
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
5676
5676
|
/**
|
|
5677
5677
|
* Disallow conflicting CSS query and HTML form constraints.
|
|
5678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-conflicting-constraints.md
|
|
5679
5679
|
*/
|
|
5680
5680
|
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
5681
5681
|
/**
|
|
5682
5682
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
5683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-splice.md
|
|
5684
5684
|
*/
|
|
5685
5685
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
5686
5686
|
/**
|
|
5687
5687
|
* Disallow confusing uses of `Array#with()`.
|
|
5688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-with.md
|
|
5689
5689
|
*/
|
|
5690
5690
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
5691
5691
|
/**
|
|
5692
5692
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-console-spaces.md
|
|
5694
5694
|
*/
|
|
5695
5695
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5696
5696
|
/**
|
|
5697
5697
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
5698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-constant-zero-expression.md
|
|
5699
5699
|
*/
|
|
5700
5700
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
5701
5701
|
/**
|
|
5702
5702
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
5703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
5704
5704
|
*/
|
|
5705
5705
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
5706
5706
|
/**
|
|
5707
5707
|
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
5708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
5709
5709
|
* @deprecated
|
|
5710
5710
|
*/
|
|
5711
5711
|
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
5712
5712
|
/**
|
|
5713
5713
|
* Do not use `document.cookie` directly.
|
|
5714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-document-cookie.md
|
|
5715
5715
|
*/
|
|
5716
5716
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5717
5717
|
/**
|
|
5718
5718
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
5719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-double-comparison.md
|
|
5720
5720
|
*/
|
|
5721
5721
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
5722
5722
|
/**
|
|
5723
5723
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
5724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
5725
5725
|
* @deprecated
|
|
5726
5726
|
*/
|
|
5727
5727
|
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
5728
5728
|
/**
|
|
5729
5729
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
5730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
5731
5731
|
* @deprecated
|
|
5732
5732
|
*/
|
|
5733
5733
|
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
5734
5734
|
/**
|
|
5735
5735
|
* Disallow duplicate adjacent branches in if chains.
|
|
5736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-if-branches.md
|
|
5737
5737
|
*/
|
|
5738
5738
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
5739
5739
|
/**
|
|
5740
5740
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
5741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
5742
5742
|
*/
|
|
5743
5743
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
5744
5744
|
/**
|
|
5745
5745
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
5746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-loops.md
|
|
5747
5747
|
*/
|
|
5748
5748
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
5749
5749
|
/**
|
|
5750
5750
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
5751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-set-values.md
|
|
5752
5752
|
*/
|
|
5753
5753
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
5754
5754
|
/**
|
|
5755
5755
|
* Disallow empty files.
|
|
5756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-file.md
|
|
5757
5757
|
*/
|
|
5758
5758
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
5759
5759
|
/**
|
|
5760
5760
|
* Disallow empty link text in Markdown.
|
|
5761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-link-text.md
|
|
5762
5762
|
*/
|
|
5763
5763
|
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
5764
5764
|
/**
|
|
5765
5765
|
* Disallow assigning to built-in error properties.
|
|
5766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-error-property-assignment.md
|
|
5767
5767
|
*/
|
|
5768
5768
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5769
5769
|
/**
|
|
5770
5770
|
* Disallow exports in scripts.
|
|
5771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-exports-in-scripts.md
|
|
5772
5772
|
*/
|
|
5773
5773
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
5774
5774
|
/**
|
|
5775
5775
|
* Prefer `for…of` over the `forEach` method.
|
|
5776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-each.md
|
|
5777
5777
|
*/
|
|
5778
5778
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
5779
5779
|
/**
|
|
5780
5780
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-loop.md
|
|
5782
5782
|
*/
|
|
5783
5783
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5784
5784
|
/**
|
|
5785
5785
|
* Disallow assigning properties on the global object.
|
|
5786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-global-object-property-assignment.md
|
|
5787
5787
|
*/
|
|
5788
5788
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5789
5789
|
/**
|
|
5790
5790
|
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
5791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
5792
5792
|
* @deprecated
|
|
5793
5793
|
*/
|
|
5794
5794
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5795
5795
|
/**
|
|
5796
5796
|
* Disallow immediate mutation after assignment and initialization immediately after declaration.
|
|
5797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-immediate-mutation.md
|
|
5798
5798
|
*/
|
|
5799
5799
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
5800
5800
|
/**
|
|
5801
5801
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
5802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-impossible-length-comparison.md
|
|
5803
5803
|
*/
|
|
5804
5804
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
5805
5805
|
/**
|
|
5806
5806
|
* Disallow class accessors that hide an inherited getter or setter.
|
|
5807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
5808
5808
|
*/
|
|
5809
5809
|
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
5810
5810
|
/**
|
|
5811
5811
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
5812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-query-selector.md
|
|
5813
5813
|
*/
|
|
5814
5814
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
5815
5815
|
/**
|
|
5816
5816
|
* Disallow incorrect template literal interpolation syntax.
|
|
5817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
5818
5818
|
*/
|
|
5819
5819
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
5820
5820
|
/**
|
|
5821
5821
|
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
5822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
5823
5823
|
*/
|
|
5824
5824
|
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
5825
5825
|
/**
|
|
5826
5826
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5828
5828
|
* @deprecated
|
|
5829
5829
|
*/
|
|
5830
5830
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5831
5831
|
/**
|
|
5832
5832
|
* Disallow `instanceof` with built-in objects
|
|
5833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-instanceof-builtins.md
|
|
5834
5834
|
*/
|
|
5835
5835
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5836
5836
|
/**
|
|
5837
5837
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
5838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-argument-count.md
|
|
5839
5839
|
*/
|
|
5840
5840
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
5841
5841
|
/**
|
|
5842
5842
|
* Disallow invalid values for HTML boolean attributes.
|
|
5843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
5844
5844
|
*/
|
|
5845
5845
|
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
5846
5846
|
/**
|
|
5847
5847
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
5848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-character-comparison.md
|
|
5849
5849
|
*/
|
|
5850
5850
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
5851
5851
|
/**
|
|
5852
5852
|
* Disallow invalid DOM tokens.
|
|
5853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-dom-token.md
|
|
5854
5854
|
*/
|
|
5855
5855
|
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
5856
5856
|
/**
|
|
5857
5857
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5859
5859
|
*/
|
|
5860
5860
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5861
5861
|
/**
|
|
5862
5862
|
* Disallow invalid `accept` values on file inputs.
|
|
5863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
5864
5864
|
*/
|
|
5865
5865
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
5866
5866
|
/**
|
|
5867
5867
|
* Disallow invalid subresource integrity metadata.
|
|
5868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-integrity.md
|
|
5869
5869
|
*/
|
|
5870
5870
|
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
5871
5871
|
/**
|
|
5872
5872
|
* Disallow invalid or ignored Intl options.
|
|
5873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-intl-options.md
|
|
5874
5874
|
*/
|
|
5875
5875
|
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
5876
5876
|
/**
|
|
5877
5877
|
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
5878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
5879
5879
|
* @deprecated
|
|
5880
5880
|
*/
|
|
5881
5881
|
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
5882
5882
|
/**
|
|
5883
5883
|
* Disallow invalid property descriptors.
|
|
5884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
5885
5885
|
*/
|
|
5886
5886
|
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
5887
5887
|
/**
|
|
5888
5888
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5890
5890
|
*/
|
|
5891
5891
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5892
5892
|
/**
|
|
5893
5893
|
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
5894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-response-options.md
|
|
5895
5895
|
*/
|
|
5896
5896
|
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
5897
5897
|
/**
|
|
5898
5898
|
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
5899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-style-set-property.md
|
|
5900
5900
|
*/
|
|
5901
5901
|
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
5902
5902
|
/**
|
|
5903
5903
|
* Disallow statically known invalid Temporal arithmetic.
|
|
5904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
5905
5905
|
*/
|
|
5906
5906
|
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
5907
5907
|
/**
|
|
5908
5908
|
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
5909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
5910
5910
|
*/
|
|
5911
5911
|
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
5912
5912
|
/**
|
|
5913
5913
|
* Disallow invalid implementations of well-known symbol methods.
|
|
5914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
5915
5915
|
*/
|
|
5916
5916
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
5917
5917
|
/**
|
|
5918
5918
|
* Disallow `javascript:` URLs in Markdown.
|
|
5919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-javascript-url.md
|
|
5920
5920
|
*/
|
|
5921
5921
|
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
5922
5922
|
/**
|
|
5923
5923
|
* Disallow identifiers starting with `new` or `class`.
|
|
5924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-keyword-prefix.md
|
|
5925
5925
|
*/
|
|
5926
5926
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5927
5927
|
/**
|
|
5928
5928
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
5929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-current-target-access.md
|
|
5930
5930
|
*/
|
|
5931
5931
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
5932
5932
|
/**
|
|
5933
5933
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
5934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-event-control.md
|
|
5935
5935
|
*/
|
|
5936
5936
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
5937
5937
|
/**
|
|
5938
5938
|
* Disallow empty lines at the beginning of a file.
|
|
5939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-leading-empty-lines.md
|
|
5940
5940
|
*/
|
|
5941
5941
|
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
5942
5942
|
/**
|
|
5943
5943
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5945
5945
|
* @deprecated
|
|
5946
5946
|
*/
|
|
5947
5947
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5948
5948
|
/**
|
|
5949
5949
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-lonely-if.md
|
|
5951
5951
|
*/
|
|
5952
5952
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5953
5953
|
/**
|
|
5954
5954
|
* Disallow mutating a loop iterable during iteration.
|
|
5955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
5956
5956
|
*/
|
|
5957
5957
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
5958
5958
|
/**
|
|
5959
5959
|
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
5960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loss-of-precision.md
|
|
5961
5961
|
*/
|
|
5962
5962
|
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
5963
5963
|
/**
|
|
5964
5964
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5966
5966
|
*/
|
|
5967
5967
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5968
5968
|
/**
|
|
5969
5969
|
* Disallow manually wrapped comments.
|
|
5970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
5971
5971
|
*/
|
|
5972
5972
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
5973
5973
|
/**
|
|
5974
5974
|
* Disallow checking a Map key before accessing a different key.
|
|
5975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-mismatched-map-key.md
|
|
5976
5976
|
*/
|
|
5977
5977
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
5978
5978
|
/**
|
|
5979
5979
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
5980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-misrefactored-assignment.md
|
|
5981
5981
|
*/
|
|
5982
5982
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
5983
5983
|
/**
|
|
5984
5984
|
* Disallow references to missing local resources.
|
|
5985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-missing-local-resource.md
|
|
5986
5986
|
*/
|
|
5987
5987
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
5988
5988
|
/**
|
|
5989
5989
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
5990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
5991
5991
|
*/
|
|
5992
5992
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
5993
5993
|
/**
|
|
5994
5994
|
* Disallow named usage of default import and export.
|
|
5995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-named-default.md
|
|
5996
5996
|
*/
|
|
5997
5997
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5998
5998
|
/**
|
|
5999
5999
|
* Disallow negated array predicate calls.
|
|
6000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-array-predicate.md
|
|
6001
6001
|
*/
|
|
6002
6002
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6003
6003
|
/**
|
|
6004
6004
|
* Disallow negated comparisons.
|
|
6005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-comparison.md
|
|
6006
6006
|
*/
|
|
6007
6007
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6008
6008
|
/**
|
|
6009
6009
|
* Disallow negated conditions.
|
|
6010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-condition.md
|
|
6011
6011
|
*/
|
|
6012
6012
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6013
6013
|
/**
|
|
6014
6014
|
* Disallow negated expression in equality check.
|
|
6015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6016
6016
|
*/
|
|
6017
6017
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6018
6018
|
/**
|
|
6019
6019
|
* Disallow nested ternary expressions.
|
|
6020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nested-ternary.md
|
|
6021
6021
|
*/
|
|
6022
6022
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6023
6023
|
/**
|
|
6024
6024
|
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
6025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
6026
6026
|
* @deprecated
|
|
6027
6027
|
*/
|
|
6028
6028
|
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
6029
6029
|
/**
|
|
6030
6030
|
* Disallow `new Array()`.
|
|
6031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-array.md
|
|
6032
6032
|
*/
|
|
6033
6033
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6034
6034
|
/**
|
|
6035
6035
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-buffer.md
|
|
6037
6037
|
*/
|
|
6038
6038
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6039
6039
|
/**
|
|
6040
6040
|
* Disallow non-function values with function-style verb prefixes.
|
|
6041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6042
6042
|
*/
|
|
6043
6043
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6044
6044
|
/**
|
|
6045
6045
|
* Disallow non-standard properties on built-in objects.
|
|
6046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6047
6047
|
*/
|
|
6048
6048
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6049
6049
|
/**
|
|
6050
6050
|
* Disallow the use of the `null` literal.
|
|
6051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-null.md
|
|
6052
6052
|
*/
|
|
6053
6053
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6054
6054
|
/**
|
|
6055
6055
|
* Disallow the use of objects as default parameters.
|
|
6056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6057
6057
|
*/
|
|
6058
6058
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6059
6059
|
/**
|
|
6060
6060
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6062
6062
|
*/
|
|
6063
6063
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6064
6064
|
/**
|
|
6065
6065
|
* Disallow optional chaining on undeclared variables.
|
|
6066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6067
6067
|
*/
|
|
6068
6068
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6069
6069
|
/**
|
|
6070
6070
|
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
6071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
6072
6072
|
*/
|
|
6073
6073
|
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
6074
6074
|
/**
|
|
6075
6075
|
* Disallow `process.exit()`.
|
|
6076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-process-exit.md
|
|
6077
6077
|
*/
|
|
6078
6078
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6079
6079
|
/**
|
|
6080
6080
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-redundant-comparison.md
|
|
6082
6082
|
*/
|
|
6083
6083
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6084
6084
|
/**
|
|
6085
6085
|
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
6086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
6087
6087
|
* @deprecated
|
|
6088
6088
|
*/
|
|
6089
6089
|
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
6090
6090
|
/**
|
|
6091
6091
|
* Disallow repeating the same wrapper at every call to a function.
|
|
6092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-repeated-call-wrappers.md
|
|
6093
6093
|
*/
|
|
6094
6094
|
'unicorn/no-repeated-call-wrappers'?: Linter.RuleEntry<[]>;
|
|
6095
6095
|
/**
|
|
6096
6096
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-return-array-push.md
|
|
6098
6098
|
*/
|
|
6099
6099
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6100
6100
|
/**
|
|
6101
6101
|
* Disallow selector syntax in DOM names.
|
|
6102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-selector-as-dom-name.md
|
|
6103
6103
|
*/
|
|
6104
6104
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
6105
6105
|
/**
|
|
6106
6106
|
* Disallow shorthand properties that override related longhand properties.
|
|
6107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
6108
6108
|
*/
|
|
6109
6109
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
6110
6110
|
/**
|
|
6111
6111
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6113
6113
|
*/
|
|
6114
6114
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6115
6115
|
/**
|
|
6116
6116
|
* Disallow classes that only have static members.
|
|
6117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-static-only-class.md
|
|
6118
6118
|
*/
|
|
6119
6119
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6120
6120
|
/**
|
|
6121
6121
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-subtraction-comparison.md
|
|
6123
6123
|
*/
|
|
6124
6124
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6125
6125
|
/**
|
|
6126
6126
|
* Disallow `then` property.
|
|
6127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-thenable.md
|
|
6128
6128
|
*/
|
|
6129
6129
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6130
6130
|
/**
|
|
6131
6131
|
* Disallow assigning `this` to a variable.
|
|
6132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-assignment.md
|
|
6133
6133
|
*/
|
|
6134
6134
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6135
6135
|
/**
|
|
6136
6136
|
* Disallow `this` outside of classes.
|
|
6137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-outside-of-class.md
|
|
6138
6138
|
*/
|
|
6139
6139
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6140
6140
|
/**
|
|
6141
6141
|
* Disallow assigning to top-level variables from inside functions.
|
|
6142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6143
6143
|
*/
|
|
6144
6144
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6145
6145
|
/**
|
|
6146
6146
|
* Disallow top-level side effects in exported modules.
|
|
6147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-side-effects.md
|
|
6148
6148
|
*/
|
|
6149
6149
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<UnicornNoTopLevelSideEffects>;
|
|
6150
6150
|
/**
|
|
6151
6151
|
* Disallow `all` as a transition property.
|
|
6152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-transition-all.md
|
|
6153
6153
|
*/
|
|
6154
6154
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
6155
6155
|
/**
|
|
6156
6156
|
* Disallow comparing `undefined` using `typeof`.
|
|
6157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-typeof-undefined.md
|
|
6158
6158
|
*/
|
|
6159
6159
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6160
6160
|
/**
|
|
6161
6161
|
* Disallow referencing methods without calling them.
|
|
6162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-uncalled-method.md
|
|
6163
6163
|
*/
|
|
6164
6164
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6165
6165
|
/**
|
|
6166
6166
|
* Require class members to be declared.
|
|
6167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-undeclared-class-members.md
|
|
6168
6168
|
*/
|
|
6169
6169
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6170
6170
|
/**
|
|
6171
6171
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
6172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
6173
6173
|
* @deprecated
|
|
6174
6174
|
*/
|
|
6175
6175
|
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
6176
6176
|
/**
|
|
6177
6177
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
6178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
6179
6179
|
* @deprecated
|
|
6180
6180
|
*/
|
|
6181
6181
|
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
6182
6182
|
/**
|
|
6183
6183
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6185
6185
|
*/
|
|
6186
6186
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6187
6187
|
/**
|
|
6188
6188
|
* Disallow unnecessary use of `Array#flatMap()`.
|
|
6189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
6190
6190
|
*/
|
|
6191
6191
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6192
6192
|
/**
|
|
6193
6193
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6195
6195
|
*/
|
|
6196
6196
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6197
6197
|
/**
|
|
6198
6198
|
* Disallow awaiting non-promise values.
|
|
6199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-await.md
|
|
6200
6200
|
*/
|
|
6201
6201
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6202
6202
|
/**
|
|
6203
6203
|
* Disallow unnecessary comparisons against boolean literals.
|
|
6204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
6205
6205
|
*/
|
|
6206
6206
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6207
6207
|
/**
|
|
6208
6208
|
* Disallow arguments that match their parameter defaults.
|
|
6209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-default-arguments.md
|
|
6210
6210
|
*/
|
|
6211
6211
|
'unicorn/no-unnecessary-default-arguments'?: Linter.RuleEntry<[]>;
|
|
6212
6212
|
/**
|
|
6213
6213
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
6214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
6215
6215
|
*/
|
|
6216
6216
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6217
6217
|
/**
|
|
6218
6218
|
* Disallow unnecessary `globalThis` references.
|
|
6219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6220
6220
|
*/
|
|
6221
6221
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6222
6222
|
/**
|
|
6223
6223
|
* Disallow unnecessary nested ternary expressions.
|
|
6224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6225
6225
|
*/
|
|
6226
6226
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6227
6227
|
/**
|
|
6228
6228
|
* Disallow parameters that receive the same value at every call.
|
|
6229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-parameters.md
|
|
6230
6230
|
*/
|
|
6231
6231
|
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
6232
6232
|
/**
|
|
6233
6233
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6235
6235
|
*/
|
|
6236
6236
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6237
6237
|
/**
|
|
6238
6238
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6240
6240
|
*/
|
|
6241
6241
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6242
6242
|
/**
|
|
6243
6243
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-splice.md
|
|
6245
6245
|
*/
|
|
6246
6246
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6247
6247
|
/**
|
|
6248
6248
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
6249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
6250
6250
|
*/
|
|
6251
6251
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
6252
6252
|
/**
|
|
6253
6253
|
* Disallow unreadable array destructuring.
|
|
6254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6255
6255
|
*/
|
|
6256
6256
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6257
6257
|
/**
|
|
6258
6258
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
6260
6260
|
*/
|
|
6261
6261
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6262
6262
|
/**
|
|
6263
6263
|
* Disallow unreadable IIFEs.
|
|
6264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-iife.md
|
|
6265
6265
|
*/
|
|
6266
6266
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6267
6267
|
/**
|
|
6268
6268
|
* Disallow unreadable `new` expressions.
|
|
6269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6270
6270
|
*/
|
|
6271
6271
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6272
6272
|
/**
|
|
6273
6273
|
* Disallow unreadable object destructuring.
|
|
6274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6275
6275
|
*/
|
|
6276
6276
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6277
6277
|
/**
|
|
6278
6278
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6280
6280
|
*/
|
|
6281
6281
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6282
6282
|
/**
|
|
6283
6283
|
* Disallow unsafe DOM HTML APIs.
|
|
6284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6285
6285
|
*/
|
|
6286
6286
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6287
6287
|
/**
|
|
6288
6288
|
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
6289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
6290
6290
|
*/
|
|
6291
6291
|
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
6292
6292
|
/**
|
|
6293
6293
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
6294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
6295
6295
|
*/
|
|
6296
6296
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
6297
6297
|
/**
|
|
6298
6298
|
* Disallow unsafe values as property keys.
|
|
6299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-property-key.md
|
|
6300
6300
|
*/
|
|
6301
6301
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6302
6302
|
/**
|
|
6303
6303
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
6304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
6305
6305
|
*/
|
|
6306
6306
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
6307
6307
|
/**
|
|
6308
6308
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6310
6310
|
*/
|
|
6311
6311
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
6312
6312
|
/**
|
|
6313
6313
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
6314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
6315
6315
|
* @deprecated
|
|
6316
6316
|
*/
|
|
6317
6317
|
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
6318
6318
|
/**
|
|
6319
6319
|
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
6320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
6321
6321
|
* @deprecated
|
|
6322
6322
|
*/
|
|
6323
6323
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6324
6324
|
/**
|
|
6325
6325
|
* Disallow ignoring the return value of selected built-in methods.
|
|
6326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
6327
6327
|
*/
|
|
6328
6328
|
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
6329
6329
|
/**
|
|
6330
6330
|
* Disallow discarding lazy iterator helpers.
|
|
6331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-iterator-helper.md
|
|
6332
6332
|
*/
|
|
6333
6333
|
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
6334
6334
|
/**
|
|
6335
6335
|
* Disallow unused object properties.
|
|
6336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-properties.md
|
|
6337
6337
|
*/
|
|
6338
6338
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6339
6339
|
/**
|
|
6340
6340
|
* Disallow passing full URLs to `URLSearchParams`.
|
|
6341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-url-in-search-params.md
|
|
6342
6342
|
*/
|
|
6343
6343
|
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
6344
6344
|
/**
|
|
6345
6345
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
6346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-boolean-cast.md
|
|
6347
6347
|
*/
|
|
6348
6348
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
6349
6349
|
/**
|
|
6350
6350
|
* Disallow useless type coercions of values that are already of the target type.
|
|
6351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-coercion.md
|
|
6352
6352
|
*/
|
|
6353
6353
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
6354
6354
|
/**
|
|
6355
6355
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-collection-argument.md
|
|
6357
6357
|
*/
|
|
6358
6358
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6359
6359
|
/**
|
|
6360
6360
|
* Disallow useless compound assignments such as `x += 0`.
|
|
6361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-compound-assignment.md
|
|
6362
6362
|
*/
|
|
6363
6363
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
6364
6364
|
/**
|
|
6365
6365
|
* Disallow useless concatenation of literals.
|
|
6366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-concat.md
|
|
6367
6367
|
*/
|
|
6368
6368
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
6369
6369
|
/**
|
|
6370
6370
|
* Disallow useless `continue` statements.
|
|
6371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-continue.md
|
|
6372
6372
|
*/
|
|
6373
6373
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
6374
6374
|
/**
|
|
6375
6375
|
* Disallow unnecessary existence checks before deletion.
|
|
6376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-delete-check.md
|
|
6377
6377
|
*/
|
|
6378
6378
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
6379
6379
|
/**
|
|
6380
6380
|
* Disallow `else` after a statement that exits.
|
|
6381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-else.md
|
|
6382
6382
|
*/
|
|
6383
6383
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
6384
6384
|
/**
|
|
6385
6385
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6387
6387
|
*/
|
|
6388
6388
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6389
6389
|
/**
|
|
6390
6390
|
* Disallow useless fallback when spreading in object literals.
|
|
6391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6392
6392
|
*/
|
|
6393
6393
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6394
6394
|
/**
|
|
6395
6395
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
6396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
6397
6397
|
*/
|
|
6398
6398
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
6399
6399
|
/**
|
|
6400
6400
|
* Disallow useless array length check.
|
|
6401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-length-check.md
|
|
6402
6402
|
*/
|
|
6403
6403
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6404
6404
|
/**
|
|
6405
6405
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
6406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-logical-operand.md
|
|
6407
6407
|
*/
|
|
6408
6408
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
6409
6409
|
/**
|
|
6410
6410
|
* Disallow useless overrides of class methods.
|
|
6411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-override.md
|
|
6412
6412
|
*/
|
|
6413
6413
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
6414
6414
|
/**
|
|
6415
6415
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6417
6417
|
*/
|
|
6418
6418
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6419
6419
|
/**
|
|
6420
6420
|
* Disallow redundant re-exports.
|
|
6421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-re-export.md
|
|
6422
6422
|
*/
|
|
6423
6423
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
6424
6424
|
/**
|
|
6425
6425
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
6426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-recursion.md
|
|
6427
6427
|
*/
|
|
6428
6428
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
6429
6429
|
/**
|
|
6430
6430
|
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
6431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-set-construction.md
|
|
6432
6432
|
*/
|
|
6433
6433
|
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
6434
6434
|
/**
|
|
6435
6435
|
* Disallow unnecessary spread.
|
|
6436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-spread.md
|
|
6437
6437
|
*/
|
|
6438
6438
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6439
6439
|
/**
|
|
6440
6440
|
* Disallow useless case in switch statements.
|
|
6441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-switch-case.md
|
|
6442
6442
|
*/
|
|
6443
6443
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6444
6444
|
/**
|
|
6445
6445
|
* Disallow useless template literal expressions.
|
|
6446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-template-literals.md
|
|
6447
6447
|
*/
|
|
6448
6448
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
6449
6449
|
/**
|
|
6450
6450
|
* Disallow useless `undefined`.
|
|
6451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-undefined.md
|
|
6452
6452
|
*/
|
|
6453
6453
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6454
6454
|
/**
|
|
6455
6455
|
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
6456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-using-resource-escape.md
|
|
6457
6457
|
*/
|
|
6458
6458
|
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
6459
6459
|
/**
|
|
6460
6460
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
6461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
6462
6462
|
*/
|
|
6463
6463
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
6464
6464
|
/**
|
|
6465
6465
|
* Require consistent decimal numbers without redundant zeros.
|
|
6466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-zero-fractions.md
|
|
6467
6467
|
*/
|
|
6468
6468
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6469
6469
|
/**
|
|
6470
6470
|
* Enforce proper case for numeric literals.
|
|
6471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/number-literal-case.md
|
|
6472
6472
|
*/
|
|
6473
6473
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6474
6474
|
/**
|
|
6475
6475
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/numeric-separators-style.md
|
|
6477
6477
|
*/
|
|
6478
6478
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6479
6479
|
/**
|
|
6480
6480
|
* Require assignment operator shorthand where possible.
|
|
6481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/operator-assignment.md
|
|
6482
6482
|
*/
|
|
6483
6483
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
6484
6484
|
/**
|
|
6485
6485
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
6486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-any.md
|
|
6487
6487
|
*/
|
|
6488
6488
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
6489
6489
|
/**
|
|
6490
6490
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
6491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
6492
6492
|
*/
|
|
6493
6493
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
6494
6494
|
/**
|
|
6495
6495
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener.md
|
|
6497
6497
|
*/
|
|
6498
6498
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6499
6499
|
/**
|
|
6500
6500
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
6501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
6502
6502
|
*/
|
|
6503
6503
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
6504
6504
|
/**
|
|
6505
6505
|
* Prefer `AggregateError` when throwing collected errors.
|
|
6506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-aggregate-error.md
|
|
6507
6507
|
*/
|
|
6508
6508
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
6509
6509
|
/**
|
|
6510
6510
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-find.md
|
|
6512
6512
|
*/
|
|
6513
6513
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6514
6514
|
/**
|
|
6515
6515
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat.md
|
|
6517
6517
|
*/
|
|
6518
6518
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6519
6519
|
/**
|
|
6520
6520
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
6521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat-map.md
|
|
6522
6522
|
*/
|
|
6523
6523
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6524
6524
|
/**
|
|
6525
6525
|
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
6526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-async.md
|
|
6527
6527
|
*/
|
|
6528
6528
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
6529
6529
|
/**
|
|
6530
6530
|
* Prefer using the `Array.from()` mapping function argument.
|
|
6531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-map.md
|
|
6532
6532
|
*/
|
|
6533
6533
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
6534
6534
|
/**
|
|
6535
6535
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
6536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-range.md
|
|
6537
6537
|
*/
|
|
6538
6538
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
6539
6539
|
/**
|
|
6540
6540
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-index-of.md
|
|
6542
6542
|
*/
|
|
6543
6543
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6544
6544
|
/**
|
|
6545
6545
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
6546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
6547
6547
|
*/
|
|
6548
6548
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
6549
6549
|
/**
|
|
6550
6550
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
6551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-last-methods.md
|
|
6552
6552
|
*/
|
|
6553
6553
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
6554
6554
|
/**
|
|
6555
6555
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
6556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-slice.md
|
|
6557
6557
|
*/
|
|
6558
6558
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
6559
6559
|
/**
|
|
6560
6560
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-some.md
|
|
6562
6562
|
*/
|
|
6563
6563
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6564
6564
|
/**
|
|
6565
6565
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-at.md
|
|
6567
6567
|
*/
|
|
6568
6568
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6569
6569
|
/**
|
|
6570
6570
|
* Prefer `await` over promise chaining.
|
|
6571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-await.md
|
|
6572
6572
|
*/
|
|
6573
6573
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
6574
6574
|
/**
|
|
6575
6575
|
* Prefer `BigInt` literals over the constructor.
|
|
6576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-bigint-literals.md
|
|
6577
6577
|
*/
|
|
6578
6578
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6579
6579
|
/**
|
|
6580
6580
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6582
6582
|
*/
|
|
6583
6583
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6584
6584
|
/**
|
|
6585
6585
|
* Prefer block statements over IIFEs used only for scoping.
|
|
6586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
6587
6587
|
*/
|
|
6588
6588
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
6589
6589
|
/**
|
|
6590
6590
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
6591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-boolean-return.md
|
|
6592
6592
|
*/
|
|
6593
6593
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
6594
6594
|
/**
|
|
6595
6595
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-class-fields.md
|
|
6597
6597
|
*/
|
|
6598
6598
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6599
6599
|
/**
|
|
6600
6600
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6602
6602
|
*/
|
|
6603
6603
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6604
6604
|
/**
|
|
6605
6605
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-code-point.md
|
|
6607
6607
|
*/
|
|
6608
6608
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6609
6609
|
/**
|
|
6610
6610
|
* Prefer combining consecutive guards with identical exit statements.
|
|
6611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-combined-guards.md
|
|
6612
6612
|
*/
|
|
6613
6613
|
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
6614
6614
|
/**
|
|
6615
6615
|
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
6616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-continue.md
|
|
6617
6617
|
*/
|
|
6618
6618
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
6619
6619
|
/**
|
|
6620
6620
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-date-now.md
|
|
6622
6622
|
*/
|
|
6623
6623
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6624
6624
|
/**
|
|
6625
6625
|
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
6626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-default-parameters.md
|
|
6627
6627
|
*/
|
|
6628
6628
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<UnicornPreferDefaultParameters>;
|
|
6629
6629
|
/**
|
|
6630
6630
|
* Prefer direct iteration over default iterator method calls.
|
|
6631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-direct-iteration.md
|
|
6632
6632
|
*/
|
|
6633
6633
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
6634
6634
|
/**
|
|
6635
6635
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
6636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dispose.md
|
|
6637
6637
|
*/
|
|
6638
6638
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
6639
6639
|
/**
|
|
6640
6640
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
6641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-append.md
|
|
6642
6642
|
*/
|
|
6643
6643
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6644
6644
|
/**
|
|
6645
6645
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
6646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
6647
6647
|
* @deprecated
|
|
6648
6648
|
*/
|
|
6649
6649
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6650
6650
|
/**
|
|
6651
6651
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
6652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
6653
6653
|
*/
|
|
6654
6654
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
6655
6655
|
/**
|
|
6656
6656
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6658
6658
|
*/
|
|
6659
6659
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6660
6660
|
/**
|
|
6661
6661
|
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
6662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
6663
6663
|
*/
|
|
6664
6664
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
6665
6665
|
/**
|
|
6666
6666
|
* Prefer `.textContent` over `.innerText`.
|
|
6667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6668
6668
|
*/
|
|
6669
6669
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6670
6670
|
/**
|
|
6671
6671
|
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
6672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-early-return.md
|
|
6673
6673
|
*/
|
|
6674
6674
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
6675
6675
|
/**
|
|
6676
6676
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
6677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-else-if.md
|
|
6678
6678
|
*/
|
|
6679
6679
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
6680
6680
|
/**
|
|
6681
6681
|
* Prefer `Error.isError()` when checking for errors.
|
|
6682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-error-is-error.md
|
|
6683
6683
|
*/
|
|
6684
6684
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
6685
6685
|
/**
|
|
6686
6686
|
* Prefer escape sequences for irregular whitespace characters.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
6688
6688
|
*/
|
|
6689
6689
|
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
6690
6690
|
/**
|
|
6691
6691
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-event-target.md
|
|
6693
6693
|
*/
|
|
6694
6694
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6695
6695
|
/**
|
|
6696
6696
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
6698
6698
|
* @deprecated
|
|
6699
6699
|
*/
|
|
6700
6700
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
6701
6701
|
/**
|
|
6702
6702
|
* Prefer `export…from` when re-exporting.
|
|
6703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-export-from.md
|
|
6704
6704
|
*/
|
|
6705
6705
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6706
6706
|
/**
|
|
6707
6707
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
6708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
6709
6709
|
*/
|
|
6710
6710
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6711
6711
|
/**
|
|
6712
6712
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
6713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
6714
6714
|
*/
|
|
6715
6715
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
6716
6716
|
/**
|
|
6717
6717
|
* Prefer global numeric constants over `Number` static properties.
|
|
6718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-number-constants.md
|
|
6719
6719
|
*/
|
|
6720
6720
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
6721
6721
|
/**
|
|
6722
6722
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-this.md
|
|
6724
6724
|
*/
|
|
6725
6725
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6726
6726
|
/**
|
|
6727
6727
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
6728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-group-by.md
|
|
6729
6729
|
*/
|
|
6730
6730
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
6731
6731
|
/**
|
|
6732
6732
|
* Prefer `.has()` when checking existence.
|
|
6733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-has-check.md
|
|
6734
6734
|
*/
|
|
6735
6735
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
6736
6736
|
/**
|
|
6737
6737
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
6738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
6739
6739
|
*/
|
|
6740
6740
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
6741
6741
|
/**
|
|
6742
6742
|
* Prefer HTTPS over HTTP.
|
|
6743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-https.md
|
|
6744
6744
|
*/
|
|
6745
6745
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
6746
6746
|
/**
|
|
6747
6747
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
6748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
6749
6749
|
*/
|
|
6750
6750
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
6751
6751
|
/**
|
|
6752
6752
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6754
6754
|
*/
|
|
6755
6755
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6756
6756
|
/**
|
|
6757
6757
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes.md
|
|
6759
6759
|
*/
|
|
6760
6760
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6761
6761
|
/**
|
|
6762
6762
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
6763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
6764
6764
|
*/
|
|
6765
6765
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
6766
6766
|
/**
|
|
6767
6767
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
6768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
6769
6769
|
*/
|
|
6770
6770
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
6771
6771
|
/**
|
|
6772
6772
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
6773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-concat.md
|
|
6774
6774
|
*/
|
|
6775
6775
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
6776
6776
|
/**
|
|
6777
6777
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
6778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-helpers.md
|
|
6779
6779
|
*/
|
|
6780
6780
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
6781
6781
|
/**
|
|
6782
6782
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
6783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array.md
|
|
6784
6784
|
*/
|
|
6785
6785
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
6786
6786
|
/**
|
|
6787
6787
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
6788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
6789
6789
|
*/
|
|
6790
6790
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
6791
6791
|
/**
|
|
6792
6792
|
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
6793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-zip.md
|
|
6794
6794
|
*/
|
|
6795
6795
|
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
6796
6796
|
/**
|
|
6797
6797
|
* Prefer JSON imports over reading and parsing JSON files.
|
|
6798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-json-import.md
|
|
6799
6799
|
*/
|
|
6800
6800
|
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
6801
6801
|
/**
|
|
6802
6802
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
6803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
6804
6804
|
* @deprecated
|
|
6805
6805
|
*/
|
|
6806
6806
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6807
6807
|
/**
|
|
6808
6808
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
6809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6810
6810
|
*/
|
|
6811
6811
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6812
6812
|
/**
|
|
6813
6813
|
* Prefer literal printable ASCII characters over escape sequences.
|
|
6814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-literal-ascii.md
|
|
6815
6815
|
*/
|
|
6816
6816
|
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
6817
6817
|
/**
|
|
6818
6818
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
6819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-location-assign.md
|
|
6820
6820
|
*/
|
|
6821
6821
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
6822
6822
|
/**
|
|
6823
6823
|
* Prefer using a logical operator over a ternary.
|
|
6824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6825
6825
|
*/
|
|
6826
6826
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6827
6827
|
/**
|
|
6828
6828
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
6829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-map-from-entries.md
|
|
6830
6830
|
*/
|
|
6831
6831
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
6832
6832
|
/**
|
|
6833
6833
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
6834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-abs.md
|
|
6835
6835
|
*/
|
|
6836
6836
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
6837
6837
|
/**
|
|
6838
6838
|
* Prefer `Math` constants over their approximate numeric values.
|
|
6839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-constants.md
|
|
6840
6840
|
*/
|
|
6841
6841
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
6842
6842
|
/**
|
|
6843
6843
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-min-max.md
|
|
6845
6845
|
*/
|
|
6846
6846
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6847
6847
|
/**
|
|
6848
6848
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
6849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-trunc.md
|
|
6850
6850
|
*/
|
|
6851
6851
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6852
6852
|
/**
|
|
6853
6853
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
6854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
6855
6855
|
* @deprecated
|
|
6856
6856
|
*/
|
|
6857
6857
|
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
6858
6858
|
/**
|
|
6859
6859
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
6860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-minimal-ternary.md
|
|
6861
6861
|
*/
|
|
6862
6862
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
6863
6863
|
/**
|
|
6864
6864
|
* Prefer modern DOM APIs.
|
|
6865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6866
6866
|
*/
|
|
6867
6867
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6868
6868
|
/**
|
|
6869
6869
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6871
6871
|
*/
|
|
6872
6872
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6873
6873
|
/**
|
|
6874
6874
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-module.md
|
|
6876
6876
|
*/
|
|
6877
6877
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6878
6878
|
/**
|
|
6879
6879
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6881
6881
|
*/
|
|
6882
6882
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6883
6883
|
/**
|
|
6884
6884
|
* Prefer negative index over `.length - index` when possible.
|
|
6885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-negative-index.md
|
|
6886
6886
|
*/
|
|
6887
6887
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6888
6888
|
/**
|
|
6889
6889
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-node-protocol.md
|
|
6891
6891
|
*/
|
|
6892
6892
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6893
6893
|
/**
|
|
6894
6894
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
6895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-coercion.md
|
|
6896
6896
|
*/
|
|
6897
6897
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
6898
6898
|
/**
|
|
6899
6899
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
6900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
6901
6901
|
*/
|
|
6902
6902
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
6903
6903
|
/**
|
|
6904
6904
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
6905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-properties.md
|
|
6906
6906
|
*/
|
|
6907
6907
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6908
6908
|
/**
|
|
6909
6909
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
6910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-define-properties.md
|
|
6911
6911
|
*/
|
|
6912
6912
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
6913
6913
|
/**
|
|
6914
6914
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
6916
6916
|
*/
|
|
6917
6917
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
6918
6918
|
/**
|
|
6919
6919
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-from-entries.md
|
|
6921
6921
|
*/
|
|
6922
6922
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6923
6923
|
/**
|
|
6924
6924
|
* Prefer the most specific `Object` iterable method.
|
|
6925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
6926
6926
|
*/
|
|
6927
6927
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
6928
6928
|
/**
|
|
6929
6929
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
6930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-observer-apis.md
|
|
6931
6931
|
*/
|
|
6932
6932
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
6933
6933
|
/**
|
|
6934
6934
|
* Prefer omitting the `catch` binding parameter.
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6936
6936
|
*/
|
|
6937
6937
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6938
6938
|
/**
|
|
6939
6939
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
6940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-path2d.md
|
|
6941
6941
|
*/
|
|
6942
6942
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
6943
6943
|
/**
|
|
6944
6944
|
* Prefer private class fields over the underscore-prefix convention.
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-private-class-fields.md
|
|
6946
6946
|
*/
|
|
6947
6947
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
6948
6948
|
/**
|
|
6949
6949
|
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-static-methods.md
|
|
6951
6951
|
*/
|
|
6952
6952
|
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
6953
6953
|
/**
|
|
6954
6954
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-try.md
|
|
6956
6956
|
*/
|
|
6957
6957
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
6958
6958
|
/**
|
|
6959
6959
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
6961
6961
|
*/
|
|
6962
6962
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
6963
6963
|
/**
|
|
6964
6964
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-prototype-methods.md
|
|
6966
6966
|
*/
|
|
6967
6967
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6968
6968
|
/**
|
|
6969
6969
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-query-selector.md
|
|
6971
6971
|
*/
|
|
6972
6972
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
6973
6973
|
/**
|
|
6974
6974
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-queue-microtask.md
|
|
6976
6976
|
*/
|
|
6977
6977
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
6978
6978
|
/**
|
|
6979
6979
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-reflect-apply.md
|
|
6981
6981
|
*/
|
|
6982
6982
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6983
6983
|
/**
|
|
6984
6984
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-escape.md
|
|
6986
6986
|
*/
|
|
6987
6987
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
6988
6988
|
/**
|
|
6989
6989
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-test.md
|
|
6991
6991
|
*/
|
|
6992
6992
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6993
6993
|
/**
|
|
6994
6994
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-response-static-json.md
|
|
6996
6996
|
*/
|
|
6997
6997
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6998
6998
|
/**
|
|
6999
6999
|
* Prefer `:scope` when using element query selector methods.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-scoped-selector.md
|
|
7001
7001
|
*/
|
|
7002
7002
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7003
7003
|
/**
|
|
7004
7004
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-has.md
|
|
7006
7006
|
*/
|
|
7007
7007
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7008
7008
|
/**
|
|
7009
7009
|
* Prefer `Set` methods for Set operations.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-methods.md
|
|
7011
7011
|
*/
|
|
7012
7012
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7013
7013
|
/**
|
|
7014
7014
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-size.md
|
|
7016
7016
|
*/
|
|
7017
7017
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7018
7018
|
/**
|
|
7019
7019
|
* Prefer arrow function properties over methods with a single return.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7021
7021
|
*/
|
|
7022
7022
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
7023
7023
|
/**
|
|
7024
7024
|
* Prefer shorter alternatives to Unicode escape sequences.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
7026
7026
|
*/
|
|
7027
7027
|
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
7028
7028
|
/**
|
|
7029
7029
|
* Prefer simple conditions first in logical expressions.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7031
7031
|
*/
|
|
7032
7032
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7033
7033
|
/**
|
|
7034
7034
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7036
7036
|
*/
|
|
7037
7037
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7038
7038
|
/**
|
|
7039
7039
|
* Prefer simplified conditions.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simplified-conditions.md
|
|
7041
7041
|
*/
|
|
7042
7042
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
7043
7043
|
/**
|
|
7044
7044
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7046
7046
|
*/
|
|
7047
7047
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7048
7048
|
/**
|
|
7049
7049
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-call.md
|
|
7051
7051
|
*/
|
|
7052
7052
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7053
7053
|
/**
|
|
7054
7054
|
* Prefer a single object destructuring declaration per local const source.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7056
7056
|
*/
|
|
7057
7057
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7058
7058
|
/**
|
|
7059
7059
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-replace.md
|
|
7061
7061
|
*/
|
|
7062
7062
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7063
7063
|
/**
|
|
7064
|
-
* Prefer declaring variables in the smallest possible scope.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7064
|
+
* Prefer declaring variables and type aliases in the smallest possible scope.
|
|
7065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-smaller-scope.md
|
|
7066
7066
|
*/
|
|
7067
7067
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7068
7068
|
/**
|
|
7069
7069
|
* Prefer `String#split()` with a limit.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-split-limit.md
|
|
7071
7071
|
*/
|
|
7072
7072
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7073
7073
|
/**
|
|
7074
7074
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-spread.md
|
|
7076
7076
|
*/
|
|
7077
7077
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7078
7078
|
/**
|
|
7079
7079
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-match-all.md
|
|
7081
7081
|
*/
|
|
7082
7082
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7083
7083
|
/**
|
|
7084
7084
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7086
7086
|
*/
|
|
7087
7087
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7088
7088
|
/**
|
|
7089
7089
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-raw.md
|
|
7091
7091
|
*/
|
|
7092
7092
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7093
7093
|
/**
|
|
7094
7094
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-repeat.md
|
|
7096
7096
|
*/
|
|
7097
7097
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7098
7098
|
/**
|
|
7099
7099
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-replace-all.md
|
|
7101
7101
|
*/
|
|
7102
7102
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7103
7103
|
/**
|
|
7104
7104
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-slice.md
|
|
7106
7106
|
*/
|
|
7107
7107
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7108
7108
|
/**
|
|
7109
7109
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
7110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7111
7111
|
*/
|
|
7112
7112
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7113
7113
|
/**
|
|
7114
7114
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7116
7116
|
*/
|
|
7117
7117
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7118
7118
|
/**
|
|
7119
7119
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-structured-clone.md
|
|
7121
7121
|
*/
|
|
7122
7122
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7123
7123
|
/**
|
|
7124
7124
|
* Prefer `switch` over multiple `else-if`.
|
|
7125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-switch.md
|
|
7126
7126
|
*/
|
|
7127
7127
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7128
7128
|
/**
|
|
7129
7129
|
* Prefer `Temporal` over `Date`.
|
|
7130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal.md
|
|
7131
7131
|
*/
|
|
7132
7132
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7133
7133
|
/**
|
|
7134
7134
|
* Prefer direct Temporal conversion methods.
|
|
7135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal-conversion.md
|
|
7136
7136
|
*/
|
|
7137
7137
|
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
7138
7138
|
/**
|
|
7139
7139
|
* Prefer ternary expressions over simple `if` statements.
|
|
7140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-ternary.md
|
|
7141
7141
|
*/
|
|
7142
7142
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7143
7143
|
/**
|
|
7144
7144
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
7145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-then-catch.md
|
|
7146
7146
|
*/
|
|
7147
7147
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
7148
7148
|
/**
|
|
7149
7149
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-toggle-attribute.md
|
|
7151
7151
|
*/
|
|
7152
7152
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7153
7153
|
/**
|
|
7154
7154
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-top-level-await.md
|
|
7156
7156
|
*/
|
|
7157
7157
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7158
7158
|
/**
|
|
7159
7159
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-error.md
|
|
7161
7161
|
*/
|
|
7162
7162
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7163
7163
|
/**
|
|
7164
7164
|
* Require type literals to be last in union types.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-literal-last.md
|
|
7166
7166
|
*/
|
|
7167
7167
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7168
7168
|
/**
|
|
7169
7169
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7171
7171
|
*/
|
|
7172
7172
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7173
7173
|
/**
|
|
7174
7174
|
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-hex.md
|
|
7176
7176
|
*/
|
|
7177
7177
|
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
7178
7178
|
/**
|
|
7179
7179
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unary-minus.md
|
|
7181
7181
|
*/
|
|
7182
7182
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7183
7183
|
/**
|
|
7184
7184
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7186
7186
|
*/
|
|
7187
7187
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-can-parse.md
|
|
7191
7191
|
*/
|
|
7192
7192
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7193
7193
|
/**
|
|
7194
7194
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-href.md
|
|
7196
7196
|
*/
|
|
7197
7197
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7198
7198
|
/**
|
|
7199
7199
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
7200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-search-parameters.md
|
|
7201
7201
|
*/
|
|
7202
7202
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
7203
7203
|
/**
|
|
7204
7204
|
* Prefer putting the condition in the while statement.
|
|
7205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7206
7206
|
*/
|
|
7207
7207
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7208
7208
|
/**
|
|
7209
7209
|
* Renamed to `unicorn/name-replacements`.
|
|
7210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7211
7211
|
* @deprecated
|
|
7212
7212
|
*/
|
|
7213
7213
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7214
7214
|
/**
|
|
7215
7215
|
* Enforce consistent relative URL style.
|
|
7216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/relative-url-style.md
|
|
7217
7217
|
*/
|
|
7218
7218
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7219
7219
|
/**
|
|
7220
7220
|
* Enforce using the separator argument with `Array#join()`.
|
|
7221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-join-separator.md
|
|
7222
7222
|
*/
|
|
7223
7223
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7224
7224
|
/**
|
|
7225
7225
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-sort-compare.md
|
|
7227
7227
|
*/
|
|
7228
7228
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7229
7229
|
/**
|
|
7230
7230
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-css-escape.md
|
|
7232
7232
|
*/
|
|
7233
7233
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7234
7234
|
/**
|
|
7235
7235
|
* Require configured YAML frontmatter fields.
|
|
7236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-frontmatter-fields.md
|
|
7237
7237
|
*/
|
|
7238
7238
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
7239
7239
|
/**
|
|
7240
7240
|
* Require non-empty module attributes for imports and exports
|
|
7241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-attributes.md
|
|
7242
7242
|
*/
|
|
7243
7243
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7244
7244
|
/**
|
|
7245
7245
|
* Require non-empty specifier list in import and export statements.
|
|
7246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-specifiers.md
|
|
7247
7247
|
*/
|
|
7248
7248
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7249
7249
|
/**
|
|
7250
7250
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7252
7252
|
*/
|
|
7253
7253
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7254
7254
|
/**
|
|
7255
7255
|
* Require passive event listeners for high-frequency events.
|
|
7256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-passive-events.md
|
|
7257
7257
|
*/
|
|
7258
7258
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7259
7259
|
/**
|
|
7260
7260
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-post-message-target-origin.md
|
|
7262
7262
|
*/
|
|
7263
7263
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7264
7264
|
/**
|
|
7265
7265
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7267
7267
|
*/
|
|
7268
7268
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7269
7269
|
/**
|
|
7270
7270
|
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
7271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-text-decoder-streaming.md
|
|
7272
7272
|
*/
|
|
7273
7273
|
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
7274
7274
|
/**
|
|
7275
7275
|
* Enforce a consistent style for single-line block comments.
|
|
7276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/single-line-block-comment-style.md
|
|
7277
7277
|
*/
|
|
7278
7278
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
7279
7279
|
/**
|
|
7280
7280
|
* Enforce better string content.
|
|
7281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/string-content.md
|
|
7282
7282
|
*/
|
|
7283
7283
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7284
7284
|
/**
|
|
7285
7285
|
* Enforce consistent brace style for `case` clauses.
|
|
7286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-braces.md
|
|
7287
7287
|
*/
|
|
7288
7288
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7289
7289
|
/**
|
|
7290
7290
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-break-position.md
|
|
7292
7292
|
*/
|
|
7293
7293
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7294
7294
|
/**
|
|
7295
7295
|
* Fix whitespace-insensitive template indentation.
|
|
7296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/template-indent.md
|
|
7297
7297
|
*/
|
|
7298
7298
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7299
7299
|
/**
|
|
7300
7300
|
* Enforce consistent case for text encoding identifiers.
|
|
7301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7302
7302
|
*/
|
|
7303
7303
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7304
7304
|
/**
|
|
7305
7305
|
* Require `new` when creating an error.
|
|
7306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/throw-new-error.md
|
|
7307
7307
|
*/
|
|
7308
7308
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7309
7309
|
/**
|
|
7310
7310
|
* Limit the complexity of `try` blocks.
|
|
7311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/try-complexity.md
|
|
7312
7312
|
*/
|
|
7313
7313
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7314
7314
|
/**
|
|
@@ -20193,6 +20193,9 @@ type UnicornClassReferenceInStaticMethods = [] | [{
|
|
|
20193
20193
|
}];
|
|
20194
20194
|
// ----- unicorn/comment-content -----
|
|
20195
20195
|
type UnicornCommentContent = [] | [{
|
|
20196
|
+
ignore?: (string | {
|
|
20197
|
+
[k: string]: unknown | undefined;
|
|
20198
|
+
})[];
|
|
20196
20199
|
checkUniformCase?: boolean;
|
|
20197
20200
|
extendDefaultReplacements?: boolean;
|
|
20198
20201
|
replacements?: {
|
|
@@ -20465,6 +20468,7 @@ type UnicornNoNull = [] | [{
|
|
|
20465
20468
|
}];
|
|
20466
20469
|
// ----- unicorn/no-top-level-side-effects -----
|
|
20467
20470
|
type UnicornNoTopLevelSideEffects = [] | [{
|
|
20471
|
+
checkUnknownCalls?: boolean;
|
|
20468
20472
|
allow?: {
|
|
20469
20473
|
[k: string]: string[] | undefined;
|
|
20470
20474
|
};
|