@favorodera/eslint-config 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +489 -356
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -4326,1740 +4326,1841 @@ interface RuleOptions {
|
|
|
4326
4326
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
4327
4327
|
/**
|
|
4328
4328
|
* Prefer better DOM traversal APIs.
|
|
4329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/better-dom-traversing.md
|
|
4330
4330
|
*/
|
|
4331
4331
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
4332
4332
|
/**
|
|
4333
4333
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
4334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
4335
4335
|
* @deprecated
|
|
4336
4336
|
*/
|
|
4337
4337
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
4338
4338
|
/**
|
|
4339
4339
|
* Enforce a specific parameter name in catch clauses.
|
|
4340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/catch-error-name.md
|
|
4341
4341
|
*/
|
|
4342
4342
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4343
4343
|
/**
|
|
4344
4344
|
* Enforce consistent class references in static methods.
|
|
4345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/class-reference-in-static-methods.md
|
|
4346
4346
|
*/
|
|
4347
4347
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
4348
4348
|
/**
|
|
4349
4349
|
* Enforce better comment content.
|
|
4350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/comment-content.md
|
|
4351
4351
|
*/
|
|
4352
4352
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
4353
4353
|
/**
|
|
4354
4354
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
4355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-arrow-return-style.md
|
|
4356
4356
|
*/
|
|
4357
4357
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
4358
4358
|
/**
|
|
4359
4359
|
* Enforce consistent assertion style with `node:assert`.
|
|
4360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-assert.md
|
|
4361
4361
|
*/
|
|
4362
4362
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4363
4363
|
/**
|
|
4364
4364
|
* Enforce consistent naming for boolean names.
|
|
4365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-boolean-name.md
|
|
4366
4366
|
*/
|
|
4367
4367
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
4368
4368
|
/**
|
|
4369
4369
|
* Enforce consistent class member order.
|
|
4370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-class-member-order.md
|
|
4371
4371
|
*/
|
|
4372
4372
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
4373
4373
|
/**
|
|
4374
4374
|
* Enforce consistent spelling of compound words in identifiers.
|
|
4375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-compound-words.md
|
|
4376
4376
|
*/
|
|
4377
4377
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
4378
4378
|
/**
|
|
4379
4379
|
* Enforce consistent conditional object spread style.
|
|
4380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
4381
4381
|
*/
|
|
4382
4382
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
4383
4383
|
/**
|
|
4384
4384
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-date-clone.md
|
|
4386
4386
|
*/
|
|
4387
4387
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4388
4388
|
/**
|
|
4389
4389
|
* Use destructured variables over properties.
|
|
4390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-destructuring.md
|
|
4391
4391
|
*/
|
|
4392
4392
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4393
4393
|
/**
|
|
4394
4394
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4396
4396
|
*/
|
|
4397
4397
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4398
4398
|
/**
|
|
4399
4399
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-existence-index-check.md
|
|
4401
4401
|
*/
|
|
4402
4402
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
4403
4403
|
/**
|
|
4404
4404
|
* Enforce consistent decorator position on exported classes.
|
|
4405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-export-decorator-position.md
|
|
4406
4406
|
*/
|
|
4407
4407
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
4408
4408
|
/**
|
|
4409
4409
|
* Move function definitions to the highest possible scope.
|
|
4410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-scoping.md
|
|
4411
4411
|
*/
|
|
4412
4412
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4413
4413
|
/**
|
|
4414
4414
|
* Enforce function syntax by role.
|
|
4415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-style.md
|
|
4416
4416
|
*/
|
|
4417
4417
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
4418
4418
|
/**
|
|
4419
4419
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
4420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-json-file-read.md
|
|
4421
4421
|
*/
|
|
4422
4422
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
4423
4423
|
/**
|
|
4424
4424
|
* Enforce consistent optional chaining for same-base member access.
|
|
4425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-optional-chaining.md
|
|
4426
4426
|
*/
|
|
4427
4427
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
4428
4428
|
/**
|
|
4429
4429
|
* Enforce consistent style for escaping `${` in template literals.
|
|
4430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-template-literal-escape.md
|
|
4431
4431
|
*/
|
|
4432
4432
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
4433
4433
|
/**
|
|
4434
4434
|
* Enforce consistent labels on tuple type elements.
|
|
4435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-tuple-labels.md
|
|
4436
4436
|
*/
|
|
4437
4437
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
4438
4438
|
/**
|
|
4439
4439
|
* Enforce correct `Error` subclassing.
|
|
4440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/custom-error-definition.md
|
|
4441
4441
|
*/
|
|
4442
4442
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
4443
4443
|
/**
|
|
4444
4444
|
* Enforce consistent default export declarations.
|
|
4445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/default-export-style.md
|
|
4446
4446
|
*/
|
|
4447
4447
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
4448
4448
|
/**
|
|
4449
4449
|
* Enforce consistent style for DOM element dataset access.
|
|
4450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/dom-node-dataset.md
|
|
4451
4451
|
*/
|
|
4452
4452
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
4453
4453
|
/**
|
|
4454
4454
|
* Enforce no spaces between braces.
|
|
4455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/empty-brace-spaces.md
|
|
4456
4456
|
*/
|
|
4457
4457
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
4458
4458
|
/**
|
|
4459
4459
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/error-message.md
|
|
4461
4461
|
*/
|
|
4462
4462
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
4463
4463
|
/**
|
|
4464
4464
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/escape-case.md
|
|
4466
4466
|
*/
|
|
4467
4467
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4468
4468
|
/**
|
|
4469
4469
|
* Add expiration conditions to TODO comments.
|
|
4470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/expiring-todo-comments.md
|
|
4471
4471
|
*/
|
|
4472
4472
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4473
4473
|
/**
|
|
4474
4474
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-length-check.md
|
|
4476
4476
|
*/
|
|
4477
4477
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4478
4478
|
/**
|
|
4479
4479
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
4480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-timer-delay.md
|
|
4481
4481
|
*/
|
|
4482
4482
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
4483
4483
|
/**
|
|
4484
4484
|
* Enforce a case style for filenames and directory names.
|
|
4485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/filename-case.md
|
|
4486
4486
|
*/
|
|
4487
4487
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4488
4488
|
/**
|
|
4489
4489
|
* Require identifiers to match a specified regular expression.
|
|
4490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/id-match.md
|
|
4491
4491
|
*/
|
|
4492
4492
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
4493
4493
|
/**
|
|
4494
4494
|
* Enforce specific import styles per module.
|
|
4495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/import-style.md
|
|
4496
4496
|
*/
|
|
4497
4497
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
4498
4498
|
/**
|
|
4499
4499
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
4500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/isolated-functions.md
|
|
4501
4501
|
*/
|
|
4502
4502
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
4503
4503
|
/**
|
|
4504
4504
|
* Enforce a consistent style for optional loop sources.
|
|
4505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/iteration-fallback-style.md
|
|
4506
4506
|
*/
|
|
4507
4507
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
4508
4508
|
/**
|
|
4509
4509
|
* Require or disallow logical assignment operator shorthand
|
|
4510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/logical-assignment-operators.md
|
|
4511
4511
|
*/
|
|
4512
4512
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
4513
4513
|
/**
|
|
4514
4514
|
* Limit the depth of nested calls.
|
|
4515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/max-nested-calls.md
|
|
4516
4516
|
*/
|
|
4517
4517
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
4518
4518
|
/**
|
|
4519
4519
|
* Enforce replacements for variable, property, and filenames.
|
|
4520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/name-replacements.md
|
|
4521
4521
|
*/
|
|
4522
4522
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
4523
4523
|
/**
|
|
4524
4524
|
* Enforce correct use of `new` for builtin constructors.
|
|
4525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/new-for-builtins.md
|
|
4526
4526
|
*/
|
|
4527
4527
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
4528
4528
|
/**
|
|
4529
4529
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4531
4531
|
*/
|
|
4532
4532
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
4533
4533
|
/**
|
|
4534
4534
|
* Disallow recursive access to `this` within getters and setters.
|
|
4535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accessor-recursion.md
|
|
4536
4536
|
*/
|
|
4537
4537
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
4538
4538
|
/**
|
|
4539
4539
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
4540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
4541
4541
|
*/
|
|
4542
4542
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
4543
4543
|
/**
|
|
4544
4544
|
* Disallow anonymous functions and classes as the default export.
|
|
4545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-anonymous-default-export.md
|
|
4546
4546
|
*/
|
|
4547
4547
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
4548
4548
|
/**
|
|
4549
4549
|
* Prevent passing a function reference directly to iterator methods.
|
|
4550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-callback-reference.md
|
|
4551
4551
|
*/
|
|
4552
4552
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
4553
4553
|
/**
|
|
4554
4554
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
4555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-concat-in-loop.md
|
|
4556
4556
|
*/
|
|
4557
4557
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
4558
4558
|
/**
|
|
4559
4559
|
* Disallow using reference values as `Array#fill()` values.
|
|
4560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
4561
4561
|
*/
|
|
4562
4562
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
4563
4563
|
/**
|
|
4564
4564
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
4565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-from-fill.md
|
|
4566
4566
|
*/
|
|
4567
4567
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
4568
4568
|
/**
|
|
4569
4569
|
* Disallow front-of-array mutation.
|
|
4570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-front-mutation.md
|
|
4571
4571
|
*/
|
|
4572
4572
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
4573
4573
|
/**
|
|
4574
4574
|
* Disallow using the `this` argument in array methods.
|
|
4575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-method-this-argument.md
|
|
4576
4576
|
*/
|
|
4577
4577
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
4578
4578
|
/**
|
|
4579
4579
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
4580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
4581
4581
|
* @deprecated
|
|
4582
4582
|
*/
|
|
4583
4583
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
4584
4584
|
/**
|
|
4585
4585
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reduce.md
|
|
4587
4587
|
*/
|
|
4588
4588
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
4589
4589
|
/**
|
|
4590
4590
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
4591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reverse.md
|
|
4592
4592
|
*/
|
|
4593
4593
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
4594
4594
|
/**
|
|
4595
4595
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
4596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort.md
|
|
4597
4597
|
*/
|
|
4598
4598
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
4599
4599
|
/**
|
|
4600
4600
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
4601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
4602
4602
|
*/
|
|
4603
4603
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
4604
4604
|
/**
|
|
4605
4605
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
4606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-splice.md
|
|
4607
4607
|
*/
|
|
4608
4608
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
4609
4609
|
/**
|
|
4610
4610
|
* Disallow asterisk prefixes in documentation comments.
|
|
4611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
4612
4612
|
*/
|
|
4613
4613
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
4614
|
+
/**
|
|
4615
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
4616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-iterator-callback.md
|
|
4617
|
+
*/
|
|
4618
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
4614
4619
|
/**
|
|
4615
4620
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
4616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-promise-finally.md
|
|
4617
4622
|
*/
|
|
4618
4623
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
4619
4624
|
/**
|
|
4620
4625
|
* Disallow member access from await expression.
|
|
4621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-expression-member.md
|
|
4622
4627
|
*/
|
|
4623
4628
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
4624
4629
|
/**
|
|
4625
4630
|
* Disallow using `await` in `Promise` method parameters.
|
|
4626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4627
4632
|
*/
|
|
4628
4633
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4629
4634
|
/**
|
|
4630
4635
|
* Disallow barrel files.
|
|
4631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-barrel-files.md
|
|
4632
4637
|
*/
|
|
4633
4638
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
4634
4639
|
/**
|
|
4635
4640
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
4636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-blob-to-file.md
|
|
4637
4642
|
*/
|
|
4638
4643
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
4639
4644
|
/**
|
|
4640
4645
|
* Disallow boolean-returning sort comparators.
|
|
4641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
4642
4647
|
*/
|
|
4643
4648
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
4644
4649
|
/**
|
|
4645
|
-
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
4646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4650
|
+
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
4651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-break-in-nested-loop.md
|
|
4647
4652
|
*/
|
|
4648
|
-
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<
|
|
4653
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
4649
4654
|
/**
|
|
4650
4655
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
4651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-canvas-to-image.md
|
|
4652
4657
|
*/
|
|
4653
4658
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
4654
4659
|
/**
|
|
4655
4660
|
* Disallow chained comparisons such as `a < b < c`.
|
|
4656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-chained-comparison.md
|
|
4657
4662
|
*/
|
|
4658
4663
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
4659
4664
|
/**
|
|
4660
4665
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
4661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-collection-bracket-access.md
|
|
4662
4667
|
*/
|
|
4663
4668
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
4664
4669
|
/**
|
|
4665
4670
|
* Disallow dynamic object property existence checks.
|
|
4666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-computed-property-existence-check.md
|
|
4667
4672
|
*/
|
|
4668
4673
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
4669
4674
|
/**
|
|
4670
4675
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
4671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-splice.md
|
|
4672
4677
|
*/
|
|
4673
4678
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
4674
4679
|
/**
|
|
4675
4680
|
* Disallow confusing uses of `Array#with()`.
|
|
4676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-with.md
|
|
4677
4682
|
*/
|
|
4678
4683
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
4679
4684
|
/**
|
|
4680
4685
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-console-spaces.md
|
|
4682
4687
|
*/
|
|
4683
4688
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
4684
4689
|
/**
|
|
4685
4690
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
4686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-constant-zero-expression.md
|
|
4687
4692
|
*/
|
|
4688
4693
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
4689
4694
|
/**
|
|
4690
4695
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
4691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
4692
4697
|
*/
|
|
4693
4698
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
4699
|
+
/**
|
|
4700
|
+
* Disallow deprecated CSS features.
|
|
4701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-deprecated-css-features.md
|
|
4702
|
+
*/
|
|
4703
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<UnicornNoDeprecatedCssFeatures>;
|
|
4694
4704
|
/**
|
|
4695
4705
|
* Do not use `document.cookie` directly.
|
|
4696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-document-cookie.md
|
|
4697
4707
|
*/
|
|
4698
4708
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
4699
4709
|
/**
|
|
4700
4710
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
4701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-double-comparison.md
|
|
4702
4712
|
*/
|
|
4703
4713
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
4714
|
+
/**
|
|
4715
|
+
* Disallow duplicate CSS selectors.
|
|
4716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-css-selectors.md
|
|
4717
|
+
*/
|
|
4718
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
4719
|
+
/**
|
|
4720
|
+
* Disallow duplicate font family names.
|
|
4721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-font-family-names.md
|
|
4722
|
+
*/
|
|
4723
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
4704
4724
|
/**
|
|
4705
4725
|
* Disallow duplicate adjacent branches in if chains.
|
|
4706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-if-branches.md
|
|
4707
4727
|
*/
|
|
4708
4728
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
4709
4729
|
/**
|
|
4710
4730
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
4711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
4712
4732
|
*/
|
|
4713
4733
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
4714
4734
|
/**
|
|
4715
4735
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
4716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-loops.md
|
|
4717
4737
|
*/
|
|
4718
4738
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
4719
4739
|
/**
|
|
4720
4740
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
4721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-set-values.md
|
|
4722
4742
|
*/
|
|
4723
4743
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
4724
4744
|
/**
|
|
4725
4745
|
* Disallow empty files.
|
|
4726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-empty-file.md
|
|
4727
4747
|
*/
|
|
4728
4748
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
4729
4749
|
/**
|
|
4730
4750
|
* Disallow assigning to built-in error properties.
|
|
4731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-error-property-assignment.md
|
|
4732
4752
|
*/
|
|
4733
4753
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
4734
4754
|
/**
|
|
4735
4755
|
* Disallow exports in scripts.
|
|
4736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-exports-in-scripts.md
|
|
4737
4757
|
*/
|
|
4738
4758
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
4739
4759
|
/**
|
|
4740
4760
|
* Prefer `for…of` over the `forEach` method.
|
|
4741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-each.md
|
|
4742
4762
|
*/
|
|
4743
4763
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
4744
4764
|
/**
|
|
4745
4765
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-loop.md
|
|
4747
4767
|
*/
|
|
4748
4768
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
4749
4769
|
/**
|
|
4750
4770
|
* Disallow assigning properties on the global object.
|
|
4751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-global-object-property-assignment.md
|
|
4752
4772
|
*/
|
|
4753
4773
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
4754
4774
|
/**
|
|
4755
4775
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
4756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
4757
4777
|
* @deprecated
|
|
4758
4778
|
*/
|
|
4759
4779
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
4760
4780
|
/**
|
|
4761
4781
|
* Disallow immediate mutation after variable assignment.
|
|
4762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-immediate-mutation.md
|
|
4763
4783
|
*/
|
|
4764
|
-
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<
|
|
4784
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
4765
4785
|
/**
|
|
4766
4786
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
4767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-impossible-length-comparison.md
|
|
4768
4788
|
*/
|
|
4769
4789
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
4770
4790
|
/**
|
|
4771
4791
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
4772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-query-selector.md
|
|
4773
4793
|
*/
|
|
4774
4794
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
4775
4795
|
/**
|
|
4776
4796
|
* Disallow incorrect template literal interpolation syntax.
|
|
4777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
4778
4798
|
*/
|
|
4779
4799
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
4780
4800
|
/**
|
|
4781
4801
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
4782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
4783
4803
|
* @deprecated
|
|
4784
4804
|
*/
|
|
4785
4805
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
4786
4806
|
/**
|
|
4787
4807
|
* Disallow `instanceof` with built-in objects
|
|
4788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-instanceof-builtins.md
|
|
4789
4809
|
*/
|
|
4790
4810
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
4791
4811
|
/**
|
|
4792
4812
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
4793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-argument-count.md
|
|
4794
4814
|
*/
|
|
4795
4815
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
4796
4816
|
/**
|
|
4797
4817
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
4798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-character-comparison.md
|
|
4799
4819
|
*/
|
|
4800
4820
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
4801
4821
|
/**
|
|
4802
4822
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4804
4824
|
*/
|
|
4805
4825
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
4806
4826
|
/**
|
|
4807
4827
|
* Disallow invalid `accept` values on file inputs.
|
|
4808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
4809
4829
|
*/
|
|
4810
4830
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
4831
|
+
/**
|
|
4832
|
+
* Disallow unknown media features and invalid values for known media features.
|
|
4833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-media-features.md
|
|
4834
|
+
*/
|
|
4835
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
4811
4836
|
/**
|
|
4812
4837
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4814
4839
|
*/
|
|
4815
4840
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
4816
4841
|
/**
|
|
4817
4842
|
* Disallow invalid implementations of well-known symbol methods.
|
|
4818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
4819
4844
|
*/
|
|
4820
4845
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
4821
4846
|
/**
|
|
4822
4847
|
* Disallow identifiers starting with `new` or `class`.
|
|
4823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-keyword-prefix.md
|
|
4824
4849
|
*/
|
|
4825
4850
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
4826
4851
|
/**
|
|
4827
4852
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
4828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-current-target-access.md
|
|
4829
4854
|
*/
|
|
4830
4855
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
4831
4856
|
/**
|
|
4832
4857
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
4833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-event-control.md
|
|
4834
4859
|
*/
|
|
4835
4860
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
4836
4861
|
/**
|
|
4837
4862
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
4838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
4839
4864
|
* @deprecated
|
|
4840
4865
|
*/
|
|
4841
4866
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
4842
4867
|
/**
|
|
4843
4868
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-lonely-if.md
|
|
4845
4870
|
*/
|
|
4846
4871
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
4847
4872
|
/**
|
|
4848
4873
|
* Disallow mutating a loop iterable during iteration.
|
|
4849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
4850
4875
|
*/
|
|
4851
4876
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
4852
4877
|
/**
|
|
4853
4878
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4855
4880
|
*/
|
|
4856
4881
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
4857
4882
|
/**
|
|
4858
4883
|
* Disallow manually wrapped comments.
|
|
4859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
4860
4885
|
*/
|
|
4861
4886
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
4862
4887
|
/**
|
|
4863
4888
|
* Disallow checking a Map key before accessing a different key.
|
|
4864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-mismatched-map-key.md
|
|
4865
4890
|
*/
|
|
4866
4891
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
4867
4892
|
/**
|
|
4868
4893
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
4869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-misrefactored-assignment.md
|
|
4870
4895
|
*/
|
|
4871
4896
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
4872
4897
|
/**
|
|
4873
4898
|
* Disallow references to missing local resources.
|
|
4874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-missing-local-resource.md
|
|
4875
4900
|
*/
|
|
4876
4901
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
4877
4902
|
/**
|
|
4878
4903
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
4879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
4880
4905
|
*/
|
|
4881
4906
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
4882
4907
|
/**
|
|
4883
4908
|
* Disallow named usage of default import and export.
|
|
4884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-named-default.md
|
|
4885
4910
|
*/
|
|
4886
4911
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
4887
4912
|
/**
|
|
4888
4913
|
* Disallow negated array predicate calls.
|
|
4889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-array-predicate.md
|
|
4890
4915
|
*/
|
|
4891
4916
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
4892
4917
|
/**
|
|
4893
4918
|
* Disallow negated comparisons.
|
|
4894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-comparison.md
|
|
4895
4920
|
*/
|
|
4896
4921
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
4897
4922
|
/**
|
|
4898
4923
|
* Disallow negated conditions.
|
|
4899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-condition.md
|
|
4900
4925
|
*/
|
|
4901
4926
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
4902
4927
|
/**
|
|
4903
4928
|
* Disallow negated expression in equality check.
|
|
4904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4905
4930
|
*/
|
|
4906
4931
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
4907
4932
|
/**
|
|
4908
4933
|
* Disallow nested ternary expressions.
|
|
4909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nested-ternary.md
|
|
4910
4935
|
*/
|
|
4911
4936
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
4937
|
+
/**
|
|
4938
|
+
* Disallow nesting under selector lists with mixed specificity.
|
|
4939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nesting-with-mixed-specificity.md
|
|
4940
|
+
*/
|
|
4941
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
4912
4942
|
/**
|
|
4913
4943
|
* Disallow `new Array()`.
|
|
4914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-array.md
|
|
4915
4945
|
*/
|
|
4916
4946
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
4917
4947
|
/**
|
|
4918
4948
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-buffer.md
|
|
4920
4950
|
*/
|
|
4921
4951
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
4922
4952
|
/**
|
|
4923
4953
|
* Disallow non-function values with function-style verb prefixes.
|
|
4924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
4925
4955
|
*/
|
|
4926
4956
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
4927
4957
|
/**
|
|
4928
4958
|
* Disallow non-standard properties on built-in objects.
|
|
4929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
4930
4960
|
*/
|
|
4931
4961
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
4932
4962
|
/**
|
|
4933
4963
|
* Disallow the use of the `null` literal.
|
|
4934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-null.md
|
|
4935
4965
|
*/
|
|
4936
4966
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
4937
4967
|
/**
|
|
4938
4968
|
* Disallow the use of objects as default parameters.
|
|
4939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4940
4970
|
*/
|
|
4941
4971
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
4942
4972
|
/**
|
|
4943
4973
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
4944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-methods-with-collections.md
|
|
4945
4975
|
*/
|
|
4946
4976
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
4947
4977
|
/**
|
|
4948
4978
|
* Disallow optional chaining on undeclared variables.
|
|
4949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
4950
4980
|
*/
|
|
4951
4981
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
4952
4982
|
/**
|
|
4953
4983
|
* Disallow `process.exit()`.
|
|
4954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-process-exit.md
|
|
4955
4985
|
*/
|
|
4956
4986
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
4957
4987
|
/**
|
|
4958
4988
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
4959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-comparison.md
|
|
4960
4990
|
*/
|
|
4961
4991
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
4992
|
+
/**
|
|
4993
|
+
* Disallow nested style rules that do not modify the parent selector.
|
|
4994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-nested-style-rules.md
|
|
4995
|
+
*/
|
|
4996
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
4962
4997
|
/**
|
|
4963
4998
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
4964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-return-array-push.md
|
|
4965
5000
|
*/
|
|
4966
5001
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
4967
5002
|
/**
|
|
4968
5003
|
* Disallow selector syntax in DOM names.
|
|
4969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-selector-as-dom-name.md
|
|
4970
5005
|
*/
|
|
4971
5006
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
4972
5007
|
/**
|
|
4973
5008
|
* Disallow shorthand properties that override related longhand properties.
|
|
4974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
4975
5010
|
*/
|
|
4976
5011
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
4977
5012
|
/**
|
|
4978
5013
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
4979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4980
5015
|
*/
|
|
4981
5016
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4982
5017
|
/**
|
|
4983
5018
|
* Disallow classes that only have static members.
|
|
4984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-static-only-class.md
|
|
4985
5020
|
*/
|
|
4986
5021
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
4987
5022
|
/**
|
|
4988
5023
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
4989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-subtraction-comparison.md
|
|
4990
5025
|
*/
|
|
4991
5026
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
4992
5027
|
/**
|
|
4993
5028
|
* Disallow `then` property.
|
|
4994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-thenable.md
|
|
4995
5030
|
*/
|
|
4996
5031
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
4997
5032
|
/**
|
|
4998
5033
|
* Disallow assigning `this` to a variable.
|
|
4999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-assignment.md
|
|
5000
5035
|
*/
|
|
5001
5036
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5002
5037
|
/**
|
|
5003
5038
|
* Disallow `this` outside of classes.
|
|
5004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-outside-of-class.md
|
|
5005
5040
|
*/
|
|
5006
5041
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
5007
5042
|
/**
|
|
5008
5043
|
* Disallow assigning to top-level variables from inside functions.
|
|
5009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
5010
5045
|
*/
|
|
5011
5046
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
5012
5047
|
/**
|
|
5013
5048
|
* Disallow top-level side effects in exported modules.
|
|
5014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-side-effects.md
|
|
5015
5050
|
*/
|
|
5016
5051
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
5017
5052
|
/**
|
|
5018
5053
|
* Disallow `all` as a transition property.
|
|
5019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-transition-all.md
|
|
5020
5055
|
*/
|
|
5021
5056
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
5022
5057
|
/**
|
|
5023
5058
|
* Disallow comparing `undefined` using `typeof`.
|
|
5024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-typeof-undefined.md
|
|
5025
5060
|
*/
|
|
5026
5061
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5027
5062
|
/**
|
|
5028
5063
|
* Disallow referencing methods without calling them.
|
|
5029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-uncalled-method.md
|
|
5030
5065
|
*/
|
|
5031
5066
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
5032
5067
|
/**
|
|
5033
5068
|
* Require class members to be declared.
|
|
5034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-undeclared-class-members.md
|
|
5035
5070
|
*/
|
|
5036
5071
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
5072
|
+
/**
|
|
5073
|
+
* Disallow unknown and noncanonical CSS annotations.
|
|
5074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-css-annotations.md
|
|
5075
|
+
*/
|
|
5076
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
5077
|
+
/**
|
|
5078
|
+
* Disallow unknown pseudo-class and pseudo-element selectors.
|
|
5079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-pseudo-selectors.md
|
|
5080
|
+
*/
|
|
5081
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<UnicornNoUnknownPseudoSelectors>;
|
|
5037
5082
|
/**
|
|
5038
5083
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5040
5085
|
*/
|
|
5041
5086
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5042
5087
|
/**
|
|
5043
5088
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
5044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
5045
5090
|
*/
|
|
5046
5091
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5047
5092
|
/**
|
|
5048
5093
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5050
5095
|
*/
|
|
5051
5096
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5052
5097
|
/**
|
|
5053
5098
|
* Disallow awaiting non-promise values.
|
|
5054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-await.md
|
|
5055
5100
|
*/
|
|
5056
5101
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5057
5102
|
/**
|
|
5058
5103
|
* Disallow unnecessary comparisons against boolean literals.
|
|
5059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
5060
5105
|
*/
|
|
5061
5106
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
5062
5107
|
/**
|
|
5063
5108
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
5064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
5065
5110
|
*/
|
|
5066
5111
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5067
5112
|
/**
|
|
5068
5113
|
* Disallow unnecessary `globalThis` references.
|
|
5069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-global-this.md
|
|
5070
5115
|
*/
|
|
5071
5116
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
5072
5117
|
/**
|
|
5073
5118
|
* Disallow unnecessary nested ternary expressions.
|
|
5074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
5075
5120
|
*/
|
|
5076
5121
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5077
5122
|
/**
|
|
5078
5123
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5080
5125
|
*/
|
|
5081
5126
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5082
5127
|
/**
|
|
5083
5128
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5085
5130
|
*/
|
|
5086
5131
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5087
5132
|
/**
|
|
5088
5133
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
5089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-splice.md
|
|
5090
5135
|
*/
|
|
5091
5136
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
5092
5137
|
/**
|
|
5093
5138
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
5094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
5095
5140
|
*/
|
|
5096
5141
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
5097
5142
|
/**
|
|
5098
5143
|
* Disallow unreadable array destructuring.
|
|
5099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5100
5145
|
*/
|
|
5101
5146
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
5102
5147
|
/**
|
|
5103
5148
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
5104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
5105
5150
|
*/
|
|
5106
5151
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
5107
5152
|
/**
|
|
5108
5153
|
* Disallow unreadable IIFEs.
|
|
5109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-iife.md
|
|
5110
5155
|
*/
|
|
5111
5156
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5112
5157
|
/**
|
|
5113
5158
|
* Disallow unreadable `new` expressions.
|
|
5114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-new-expression.md
|
|
5115
5160
|
*/
|
|
5116
5161
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
5117
5162
|
/**
|
|
5118
5163
|
* Disallow unreadable object destructuring.
|
|
5119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
5120
5165
|
*/
|
|
5121
5166
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
5122
5167
|
/**
|
|
5123
5168
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
5124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
5125
5170
|
*/
|
|
5126
5171
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
5127
5172
|
/**
|
|
5128
5173
|
* Disallow unsafe DOM HTML APIs.
|
|
5129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-dom-html.md
|
|
5130
5175
|
*/
|
|
5131
5176
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
5132
5177
|
/**
|
|
5133
5178
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
5134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
5135
5180
|
*/
|
|
5136
5181
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
5137
5182
|
/**
|
|
5138
5183
|
* Disallow unsafe values as property keys.
|
|
5139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-property-key.md
|
|
5140
5185
|
*/
|
|
5141
5186
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
5142
5187
|
/**
|
|
5143
5188
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
5144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
5145
5190
|
*/
|
|
5146
5191
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
5147
5192
|
/**
|
|
5148
5193
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
5149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
5150
5195
|
*/
|
|
5151
5196
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
5152
5197
|
/**
|
|
5153
|
-
* Disallow
|
|
5154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5198
|
+
* Disallow unscoped CSS nesting selectors.
|
|
5199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unscoped-css-nesting-selector.md
|
|
5200
|
+
*/
|
|
5201
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<UnicornNoUnscopedCssNestingSelector>;
|
|
5202
|
+
/**
|
|
5203
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
5204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
5205
|
+
* @deprecated
|
|
5155
5206
|
*/
|
|
5156
5207
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
5208
|
+
/**
|
|
5209
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
5210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
5211
|
+
*/
|
|
5212
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
5213
|
+
/**
|
|
5214
|
+
* Disallow discarding lazy iterator helpers.
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-iterator-helper.md
|
|
5216
|
+
*/
|
|
5217
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
5157
5218
|
/**
|
|
5158
5219
|
* Disallow unused object properties.
|
|
5159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-properties.md
|
|
5160
5221
|
*/
|
|
5161
5222
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5162
5223
|
/**
|
|
5163
5224
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
5164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-boolean-cast.md
|
|
5165
5226
|
*/
|
|
5166
5227
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
5167
5228
|
/**
|
|
5168
5229
|
* Disallow useless type coercions of values that are already of the target type.
|
|
5169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-coercion.md
|
|
5170
5231
|
*/
|
|
5171
5232
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
5172
5233
|
/**
|
|
5173
5234
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-collection-argument.md
|
|
5175
5236
|
*/
|
|
5176
5237
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5177
5238
|
/**
|
|
5178
5239
|
* Disallow useless compound assignments such as `x += 0`.
|
|
5179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-compound-assignment.md
|
|
5180
5241
|
*/
|
|
5181
5242
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
5182
5243
|
/**
|
|
5183
5244
|
* Disallow useless concatenation of literals.
|
|
5184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-concat.md
|
|
5185
5246
|
*/
|
|
5186
5247
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
5187
5248
|
/**
|
|
5188
5249
|
* Disallow useless `continue` statements.
|
|
5189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-continue.md
|
|
5190
5251
|
*/
|
|
5191
5252
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
5192
5253
|
/**
|
|
5193
5254
|
* Disallow unnecessary existence checks before deletion.
|
|
5194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-delete-check.md
|
|
5195
5256
|
*/
|
|
5196
5257
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
5197
5258
|
/**
|
|
5198
5259
|
* Disallow `else` after a statement that exits.
|
|
5199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-else.md
|
|
5200
5261
|
*/
|
|
5201
5262
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
5202
5263
|
/**
|
|
5203
5264
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5205
5266
|
*/
|
|
5206
5267
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5207
5268
|
/**
|
|
5208
5269
|
* Disallow useless fallback when spreading in object literals.
|
|
5209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5210
5271
|
*/
|
|
5211
5272
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5212
5273
|
/**
|
|
5213
5274
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
5214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
5215
5276
|
*/
|
|
5216
5277
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5217
5278
|
/**
|
|
5218
5279
|
* Disallow useless array length check.
|
|
5219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-length-check.md
|
|
5220
5281
|
*/
|
|
5221
5282
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5222
5283
|
/**
|
|
5223
5284
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
5224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-logical-operand.md
|
|
5225
5286
|
*/
|
|
5226
5287
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
5227
5288
|
/**
|
|
5228
5289
|
* Disallow useless overrides of class methods.
|
|
5229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-override.md
|
|
5230
5291
|
*/
|
|
5231
5292
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
5232
5293
|
/**
|
|
5233
5294
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5235
5296
|
*/
|
|
5236
5297
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5237
5298
|
/**
|
|
5238
5299
|
* Disallow redundant re-exports.
|
|
5239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-re-export.md
|
|
5240
5301
|
*/
|
|
5241
5302
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
5242
5303
|
/**
|
|
5243
5304
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
5244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-recursion.md
|
|
5245
5306
|
*/
|
|
5246
5307
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
5308
|
+
/**
|
|
5309
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
5310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-set-construction.md
|
|
5311
|
+
*/
|
|
5312
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
5247
5313
|
/**
|
|
5248
5314
|
* Disallow unnecessary spread.
|
|
5249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-spread.md
|
|
5250
5316
|
*/
|
|
5251
5317
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5252
5318
|
/**
|
|
5253
5319
|
* Disallow useless case in switch statements.
|
|
5254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-switch-case.md
|
|
5255
5321
|
*/
|
|
5256
5322
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5257
5323
|
/**
|
|
5258
5324
|
* Disallow useless template literal expressions.
|
|
5259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-template-literals.md
|
|
5260
5326
|
*/
|
|
5261
5327
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
5262
5328
|
/**
|
|
5263
5329
|
* Disallow useless `undefined`.
|
|
5264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-undefined.md
|
|
5265
5331
|
*/
|
|
5266
5332
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5333
|
+
/**
|
|
5334
|
+
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
5335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-using-resource-escape.md
|
|
5336
|
+
*/
|
|
5337
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
5267
5338
|
/**
|
|
5268
5339
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
5269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
5270
5341
|
*/
|
|
5271
5342
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
5272
5343
|
/**
|
|
5273
5344
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-zero-fractions.md
|
|
5275
5346
|
*/
|
|
5276
5347
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5277
5348
|
/**
|
|
5278
5349
|
* Enforce proper case for numeric literals.
|
|
5279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/number-literal-case.md
|
|
5280
5351
|
*/
|
|
5281
5352
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5282
5353
|
/**
|
|
5283
5354
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/numeric-separators-style.md
|
|
5285
5356
|
*/
|
|
5286
5357
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5287
5358
|
/**
|
|
5288
5359
|
* Require assignment operator shorthand where possible.
|
|
5289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/operator-assignment.md
|
|
5290
5361
|
*/
|
|
5291
5362
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
5292
5363
|
/**
|
|
5293
5364
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
5294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-any.md
|
|
5295
5366
|
*/
|
|
5296
5367
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
5297
5368
|
/**
|
|
5298
5369
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
5299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
5300
5371
|
*/
|
|
5301
5372
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
5302
5373
|
/**
|
|
5303
5374
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener.md
|
|
5305
5376
|
*/
|
|
5306
5377
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5307
5378
|
/**
|
|
5308
5379
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
5309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
5310
5381
|
*/
|
|
5311
5382
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
5312
5383
|
/**
|
|
5313
5384
|
* Prefer `AggregateError` when throwing collected errors.
|
|
5314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-aggregate-error.md
|
|
5315
5386
|
*/
|
|
5316
5387
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
5317
5388
|
/**
|
|
5318
5389
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-find.md
|
|
5320
5391
|
*/
|
|
5321
5392
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5322
5393
|
/**
|
|
5323
5394
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat.md
|
|
5325
5396
|
*/
|
|
5326
5397
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5327
5398
|
/**
|
|
5328
5399
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
5329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat-map.md
|
|
5330
5401
|
*/
|
|
5331
5402
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5332
5403
|
/**
|
|
5333
|
-
* Prefer `Array.fromAsync()` over
|
|
5334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5404
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
5405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-async.md
|
|
5335
5406
|
*/
|
|
5336
5407
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
5337
5408
|
/**
|
|
5338
5409
|
* Prefer using the `Array.from()` mapping function argument.
|
|
5339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-map.md
|
|
5340
5411
|
*/
|
|
5341
5412
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
5342
5413
|
/**
|
|
5343
5414
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
5344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-range.md
|
|
5345
5416
|
*/
|
|
5346
5417
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
5347
5418
|
/**
|
|
5348
5419
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-index-of.md
|
|
5350
5421
|
*/
|
|
5351
5422
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5352
5423
|
/**
|
|
5353
5424
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
5354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
5355
5426
|
*/
|
|
5356
5427
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5357
5428
|
/**
|
|
5358
5429
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
5359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-last-methods.md
|
|
5360
5431
|
*/
|
|
5361
5432
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
5362
5433
|
/**
|
|
5363
5434
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
5364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-slice.md
|
|
5365
5436
|
*/
|
|
5366
5437
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
5367
5438
|
/**
|
|
5368
5439
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-some.md
|
|
5370
5441
|
*/
|
|
5371
5442
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5372
5443
|
/**
|
|
5373
5444
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-at.md
|
|
5375
5446
|
*/
|
|
5376
5447
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5377
5448
|
/**
|
|
5378
5449
|
* Prefer `await` over promise chaining.
|
|
5379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-await.md
|
|
5380
5451
|
*/
|
|
5381
5452
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
5382
5453
|
/**
|
|
5383
5454
|
* Prefer `BigInt` literals over the constructor.
|
|
5384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-bigint-literals.md
|
|
5385
5456
|
*/
|
|
5386
5457
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5387
5458
|
/**
|
|
5388
5459
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5390
5461
|
*/
|
|
5391
5462
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5392
5463
|
/**
|
|
5393
5464
|
* Prefer block statements over IIFEs used only for scoping.
|
|
5394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
5395
5466
|
*/
|
|
5396
5467
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
5397
5468
|
/**
|
|
5398
5469
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
5399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-boolean-return.md
|
|
5400
5471
|
*/
|
|
5401
5472
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5402
5473
|
/**
|
|
5403
5474
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-class-fields.md
|
|
5405
5476
|
*/
|
|
5406
5477
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5407
5478
|
/**
|
|
5408
5479
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5410
5481
|
*/
|
|
5411
5482
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5412
5483
|
/**
|
|
5413
5484
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-code-point.md
|
|
5415
5486
|
*/
|
|
5416
5487
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5417
5488
|
/**
|
|
5418
|
-
* Prefer
|
|
5419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5489
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
5490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-combined-guards.md
|
|
5491
|
+
*/
|
|
5492
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
5493
|
+
/**
|
|
5494
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
5495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-continue.md
|
|
5420
5496
|
*/
|
|
5421
5497
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
5422
5498
|
/**
|
|
5423
5499
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-date-now.md
|
|
5425
5501
|
*/
|
|
5426
5502
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5427
5503
|
/**
|
|
5428
5504
|
* Prefer default parameters over reassignment.
|
|
5429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-default-parameters.md
|
|
5430
5506
|
*/
|
|
5431
5507
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5432
5508
|
/**
|
|
5433
5509
|
* Prefer direct iteration over default iterator method calls.
|
|
5434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-direct-iteration.md
|
|
5435
5511
|
*/
|
|
5436
5512
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
5437
5513
|
/**
|
|
5438
5514
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
5439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dispose.md
|
|
5440
5516
|
*/
|
|
5441
5517
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
5442
5518
|
/**
|
|
5443
5519
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
5444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-append.md
|
|
5445
5521
|
*/
|
|
5446
5522
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5447
5523
|
/**
|
|
5448
5524
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
5449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
5450
5526
|
* @deprecated
|
|
5451
5527
|
*/
|
|
5452
5528
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5453
5529
|
/**
|
|
5454
5530
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
5455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
5456
5532
|
*/
|
|
5457
5533
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
5458
5534
|
/**
|
|
5459
5535
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5461
5537
|
*/
|
|
5462
5538
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5463
5539
|
/**
|
|
5464
|
-
* Prefer `.replaceChildren()` when
|
|
5465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5540
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
5541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
5466
5542
|
*/
|
|
5467
5543
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
5468
5544
|
/**
|
|
5469
5545
|
* Prefer `.textContent` over `.innerText`.
|
|
5470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5471
5547
|
*/
|
|
5472
5548
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5473
5549
|
/**
|
|
5474
|
-
* Prefer early returns over
|
|
5475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5550
|
+
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
5551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-early-return.md
|
|
5476
5552
|
*/
|
|
5477
5553
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
5478
5554
|
/**
|
|
5479
5555
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
5480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-else-if.md
|
|
5481
5557
|
*/
|
|
5482
5558
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
5483
5559
|
/**
|
|
5484
5560
|
* Prefer `Error.isError()` when checking for errors.
|
|
5485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-error-is-error.md
|
|
5486
5562
|
*/
|
|
5487
5563
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
5488
5564
|
/**
|
|
5489
5565
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-event-target.md
|
|
5491
5567
|
*/
|
|
5492
5568
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5493
5569
|
/**
|
|
5494
5570
|
* Prefer explicit viewport units.
|
|
5495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
5496
5572
|
*/
|
|
5497
5573
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
5498
5574
|
/**
|
|
5499
5575
|
* Prefer `export…from` when re-exporting.
|
|
5500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-export-from.md
|
|
5501
5577
|
*/
|
|
5502
5578
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5503
5579
|
/**
|
|
5504
5580
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
5505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
5506
5582
|
*/
|
|
5507
5583
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5508
5584
|
/**
|
|
5509
5585
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
5510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
5511
5587
|
*/
|
|
5512
5588
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
5513
5589
|
/**
|
|
5514
5590
|
* Prefer global numeric constants over `Number` static properties.
|
|
5515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-number-constants.md
|
|
5516
5592
|
*/
|
|
5517
5593
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
5518
5594
|
/**
|
|
5519
5595
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-this.md
|
|
5521
5597
|
*/
|
|
5522
5598
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5523
5599
|
/**
|
|
5524
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
5525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5600
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
5601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-group-by.md
|
|
5526
5602
|
*/
|
|
5527
5603
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
5528
5604
|
/**
|
|
5529
5605
|
* Prefer `.has()` when checking existence.
|
|
5530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-has-check.md
|
|
5531
5607
|
*/
|
|
5532
5608
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
5533
5609
|
/**
|
|
5534
5610
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
5535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
5536
5612
|
*/
|
|
5537
5613
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
5538
5614
|
/**
|
|
5539
5615
|
* Prefer HTTPS over HTTP.
|
|
5540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-https.md
|
|
5541
5617
|
*/
|
|
5542
5618
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
5543
5619
|
/**
|
|
5544
5620
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
5545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
5546
5622
|
*/
|
|
5547
5623
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
5548
5624
|
/**
|
|
5549
5625
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5551
5627
|
*/
|
|
5552
5628
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5553
5629
|
/**
|
|
5554
5630
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes.md
|
|
5556
5632
|
*/
|
|
5557
5633
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5558
5634
|
/**
|
|
5559
5635
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
5560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
5561
5637
|
*/
|
|
5562
5638
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
5563
5639
|
/**
|
|
5564
5640
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
5565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
5566
5642
|
*/
|
|
5567
5643
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
5568
5644
|
/**
|
|
5569
5645
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
5570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-concat.md
|
|
5571
5647
|
*/
|
|
5572
5648
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
5573
5649
|
/**
|
|
5574
5650
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
5575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-helpers.md
|
|
5576
5652
|
*/
|
|
5577
5653
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
5578
5654
|
/**
|
|
5579
5655
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
5580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array.md
|
|
5581
5657
|
*/
|
|
5582
5658
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5583
5659
|
/**
|
|
5584
5660
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
5585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
5586
5662
|
*/
|
|
5587
5663
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
5664
|
+
/**
|
|
5665
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
5666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-zip.md
|
|
5667
|
+
*/
|
|
5668
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
5669
|
+
/**
|
|
5670
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
5671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-json-import.md
|
|
5672
|
+
*/
|
|
5673
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
5588
5674
|
/**
|
|
5589
5675
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
5590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
5591
5677
|
* @deprecated
|
|
5592
5678
|
*/
|
|
5593
5679
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5594
5680
|
/**
|
|
5595
5681
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
5596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5597
5683
|
*/
|
|
5598
5684
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5599
5685
|
/**
|
|
5600
5686
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
5601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-location-assign.md
|
|
5602
5688
|
*/
|
|
5603
5689
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
5604
5690
|
/**
|
|
5605
5691
|
* Prefer using a logical operator over a ternary.
|
|
5606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5607
5693
|
*/
|
|
5608
5694
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5609
5695
|
/**
|
|
5610
5696
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
5611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-map-from-entries.md
|
|
5612
5698
|
*/
|
|
5613
5699
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
5614
5700
|
/**
|
|
5615
5701
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
5616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-abs.md
|
|
5617
5703
|
*/
|
|
5618
5704
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
5619
5705
|
/**
|
|
5620
5706
|
* Prefer `Math` constants over their approximate numeric values.
|
|
5621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-constants.md
|
|
5622
5708
|
*/
|
|
5623
5709
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
5624
5710
|
/**
|
|
5625
5711
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-min-max.md
|
|
5627
5713
|
*/
|
|
5628
5714
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5629
5715
|
/**
|
|
5630
5716
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
5631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-trunc.md
|
|
5632
5718
|
*/
|
|
5633
5719
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5720
|
+
/**
|
|
5721
|
+
* Prefer modern media feature range syntax.
|
|
5722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-media-feature-range-syntax.md
|
|
5723
|
+
*/
|
|
5724
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
5634
5725
|
/**
|
|
5635
5726
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
5636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-minimal-ternary.md
|
|
5637
5728
|
*/
|
|
5638
5729
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
5639
5730
|
/**
|
|
5640
5731
|
* Prefer modern DOM APIs.
|
|
5641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5642
5733
|
*/
|
|
5643
5734
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5644
5735
|
/**
|
|
5645
5736
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5647
5738
|
*/
|
|
5648
5739
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5649
5740
|
/**
|
|
5650
5741
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-module.md
|
|
5652
5743
|
*/
|
|
5653
5744
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5654
5745
|
/**
|
|
5655
5746
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5657
5748
|
*/
|
|
5658
5749
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5659
5750
|
/**
|
|
5660
5751
|
* Prefer negative index over `.length - index` when possible.
|
|
5661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-negative-index.md
|
|
5662
5753
|
*/
|
|
5663
5754
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5664
5755
|
/**
|
|
5665
5756
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-node-protocol.md
|
|
5667
5758
|
*/
|
|
5668
5759
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5669
5760
|
/**
|
|
5670
5761
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
5671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-coercion.md
|
|
5672
5763
|
*/
|
|
5673
5764
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
5674
5765
|
/**
|
|
5675
5766
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
5676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
5677
5768
|
*/
|
|
5678
5769
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
5679
5770
|
/**
|
|
5680
5771
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
5681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-properties.md
|
|
5682
5773
|
*/
|
|
5683
5774
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5684
5775
|
/**
|
|
5685
5776
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
5686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-define-properties.md
|
|
5687
5778
|
*/
|
|
5688
5779
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
5689
5780
|
/**
|
|
5690
5781
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
5691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
5692
5783
|
*/
|
|
5693
5784
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
5694
5785
|
/**
|
|
5695
5786
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-from-entries.md
|
|
5697
5788
|
*/
|
|
5698
5789
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5699
5790
|
/**
|
|
5700
5791
|
* Prefer the most specific `Object` iterable method.
|
|
5701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
5702
5793
|
*/
|
|
5703
5794
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5704
5795
|
/**
|
|
5705
5796
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
5706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-observer-apis.md
|
|
5707
5798
|
*/
|
|
5708
5799
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
5709
5800
|
/**
|
|
5710
5801
|
* Prefer omitting the `catch` binding parameter.
|
|
5711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5712
5803
|
*/
|
|
5713
5804
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5714
5805
|
/**
|
|
5715
5806
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
5716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-path2d.md
|
|
5717
5808
|
*/
|
|
5718
5809
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
5719
5810
|
/**
|
|
5720
5811
|
* Prefer private class fields over the underscore-prefix convention.
|
|
5721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-private-class-fields.md
|
|
5722
5813
|
*/
|
|
5723
5814
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
5724
5815
|
/**
|
|
5725
5816
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
5726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-try.md
|
|
5727
5818
|
*/
|
|
5728
5819
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
5729
5820
|
/**
|
|
5730
5821
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
5731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
5732
5823
|
*/
|
|
5733
5824
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
5734
5825
|
/**
|
|
5735
5826
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-prototype-methods.md
|
|
5737
5828
|
*/
|
|
5738
5829
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5739
5830
|
/**
|
|
5740
5831
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
5741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-query-selector.md
|
|
5742
5833
|
*/
|
|
5743
5834
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
5744
5835
|
/**
|
|
5745
5836
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
5746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-queue-microtask.md
|
|
5747
5838
|
*/
|
|
5748
5839
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
5749
5840
|
/**
|
|
5750
5841
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-reflect-apply.md
|
|
5752
5843
|
*/
|
|
5753
5844
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5754
5845
|
/**
|
|
5755
5846
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
5756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-escape.md
|
|
5757
5848
|
*/
|
|
5758
5849
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
5759
5850
|
/**
|
|
5760
5851
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
5761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-test.md
|
|
5762
5853
|
*/
|
|
5763
5854
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5764
5855
|
/**
|
|
5765
5856
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-response-static-json.md
|
|
5767
5858
|
*/
|
|
5768
5859
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5769
5860
|
/**
|
|
5770
5861
|
* Prefer `:scope` when using element query selector methods.
|
|
5771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-scoped-selector.md
|
|
5772
5863
|
*/
|
|
5773
5864
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
5774
5865
|
/**
|
|
5775
5866
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-has.md
|
|
5777
5868
|
*/
|
|
5778
5869
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
5779
5870
|
/**
|
|
5780
5871
|
* Prefer `Set` methods for Set operations.
|
|
5781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-methods.md
|
|
5782
5873
|
*/
|
|
5783
5874
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
5784
5875
|
/**
|
|
5785
5876
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-size.md
|
|
5787
5878
|
*/
|
|
5788
5879
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5789
5880
|
/**
|
|
5790
5881
|
* Prefer arrow function properties over methods with a single return.
|
|
5791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-short-arrow-method.md
|
|
5792
5883
|
*/
|
|
5793
5884
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
5794
5885
|
/**
|
|
5795
5886
|
* Prefer simple conditions first in logical expressions.
|
|
5796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-condition-first.md
|
|
5797
5888
|
*/
|
|
5798
5889
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
5799
5890
|
/**
|
|
5800
5891
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
5801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
5802
5893
|
*/
|
|
5803
5894
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
5804
5895
|
/**
|
|
5805
5896
|
* Prefer simplified conditions.
|
|
5806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simplified-conditions.md
|
|
5807
5898
|
*/
|
|
5808
5899
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
5809
5900
|
/**
|
|
5810
5901
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
5811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-array-predicate.md
|
|
5812
5903
|
*/
|
|
5813
5904
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
5814
5905
|
/**
|
|
5815
5906
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-call.md
|
|
5817
5908
|
*/
|
|
5818
5909
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5819
5910
|
/**
|
|
5820
5911
|
* Prefer a single object destructuring declaration per local const source.
|
|
5821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
5822
5913
|
*/
|
|
5823
5914
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
5824
5915
|
/**
|
|
5825
5916
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
5826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-replace.md
|
|
5827
5918
|
*/
|
|
5828
5919
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
5829
5920
|
/**
|
|
5830
5921
|
* Prefer declaring variables in the smallest possible scope.
|
|
5831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-smaller-scope.md
|
|
5832
5923
|
*/
|
|
5833
5924
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
5834
5925
|
/**
|
|
5835
5926
|
* Prefer `String#split()` with a limit.
|
|
5836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-split-limit.md
|
|
5837
5928
|
*/
|
|
5838
5929
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
5839
5930
|
/**
|
|
5840
5931
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
5841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-spread.md
|
|
5842
5933
|
*/
|
|
5843
5934
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5844
5935
|
/**
|
|
5845
5936
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
5846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-match-all.md
|
|
5847
5938
|
*/
|
|
5848
5939
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
5849
5940
|
/**
|
|
5850
5941
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
5851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
5852
5943
|
*/
|
|
5853
5944
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
5854
5945
|
/**
|
|
5855
5946
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-raw.md
|
|
5857
5948
|
*/
|
|
5858
5949
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5859
5950
|
/**
|
|
5860
5951
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
5861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-repeat.md
|
|
5862
5953
|
*/
|
|
5863
5954
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
5864
5955
|
/**
|
|
5865
5956
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
5866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-replace-all.md
|
|
5867
5958
|
*/
|
|
5868
5959
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5869
5960
|
/**
|
|
5870
5961
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-slice.md
|
|
5872
5963
|
*/
|
|
5873
5964
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5874
5965
|
/**
|
|
5875
5966
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
5876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5877
5968
|
*/
|
|
5878
5969
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5879
5970
|
/**
|
|
5880
5971
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5882
5973
|
*/
|
|
5883
5974
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5884
5975
|
/**
|
|
5885
5976
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-structured-clone.md
|
|
5887
5978
|
*/
|
|
5888
5979
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5889
5980
|
/**
|
|
5890
5981
|
* Prefer `switch` over multiple `else-if`.
|
|
5891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-switch.md
|
|
5892
5983
|
*/
|
|
5893
5984
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5894
5985
|
/**
|
|
5895
5986
|
* Prefer `Temporal` over `Date`.
|
|
5896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal.md
|
|
5897
5988
|
*/
|
|
5898
5989
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
5990
|
+
/**
|
|
5991
|
+
* Prefer direct Temporal conversion methods.
|
|
5992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal-conversion.md
|
|
5993
|
+
*/
|
|
5994
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
5899
5995
|
/**
|
|
5900
5996
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
5901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-ternary.md
|
|
5902
5998
|
*/
|
|
5903
5999
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5904
6000
|
/**
|
|
5905
6001
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
5906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-then-catch.md
|
|
5907
6003
|
*/
|
|
5908
6004
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
5909
6005
|
/**
|
|
5910
6006
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
5911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-toggle-attribute.md
|
|
5912
6008
|
*/
|
|
5913
6009
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
5914
6010
|
/**
|
|
5915
6011
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-top-level-await.md
|
|
5917
6013
|
*/
|
|
5918
6014
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5919
6015
|
/**
|
|
5920
6016
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-error.md
|
|
5922
6018
|
*/
|
|
5923
6019
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5924
6020
|
/**
|
|
5925
6021
|
* Require type literals to be last in union types.
|
|
5926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-literal-last.md
|
|
5927
6023
|
*/
|
|
5928
6024
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
5929
6025
|
/**
|
|
5930
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
5931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6026
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
6027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-base64.md
|
|
5932
6028
|
*/
|
|
5933
6029
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
6030
|
+
/**
|
|
6031
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
6032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-hex.md
|
|
6033
|
+
*/
|
|
6034
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
5934
6035
|
/**
|
|
5935
6036
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
5936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unary-minus.md
|
|
5937
6038
|
*/
|
|
5938
6039
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
5939
6040
|
/**
|
|
5940
6041
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
5941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
5942
6043
|
*/
|
|
5943
6044
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
5944
6045
|
/**
|
|
5945
6046
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
5946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-can-parse.md
|
|
5947
6048
|
*/
|
|
5948
6049
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
5949
6050
|
/**
|
|
5950
6051
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
5951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-href.md
|
|
5952
6053
|
*/
|
|
5953
6054
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
5954
6055
|
/**
|
|
5955
6056
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
5956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-search-parameters.md
|
|
5957
6058
|
*/
|
|
5958
6059
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
5959
6060
|
/**
|
|
5960
6061
|
* Prefer putting the condition in the while statement.
|
|
5961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-while-loop-condition.md
|
|
5962
6063
|
*/
|
|
5963
6064
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
5964
6065
|
/**
|
|
5965
6066
|
* Renamed to `unicorn/name-replacements`.
|
|
5966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
5967
6068
|
* @deprecated
|
|
5968
6069
|
*/
|
|
5969
6070
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
5970
6071
|
/**
|
|
5971
6072
|
* Enforce consistent relative URL style.
|
|
5972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/relative-url-style.md
|
|
5973
6074
|
*/
|
|
5974
6075
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5975
6076
|
/**
|
|
5976
6077
|
* Enforce using the separator argument with `Array#join()`.
|
|
5977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-join-separator.md
|
|
5978
6079
|
*/
|
|
5979
6080
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5980
6081
|
/**
|
|
5981
6082
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
5982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-sort-compare.md
|
|
5983
6084
|
*/
|
|
5984
6085
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
5985
6086
|
/**
|
|
5986
6087
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-css-escape.md
|
|
5988
6089
|
*/
|
|
5989
6090
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
5990
6091
|
/**
|
|
5991
6092
|
* Require configured YAML frontmatter fields.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-frontmatter-fields.md
|
|
5993
6094
|
*/
|
|
5994
6095
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
5995
6096
|
/**
|
|
5996
6097
|
* Require non-empty module attributes for imports and exports
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-attributes.md
|
|
5998
6099
|
*/
|
|
5999
6100
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6000
6101
|
/**
|
|
6001
6102
|
* Require non-empty specifier list in import and export statements.
|
|
6002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-specifiers.md
|
|
6003
6104
|
*/
|
|
6004
6105
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6005
6106
|
/**
|
|
6006
6107
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6008
6109
|
*/
|
|
6009
6110
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6010
6111
|
/**
|
|
6011
6112
|
* Require passive event listeners for high-frequency events.
|
|
6012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-passive-events.md
|
|
6013
6114
|
*/
|
|
6014
6115
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
6015
6116
|
/**
|
|
6016
6117
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-post-message-target-origin.md
|
|
6018
6119
|
*/
|
|
6019
6120
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6020
6121
|
/**
|
|
6021
6122
|
* Require boolean-returning Proxy traps to return booleans.
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
6023
6124
|
*/
|
|
6024
6125
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
6025
6126
|
/**
|
|
6026
6127
|
* Enforce a consistent style for single-line block comments.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/single-line-block-comment-style.md
|
|
6028
6129
|
*/
|
|
6029
6130
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
6030
6131
|
/**
|
|
6031
6132
|
* Enforce better string content.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/string-content.md
|
|
6033
6134
|
*/
|
|
6034
6135
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6035
6136
|
/**
|
|
6036
6137
|
* Enforce consistent brace style for `case` clauses.
|
|
6037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-braces.md
|
|
6038
6139
|
*/
|
|
6039
6140
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6040
6141
|
/**
|
|
6041
6142
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-break-position.md
|
|
6043
6144
|
*/
|
|
6044
6145
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
6045
6146
|
/**
|
|
6046
6147
|
* Fix whitespace-insensitive template indentation.
|
|
6047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/template-indent.md
|
|
6048
6149
|
*/
|
|
6049
6150
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6050
6151
|
/**
|
|
6051
6152
|
* Enforce consistent case for text encoding identifiers.
|
|
6052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6053
6154
|
*/
|
|
6054
6155
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6055
6156
|
/**
|
|
6056
6157
|
* Require `new` when creating an error.
|
|
6057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/throw-new-error.md
|
|
6058
6159
|
*/
|
|
6059
6160
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6060
6161
|
/**
|
|
6061
6162
|
* Limit the complexity of `try` blocks.
|
|
6062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/try-complexity.md
|
|
6063
6164
|
*/
|
|
6064
6165
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
6065
6166
|
/**
|
|
@@ -18523,6 +18624,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
18523
18624
|
})[];
|
|
18524
18625
|
multipleFileExtensions?: boolean;
|
|
18525
18626
|
checkDirectories?: boolean;
|
|
18627
|
+
directoryRoots?: (string | {
|
|
18628
|
+
[k: string]: unknown | undefined;
|
|
18629
|
+
})[];
|
|
18526
18630
|
} | {
|
|
18527
18631
|
cases?: {
|
|
18528
18632
|
camelCase?: boolean;
|
|
@@ -18536,6 +18640,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
18536
18640
|
})[];
|
|
18537
18641
|
multipleFileExtensions?: boolean;
|
|
18538
18642
|
checkDirectories?: boolean;
|
|
18643
|
+
directoryRoots?: (string | {
|
|
18644
|
+
[k: string]: unknown | undefined;
|
|
18645
|
+
})[];
|
|
18539
18646
|
})];
|
|
18540
18647
|
// ----- unicorn/id-match -----
|
|
18541
18648
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -18622,10 +18729,22 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
18622
18729
|
type UnicornNoArraySort = [] | [{
|
|
18623
18730
|
allowExpressionStatement?: boolean;
|
|
18624
18731
|
}];
|
|
18732
|
+
// ----- unicorn/no-break-in-nested-loop -----
|
|
18733
|
+
type UnicornNoBreakInNestedLoop = [] | [{
|
|
18734
|
+
checkContinue?: boolean;
|
|
18735
|
+
}];
|
|
18736
|
+
// ----- unicorn/no-deprecated-css-features -----
|
|
18737
|
+
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
18738
|
+
allow?: string[];
|
|
18739
|
+
}];
|
|
18625
18740
|
// ----- unicorn/no-empty-file -----
|
|
18626
18741
|
type UnicornNoEmptyFile = [] | [{
|
|
18627
18742
|
allowComments?: boolean;
|
|
18628
18743
|
}];
|
|
18744
|
+
// ----- unicorn/no-immediate-mutation -----
|
|
18745
|
+
type UnicornNoImmediateMutation = [] | [{
|
|
18746
|
+
checkConditionals?: boolean;
|
|
18747
|
+
}];
|
|
18629
18748
|
// ----- unicorn/no-instanceof-builtins -----
|
|
18630
18749
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
18631
18750
|
useErrorIsError?: boolean;
|
|
@@ -18666,6 +18785,10 @@ type UnicornNoNull = [] | [{
|
|
|
18666
18785
|
type UnicornNoTypeofUndefined = [] | [{
|
|
18667
18786
|
checkGlobalVariables?: boolean;
|
|
18668
18787
|
}];
|
|
18788
|
+
// ----- unicorn/no-unknown-pseudo-selectors -----
|
|
18789
|
+
type UnicornNoUnknownPseudoSelectors = [] | [{
|
|
18790
|
+
allow?: string[];
|
|
18791
|
+
}];
|
|
18669
18792
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
18670
18793
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
18671
18794
|
targets?: (string | string[] | {
|
|
@@ -18676,6 +18799,10 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
18676
18799
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
18677
18800
|
maximumIgnoredElements?: number;
|
|
18678
18801
|
}];
|
|
18802
|
+
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
18803
|
+
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
18804
|
+
scopingRootAtRules?: string[];
|
|
18805
|
+
}];
|
|
18679
18806
|
// ----- unicorn/no-useless-undefined -----
|
|
18680
18807
|
type UnicornNoUselessUndefined = [] | [{
|
|
18681
18808
|
checkArguments?: boolean;
|
|
@@ -18729,9 +18856,14 @@ type UnicornPreferAt = [] | [{
|
|
|
18729
18856
|
getLastElementFunctions?: string[];
|
|
18730
18857
|
checkAllIndexAccess?: boolean;
|
|
18731
18858
|
}];
|
|
18859
|
+
// ----- unicorn/prefer-combined-guards -----
|
|
18860
|
+
type UnicornPreferCombinedGuards = [] | [{
|
|
18861
|
+
checkCompoundConditions?: boolean;
|
|
18862
|
+
}];
|
|
18732
18863
|
// ----- unicorn/prefer-continue -----
|
|
18733
18864
|
type UnicornPreferContinue = [] | [{
|
|
18734
18865
|
maximumStatements?: number;
|
|
18866
|
+
checkShortBodies?: boolean;
|
|
18735
18867
|
}];
|
|
18736
18868
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
18737
18869
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -18741,6 +18873,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
18741
18873
|
// ----- unicorn/prefer-early-return -----
|
|
18742
18874
|
type UnicornPreferEarlyReturn = [] | [{
|
|
18743
18875
|
maximumStatements?: number;
|
|
18876
|
+
checkShortBodies?: boolean;
|
|
18744
18877
|
}];
|
|
18745
18878
|
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
18746
18879
|
type UnicornPreferExplicitViewportUnits = [] | [{
|