@2digits/eslint-config 2.7.2 → 2.7.4
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.cts +169 -150
- package/dist/index.d.ts +169 -150
- package/package.json +17 -17
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
10
10
|
interface RuleOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Enforce giving proper names to type parameters when there are two or more
|
|
13
|
-
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.3.
|
|
13
|
+
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.3.3/packages/eslint/src/rules/type-param-names.ts
|
|
14
14
|
*/
|
|
15
15
|
'@2digits/type-param-names'?: Linter.RuleEntry<[]>
|
|
16
16
|
/**
|
|
@@ -3624,7 +3624,7 @@ Backward pagination arguments
|
|
|
3624
3624
|
*/
|
|
3625
3625
|
'storybook/story-exports'?: Linter.RuleEntry<[]>
|
|
3626
3626
|
/**
|
|
3627
|
-
* Use expect from `@storybook/jest`
|
|
3627
|
+
* Use expect from `@storybook/test` or `@storybook/jest`
|
|
3628
3628
|
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-expect.md
|
|
3629
3629
|
*/
|
|
3630
3630
|
'storybook/use-storybook-expect'?: Linter.RuleEntry<[]>
|
|
@@ -4379,687 +4379,702 @@ Backward pagination arguments
|
|
|
4379
4379
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
4380
4380
|
/**
|
|
4381
4381
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
4382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/better-regex.md
|
|
4383
4383
|
*/
|
|
4384
4384
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
4385
4385
|
/**
|
|
4386
4386
|
* Enforce a specific parameter name in catch clauses.
|
|
4387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/catch-error-name.md
|
|
4388
4388
|
*/
|
|
4389
4389
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
4390
4390
|
/**
|
|
4391
4391
|
* Use destructured variables over properties.
|
|
4392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-destructuring.md
|
|
4393
4393
|
*/
|
|
4394
4394
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
4395
4395
|
/**
|
|
4396
4396
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4398
4398
|
*/
|
|
4399
4399
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
4400
|
+
/**
|
|
4401
|
+
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-existence-index-check.md
|
|
4403
|
+
*/
|
|
4404
|
+
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
4400
4405
|
/**
|
|
4401
4406
|
* Move function definitions to the highest possible scope.
|
|
4402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-function-scoping.md
|
|
4403
4408
|
*/
|
|
4404
4409
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
4405
4410
|
/**
|
|
4406
4411
|
* Enforce correct `Error` subclassing.
|
|
4407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/custom-error-definition.md
|
|
4408
4413
|
*/
|
|
4409
4414
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
4410
4415
|
/**
|
|
4411
4416
|
* Enforce no spaces between braces.
|
|
4412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/empty-brace-spaces.md
|
|
4413
4418
|
*/
|
|
4414
4419
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
4415
4420
|
/**
|
|
4416
4421
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/error-message.md
|
|
4418
4423
|
*/
|
|
4419
4424
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
4420
4425
|
/**
|
|
4421
4426
|
* Require escape sequences to use uppercase values.
|
|
4422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/escape-case.md
|
|
4423
4428
|
*/
|
|
4424
4429
|
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
4425
4430
|
/**
|
|
4426
4431
|
* Add expiration conditions to TODO comments.
|
|
4427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/expiring-todo-comments.md
|
|
4428
4433
|
*/
|
|
4429
4434
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
4430
4435
|
/**
|
|
4431
4436
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/explicit-length-check.md
|
|
4433
4438
|
*/
|
|
4434
4439
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
4435
4440
|
/**
|
|
4436
4441
|
* Enforce a case style for filenames.
|
|
4437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/filename-case.md
|
|
4438
4443
|
*/
|
|
4439
4444
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
4440
4445
|
/**
|
|
4441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#import-index
|
|
4442
4447
|
* @deprecated
|
|
4443
4448
|
*/
|
|
4444
4449
|
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
4445
4450
|
/**
|
|
4446
4451
|
* Enforce specific import styles per module.
|
|
4447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/import-style.md
|
|
4448
4453
|
*/
|
|
4449
4454
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
4450
4455
|
/**
|
|
4451
4456
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
4452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/new-for-builtins.md
|
|
4453
4458
|
*/
|
|
4454
4459
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
4455
4460
|
/**
|
|
4456
4461
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4458
4463
|
*/
|
|
4459
4464
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
4460
4465
|
/**
|
|
4461
4466
|
* Disallow anonymous functions and classes as the default export.
|
|
4462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-anonymous-default-export.md
|
|
4463
4468
|
*/
|
|
4464
4469
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
4465
4470
|
/**
|
|
4466
4471
|
* Prevent passing a function reference directly to iterator methods.
|
|
4467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-callback-reference.md
|
|
4468
4473
|
*/
|
|
4469
4474
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
4470
4475
|
/**
|
|
4471
4476
|
* Prefer `for…of` over the `forEach` method.
|
|
4472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-for-each.md
|
|
4473
4478
|
*/
|
|
4474
4479
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
4475
4480
|
/**
|
|
4476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-array-instanceof
|
|
4477
4482
|
* @deprecated
|
|
4478
4483
|
*/
|
|
4479
4484
|
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
4480
4485
|
/**
|
|
4481
4486
|
* Disallow using the `this` argument in array methods.
|
|
4482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-method-this-argument.md
|
|
4483
4488
|
*/
|
|
4484
4489
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
4485
4490
|
/**
|
|
4486
4491
|
* Enforce combining multiple `Array#push()` into one call.
|
|
4487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-push-push.md
|
|
4488
4493
|
*/
|
|
4489
4494
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
4490
4495
|
/**
|
|
4491
4496
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-reduce.md
|
|
4493
4498
|
*/
|
|
4494
4499
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
4495
4500
|
/**
|
|
4496
4501
|
* Disallow member access from await expression.
|
|
4497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-expression-member.md
|
|
4498
4503
|
*/
|
|
4499
4504
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
4500
4505
|
/**
|
|
4501
4506
|
* Disallow using `await` in `Promise` method parameters.
|
|
4502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4503
4508
|
*/
|
|
4504
4509
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
4505
4510
|
/**
|
|
4506
4511
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-console-spaces.md
|
|
4508
4513
|
*/
|
|
4509
4514
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
4510
4515
|
/**
|
|
4511
4516
|
* Do not use `document.cookie` directly.
|
|
4512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-document-cookie.md
|
|
4513
4518
|
*/
|
|
4514
4519
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
4515
4520
|
/**
|
|
4516
4521
|
* Disallow empty files.
|
|
4517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-empty-file.md
|
|
4518
4523
|
*/
|
|
4519
4524
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
4520
4525
|
/**
|
|
4521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
4522
4527
|
* @deprecated
|
|
4523
4528
|
*/
|
|
4524
4529
|
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
4525
4530
|
/**
|
|
4526
4531
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-for-loop.md
|
|
4528
4533
|
*/
|
|
4529
4534
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
4530
4535
|
/**
|
|
4531
4536
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
4532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-hex-escape.md
|
|
4533
4538
|
*/
|
|
4534
4539
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
4535
4540
|
/**
|
|
4536
4541
|
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
4537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-instanceof-array.md
|
|
4538
4543
|
*/
|
|
4539
4544
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
4540
4545
|
/**
|
|
4541
4546
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4543
4548
|
*/
|
|
4544
4549
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
4545
4550
|
/**
|
|
4546
4551
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4548
4553
|
*/
|
|
4549
4554
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
4550
4555
|
/**
|
|
4551
4556
|
* Disallow identifiers starting with `new` or `class`.
|
|
4552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-keyword-prefix.md
|
|
4553
4558
|
*/
|
|
4554
4559
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
4555
4560
|
/**
|
|
4556
4561
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
4557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-length-as-slice-end.md
|
|
4558
4563
|
*/
|
|
4559
4564
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
4560
4565
|
/**
|
|
4561
4566
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-lonely-if.md
|
|
4563
4568
|
*/
|
|
4564
4569
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
4565
4570
|
/**
|
|
4566
4571
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4568
4573
|
*/
|
|
4569
4574
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
4570
4575
|
/**
|
|
4571
4576
|
* Disallow negated conditions.
|
|
4572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negated-condition.md
|
|
4573
4578
|
*/
|
|
4574
4579
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
4575
4580
|
/**
|
|
4576
4581
|
* Disallow negated expression in equality check.
|
|
4577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4578
4583
|
*/
|
|
4579
4584
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
4580
4585
|
/**
|
|
4581
4586
|
* Disallow nested ternary expressions.
|
|
4582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-nested-ternary.md
|
|
4583
4588
|
*/
|
|
4584
4589
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
4585
4590
|
/**
|
|
4586
4591
|
* Disallow `new Array()`.
|
|
4587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-array.md
|
|
4588
4593
|
*/
|
|
4589
4594
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
4590
4595
|
/**
|
|
4591
4596
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-buffer.md
|
|
4593
4598
|
*/
|
|
4594
4599
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
4595
4600
|
/**
|
|
4596
4601
|
* Disallow the use of the `null` literal.
|
|
4597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-null.md
|
|
4598
4603
|
*/
|
|
4599
4604
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
4600
4605
|
/**
|
|
4601
4606
|
* Disallow the use of objects as default parameters.
|
|
4602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4603
4608
|
*/
|
|
4604
4609
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
4605
4610
|
/**
|
|
4606
4611
|
* Disallow `process.exit()`.
|
|
4607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-process-exit.md
|
|
4608
4613
|
*/
|
|
4609
4614
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
4610
4615
|
/**
|
|
4611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-reduce
|
|
4612
4617
|
* @deprecated
|
|
4613
4618
|
*/
|
|
4614
4619
|
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
4615
4620
|
/**
|
|
4616
4621
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
4617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4618
4623
|
*/
|
|
4619
4624
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
4620
4625
|
/**
|
|
4621
4626
|
* Disallow classes that only have static members.
|
|
4622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-static-only-class.md
|
|
4623
4628
|
*/
|
|
4624
4629
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
4625
4630
|
/**
|
|
4626
4631
|
* Disallow `then` property.
|
|
4627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-thenable.md
|
|
4628
4633
|
*/
|
|
4629
4634
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
4630
4635
|
/**
|
|
4631
4636
|
* Disallow assigning `this` to a variable.
|
|
4632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-this-assignment.md
|
|
4633
4638
|
*/
|
|
4634
4639
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
4635
4640
|
/**
|
|
4636
4641
|
* Disallow comparing `undefined` using `typeof`.
|
|
4637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-typeof-undefined.md
|
|
4638
4643
|
*/
|
|
4639
4644
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
4640
4645
|
/**
|
|
4641
4646
|
* Disallow awaiting non-promise values.
|
|
4642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-await.md
|
|
4643
4648
|
*/
|
|
4644
4649
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
4645
4650
|
/**
|
|
4646
4651
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
4647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
4648
4653
|
*/
|
|
4649
4654
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
4650
4655
|
/**
|
|
4651
4656
|
* Disallow unreadable array destructuring.
|
|
4652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
4653
4658
|
*/
|
|
4654
4659
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
4655
4660
|
/**
|
|
4656
4661
|
* Disallow unreadable IIFEs.
|
|
4657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-iife.md
|
|
4658
4663
|
*/
|
|
4659
4664
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
4660
4665
|
/**
|
|
4661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
|
4662
4667
|
* @deprecated
|
|
4663
4668
|
*/
|
|
4664
4669
|
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
4665
4670
|
/**
|
|
4666
4671
|
* Disallow unused object properties.
|
|
4667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unused-properties.md
|
|
4668
4673
|
*/
|
|
4669
4674
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
4670
4675
|
/**
|
|
4671
4676
|
* Disallow useless fallback when spreading in object literals.
|
|
4672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
4673
4678
|
*/
|
|
4674
4679
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
4675
4680
|
/**
|
|
4676
4681
|
* Disallow useless array length check.
|
|
4677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-length-check.md
|
|
4678
4683
|
*/
|
|
4679
4684
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
4680
4685
|
/**
|
|
4681
4686
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
4682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
4683
4688
|
*/
|
|
4684
4689
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
4685
4690
|
/**
|
|
4686
4691
|
* Disallow unnecessary spread.
|
|
4687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-spread.md
|
|
4688
4693
|
*/
|
|
4689
4694
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
4690
4695
|
/**
|
|
4691
4696
|
* Disallow useless case in switch statements.
|
|
4692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-switch-case.md
|
|
4693
4698
|
*/
|
|
4694
4699
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
4695
4700
|
/**
|
|
4696
4701
|
* Disallow useless `undefined`.
|
|
4697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-undefined.md
|
|
4698
4703
|
*/
|
|
4699
4704
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
4700
4705
|
/**
|
|
4701
4706
|
* Disallow number literals with zero fractions or dangling dots.
|
|
4702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-zero-fractions.md
|
|
4703
4708
|
*/
|
|
4704
4709
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
4705
4710
|
/**
|
|
4706
4711
|
* Enforce proper case for numeric literals.
|
|
4707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/number-literal-case.md
|
|
4708
4713
|
*/
|
|
4709
4714
|
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
4710
4715
|
/**
|
|
4711
4716
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
4712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/numeric-separators-style.md
|
|
4713
4718
|
*/
|
|
4714
4719
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
4715
4720
|
/**
|
|
4716
4721
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
4717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-add-event-listener.md
|
|
4718
4723
|
*/
|
|
4719
4724
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
4720
4725
|
/**
|
|
4721
4726
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
4722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-find.md
|
|
4723
4728
|
*/
|
|
4724
4729
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
4725
4730
|
/**
|
|
4726
4731
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
4727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat.md
|
|
4728
4733
|
*/
|
|
4729
4734
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
4730
4735
|
/**
|
|
4731
4736
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
4732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat-map.md
|
|
4733
4738
|
*/
|
|
4734
4739
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
4735
4740
|
/**
|
|
4736
4741
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
4737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-index-of.md
|
|
4738
4743
|
*/
|
|
4739
4744
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
4740
4745
|
/**
|
|
4741
4746
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
4742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-some.md
|
|
4743
4748
|
*/
|
|
4744
4749
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
4745
4750
|
/**
|
|
4746
4751
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
4747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-at.md
|
|
4748
4753
|
*/
|
|
4749
4754
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
4750
4755
|
/**
|
|
4751
4756
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
4752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
4753
4758
|
*/
|
|
4754
4759
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
4755
4760
|
/**
|
|
4756
4761
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
4757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-code-point.md
|
|
4758
4763
|
*/
|
|
4759
4764
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
4760
4765
|
/**
|
|
4761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-dataset
|
|
4762
4767
|
* @deprecated
|
|
4763
4768
|
*/
|
|
4764
4769
|
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
4765
4770
|
/**
|
|
4766
4771
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
4767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-date-now.md
|
|
4768
4773
|
*/
|
|
4769
4774
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
4770
4775
|
/**
|
|
4771
4776
|
* Prefer default parameters over reassignment.
|
|
4772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-default-parameters.md
|
|
4773
4778
|
*/
|
|
4774
4779
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
4775
4780
|
/**
|
|
4776
4781
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
4777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-append.md
|
|
4778
4783
|
*/
|
|
4779
4784
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
4780
4785
|
/**
|
|
4781
4786
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
4782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
4783
4788
|
*/
|
|
4784
4789
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
4785
4790
|
/**
|
|
4786
4791
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-remove.md
|
|
4788
4793
|
*/
|
|
4789
4794
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
4790
4795
|
/**
|
|
4791
4796
|
* Prefer `.textContent` over `.innerText`.
|
|
4792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
4793
4798
|
*/
|
|
4794
4799
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
4795
4800
|
/**
|
|
4796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-event-key
|
|
4797
4802
|
* @deprecated
|
|
4798
4803
|
*/
|
|
4799
4804
|
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
4800
4805
|
/**
|
|
4801
4806
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
4802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-event-target.md
|
|
4803
4808
|
*/
|
|
4804
4809
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
4805
4810
|
/**
|
|
4806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
4807
4812
|
* @deprecated
|
|
4808
4813
|
*/
|
|
4809
4814
|
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
4810
4815
|
/**
|
|
4811
4816
|
* Prefer `export…from` when re-exporting.
|
|
4812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-export-from.md
|
|
4813
4818
|
*/
|
|
4814
4819
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
4815
4820
|
/**
|
|
4816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-flat-map
|
|
4817
4822
|
* @deprecated
|
|
4818
4823
|
*/
|
|
4819
4824
|
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
4825
|
+
/**
|
|
4826
|
+
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-global-this.md
|
|
4828
|
+
*/
|
|
4829
|
+
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
4820
4830
|
/**
|
|
4821
4831
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-includes.md
|
|
4823
4833
|
*/
|
|
4824
4834
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
4825
4835
|
/**
|
|
4826
4836
|
* Prefer reading a JSON file as a buffer.
|
|
4827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
4828
4838
|
*/
|
|
4829
4839
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
4830
4840
|
/**
|
|
4831
4841
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
4832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
4833
4843
|
*/
|
|
4834
4844
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
4835
4845
|
/**
|
|
4836
4846
|
* Prefer using a logical operator over a ternary.
|
|
4837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4838
4848
|
*/
|
|
4839
4849
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
4850
|
+
/**
|
|
4851
|
+
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-min-max.md
|
|
4853
|
+
*/
|
|
4854
|
+
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
4840
4855
|
/**
|
|
4841
4856
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
4842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-trunc.md
|
|
4843
4858
|
*/
|
|
4844
4859
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
4845
4860
|
/**
|
|
4846
4861
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
4847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
4848
4863
|
*/
|
|
4849
4864
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
4850
4865
|
/**
|
|
4851
4866
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
4852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-math-apis.md
|
|
4853
4868
|
*/
|
|
4854
4869
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
4855
4870
|
/**
|
|
4856
4871
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-module.md
|
|
4858
4873
|
*/
|
|
4859
4874
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
4860
4875
|
/**
|
|
4861
4876
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
4863
4878
|
*/
|
|
4864
4879
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
4865
4880
|
/**
|
|
4866
4881
|
* Prefer negative index over `.length - index` when possible.
|
|
4867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-negative-index.md
|
|
4868
4883
|
*/
|
|
4869
4884
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
4870
4885
|
/**
|
|
4871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-append
|
|
4872
4887
|
* @deprecated
|
|
4873
4888
|
*/
|
|
4874
4889
|
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
4875
4890
|
/**
|
|
4876
4891
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-node-protocol.md
|
|
4878
4893
|
*/
|
|
4879
4894
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
4880
4895
|
/**
|
|
4881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-remove
|
|
4882
4897
|
* @deprecated
|
|
4883
4898
|
*/
|
|
4884
4899
|
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
4885
4900
|
/**
|
|
4886
4901
|
* Prefer `Number` static properties over global ones.
|
|
4887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-number-properties.md
|
|
4888
4903
|
*/
|
|
4889
4904
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
4890
4905
|
/**
|
|
4891
4906
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-object-from-entries.md
|
|
4893
4908
|
*/
|
|
4894
4909
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
4895
4910
|
/**
|
|
4896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
|
4897
4912
|
* @deprecated
|
|
4898
4913
|
*/
|
|
4899
4914
|
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
4900
4915
|
/**
|
|
4901
4916
|
* Prefer omitting the `catch` binding parameter.
|
|
4902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4903
4918
|
*/
|
|
4904
4919
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
4905
4920
|
/**
|
|
4906
4921
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-prototype-methods.md
|
|
4908
4923
|
*/
|
|
4909
4924
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
4910
4925
|
/**
|
|
4911
|
-
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
|
|
4912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4926
|
+
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-query-selector.md
|
|
4913
4928
|
*/
|
|
4914
4929
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
4915
4930
|
/**
|
|
4916
4931
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-reflect-apply.md
|
|
4918
4933
|
*/
|
|
4919
4934
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
4920
4935
|
/**
|
|
4921
4936
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-regexp-test.md
|
|
4923
4938
|
*/
|
|
4924
4939
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
4925
4940
|
/**
|
|
4926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-replace-all
|
|
4927
4942
|
* @deprecated
|
|
4928
4943
|
*/
|
|
4929
4944
|
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
4930
4945
|
/**
|
|
4931
4946
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-has.md
|
|
4933
4948
|
*/
|
|
4934
4949
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
4935
4950
|
/**
|
|
4936
4951
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
4937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-size.md
|
|
4938
4953
|
*/
|
|
4939
4954
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
4940
4955
|
/**
|
|
4941
4956
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-spread.md
|
|
4943
4958
|
*/
|
|
4944
4959
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
4945
4960
|
/**
|
|
4946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
4947
4962
|
* @deprecated
|
|
4948
4963
|
*/
|
|
4949
4964
|
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4950
4965
|
/**
|
|
4951
4966
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-raw.md
|
|
4953
4968
|
*/
|
|
4954
4969
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
4955
4970
|
/**
|
|
4956
4971
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-replace-all.md
|
|
4958
4973
|
*/
|
|
4959
4974
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
4960
4975
|
/**
|
|
4961
4976
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-slice.md
|
|
4963
4978
|
*/
|
|
4964
4979
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
4965
4980
|
/**
|
|
4966
4981
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4968
4983
|
*/
|
|
4969
4984
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4970
4985
|
/**
|
|
4971
4986
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4973
4988
|
*/
|
|
4974
4989
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4975
4990
|
/**
|
|
4976
4991
|
* Prefer using `structuredClone` to create a deep clone.
|
|
4977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-structured-clone.md
|
|
4978
4993
|
*/
|
|
4979
4994
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
4980
4995
|
/**
|
|
4981
4996
|
* Prefer `switch` over multiple `else-if`.
|
|
4982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-switch.md
|
|
4983
4998
|
*/
|
|
4984
4999
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
4985
5000
|
/**
|
|
4986
5001
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
4987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-ternary.md
|
|
4988
5003
|
*/
|
|
4989
5004
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
4990
5005
|
/**
|
|
4991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-text-content
|
|
4992
5007
|
* @deprecated
|
|
4993
5008
|
*/
|
|
4994
5009
|
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
4995
5010
|
/**
|
|
4996
5011
|
* Prefer top-level await over top-level promises and async function calls.
|
|
4997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-top-level-await.md
|
|
4998
5013
|
*/
|
|
4999
5014
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
5000
5015
|
/**
|
|
5001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
|
5002
5017
|
* @deprecated
|
|
5003
5018
|
*/
|
|
5004
5019
|
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
5005
5020
|
/**
|
|
5006
5021
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-type-error.md
|
|
5008
5023
|
*/
|
|
5009
5024
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
5010
5025
|
/**
|
|
5011
5026
|
* Prevent abbreviations.
|
|
5012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prevent-abbreviations.md
|
|
5013
5028
|
*/
|
|
5014
5029
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
5015
5030
|
/**
|
|
5016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#regex-shorthand
|
|
5017
5032
|
* @deprecated
|
|
5018
5033
|
*/
|
|
5019
5034
|
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
5020
5035
|
/**
|
|
5021
5036
|
* Enforce consistent relative URL style.
|
|
5022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/relative-url-style.md
|
|
5023
5038
|
*/
|
|
5024
5039
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
5025
5040
|
/**
|
|
5026
5041
|
* Enforce using the separator argument with `Array#join()`.
|
|
5027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-array-join-separator.md
|
|
5028
5043
|
*/
|
|
5029
5044
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
5030
5045
|
/**
|
|
5031
5046
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5033
5048
|
*/
|
|
5034
5049
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
5035
5050
|
/**
|
|
5036
5051
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-post-message-target-origin.md
|
|
5038
5053
|
*/
|
|
5039
5054
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
5040
5055
|
/**
|
|
5041
5056
|
* Enforce better string content.
|
|
5042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/string-content.md
|
|
5043
5058
|
*/
|
|
5044
5059
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
5045
5060
|
/**
|
|
5046
5061
|
* Enforce consistent brace style for `case` clauses.
|
|
5047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/switch-case-braces.md
|
|
5048
5063
|
*/
|
|
5049
5064
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
5050
5065
|
/**
|
|
5051
5066
|
* Fix whitespace-insensitive template indentation.
|
|
5052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/template-indent.md
|
|
5053
5068
|
*/
|
|
5054
5069
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
5055
5070
|
/**
|
|
5056
5071
|
* Enforce consistent case for text encoding identifiers.
|
|
5057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5058
5073
|
*/
|
|
5059
5074
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
5060
5075
|
/**
|
|
5061
5076
|
* Require `new` when creating an error.
|
|
5062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/throw-new-error.md
|
|
5063
5078
|
*/
|
|
5064
5079
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
5065
5080
|
/**
|
|
@@ -5903,6 +5918,7 @@ type JsdocRequireParam = []|[{
|
|
|
5903
5918
|
enableRestElementFixer?: boolean
|
|
5904
5919
|
enableRootFixer?: boolean
|
|
5905
5920
|
exemptedBy?: string[]
|
|
5921
|
+
ignoreWhenAllParamsMissing?: boolean
|
|
5906
5922
|
unnamedRootBase?: string[]
|
|
5907
5923
|
useDefaultObjectProperties?: boolean
|
|
5908
5924
|
}]
|
|
@@ -7405,22 +7421,22 @@ type ReactForbidComponentProps = []|[{
|
|
|
7405
7421
|
forbid?: (string | {
|
|
7406
7422
|
propName?: string
|
|
7407
7423
|
allowedFor?: string[]
|
|
7424
|
+
allowedForPatterns?: string[]
|
|
7408
7425
|
message?: string
|
|
7426
|
+
} | ({
|
|
7427
|
+
[k: string]: unknown | undefined
|
|
7409
7428
|
} | {
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
disallowedFor: [string, ...(string)[]]
|
|
7413
|
-
message?: string
|
|
7414
|
-
} | {
|
|
7429
|
+
[k: string]: unknown | undefined
|
|
7430
|
+
}) | {
|
|
7415
7431
|
propNamePattern?: string
|
|
7416
7432
|
allowedFor?: string[]
|
|
7433
|
+
allowedForPatterns?: string[]
|
|
7417
7434
|
message?: string
|
|
7435
|
+
} | ({
|
|
7436
|
+
[k: string]: unknown | undefined
|
|
7418
7437
|
} | {
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
disallowedFor: [string, ...(string)[]]
|
|
7422
|
-
message?: string
|
|
7423
|
-
})[]
|
|
7438
|
+
[k: string]: unknown | undefined
|
|
7439
|
+
}))[]
|
|
7424
7440
|
[k: string]: unknown | undefined
|
|
7425
7441
|
}]
|
|
7426
7442
|
// ----- react/forbid-dom-props -----
|
|
@@ -7757,6 +7773,7 @@ type ReactNoUnsafe = []|[{
|
|
|
7757
7773
|
type ReactNoUnstableNestedComponents = []|[{
|
|
7758
7774
|
customValidators?: string[]
|
|
7759
7775
|
allowAsProps?: boolean
|
|
7776
|
+
propNamePattern?: string
|
|
7760
7777
|
}]
|
|
7761
7778
|
// ----- react/no-unused-prop-types -----
|
|
7762
7779
|
type ReactNoUnusedPropTypes = []|[{
|
|
@@ -8816,6 +8833,8 @@ type TsNoUnnecessaryCondition = []|[{
|
|
|
8816
8833
|
allowConstantLoopConditions?: boolean
|
|
8817
8834
|
|
|
8818
8835
|
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
|
|
8836
|
+
|
|
8837
|
+
checkTypePredicates?: boolean
|
|
8819
8838
|
}]
|
|
8820
8839
|
// ----- ts/no-unnecessary-type-assertion -----
|
|
8821
8840
|
type TsNoUnnecessaryTypeAssertion = []|[{
|