@2digits/eslint-config 2.15.1 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +158 -211
- package/dist/index.d.ts +158 -211
- package/package.json +8 -8
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.33/packages/eslint/src/rules/type-param-names.ts
|
|
14
14
|
*/
|
|
15
15
|
'@2digits/type-param-names'?: Linter.RuleEntry<[]>
|
|
16
16
|
/**
|
|
@@ -5897,7 +5897,7 @@ Backward pagination arguments
|
|
|
5897
5897
|
*/
|
|
5898
5898
|
'ts/no-for-in-array'?: Linter.RuleEntry<[]>
|
|
5899
5899
|
/**
|
|
5900
|
-
* Disallow the use of `eval()`-like
|
|
5900
|
+
* Disallow the use of `eval()`-like functions
|
|
5901
5901
|
* @see https://typescript-eslint.io/rules/no-implied-eval
|
|
5902
5902
|
*/
|
|
5903
5903
|
'ts/no-implied-eval'?: Linter.RuleEntry<[]>
|
|
@@ -6353,702 +6353,642 @@ Backward pagination arguments
|
|
|
6353
6353
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
6354
6354
|
/**
|
|
6355
6355
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/better-regex.md
|
|
6357
6357
|
*/
|
|
6358
6358
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
6359
6359
|
/**
|
|
6360
6360
|
* Enforce a specific parameter name in catch clauses.
|
|
6361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/catch-error-name.md
|
|
6362
6362
|
*/
|
|
6363
6363
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
6364
|
+
/**
|
|
6365
|
+
* Enforce consistent assertion style with `node:assert`.
|
|
6366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-assert.md
|
|
6367
|
+
*/
|
|
6368
|
+
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
6369
|
+
/**
|
|
6370
|
+
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-date-clone.md
|
|
6372
|
+
*/
|
|
6373
|
+
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
6364
6374
|
/**
|
|
6365
6375
|
* Use destructured variables over properties.
|
|
6366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-destructuring.md
|
|
6367
6377
|
*/
|
|
6368
6378
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
6369
6379
|
/**
|
|
6370
6380
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6372
6382
|
*/
|
|
6373
6383
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
6374
6384
|
/**
|
|
6375
6385
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-existence-index-check.md
|
|
6377
6387
|
*/
|
|
6378
6388
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
6379
6389
|
/**
|
|
6380
6390
|
* Move function definitions to the highest possible scope.
|
|
6381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-function-scoping.md
|
|
6382
6392
|
*/
|
|
6383
6393
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
6384
6394
|
/**
|
|
6385
6395
|
* Enforce correct `Error` subclassing.
|
|
6386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/custom-error-definition.md
|
|
6387
6397
|
*/
|
|
6388
6398
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
6389
6399
|
/**
|
|
6390
6400
|
* Enforce no spaces between braces.
|
|
6391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/empty-brace-spaces.md
|
|
6392
6402
|
*/
|
|
6393
6403
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
6394
6404
|
/**
|
|
6395
6405
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/error-message.md
|
|
6397
6407
|
*/
|
|
6398
6408
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
6399
6409
|
/**
|
|
6400
6410
|
* Require escape sequences to use uppercase values.
|
|
6401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/escape-case.md
|
|
6402
6412
|
*/
|
|
6403
6413
|
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
6404
6414
|
/**
|
|
6405
6415
|
* Add expiration conditions to TODO comments.
|
|
6406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/expiring-todo-comments.md
|
|
6407
6417
|
*/
|
|
6408
6418
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
6409
6419
|
/**
|
|
6410
6420
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/explicit-length-check.md
|
|
6412
6422
|
*/
|
|
6413
6423
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
6414
6424
|
/**
|
|
6415
6425
|
* Enforce a case style for filenames.
|
|
6416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/filename-case.md
|
|
6417
6427
|
*/
|
|
6418
6428
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
6419
|
-
/**
|
|
6420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#import-index
|
|
6421
|
-
* @deprecated
|
|
6422
|
-
*/
|
|
6423
|
-
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
6424
6429
|
/**
|
|
6425
6430
|
* Enforce specific import styles per module.
|
|
6426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/import-style.md
|
|
6427
6432
|
*/
|
|
6428
6433
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
6429
6434
|
/**
|
|
6430
6435
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/new-for-builtins.md
|
|
6432
6437
|
*/
|
|
6433
6438
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
6434
6439
|
/**
|
|
6435
6440
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6437
6442
|
*/
|
|
6438
6443
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
6444
|
+
/**
|
|
6445
|
+
* Disallow recursive access to `this` within getters and setters.
|
|
6446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-accessor-recursion.md
|
|
6447
|
+
*/
|
|
6448
|
+
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
6439
6449
|
/**
|
|
6440
6450
|
* Disallow anonymous functions and classes as the default export.
|
|
6441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-anonymous-default-export.md
|
|
6442
6452
|
*/
|
|
6443
6453
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
6444
6454
|
/**
|
|
6445
6455
|
* Prevent passing a function reference directly to iterator methods.
|
|
6446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-callback-reference.md
|
|
6447
6457
|
*/
|
|
6448
6458
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
6449
6459
|
/**
|
|
6450
6460
|
* Prefer `for…of` over the `forEach` method.
|
|
6451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-for-each.md
|
|
6452
6462
|
*/
|
|
6453
6463
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
6454
|
-
/**
|
|
6455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-array-instanceof
|
|
6456
|
-
* @deprecated
|
|
6457
|
-
*/
|
|
6458
|
-
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
6459
6464
|
/**
|
|
6460
6465
|
* Disallow using the `this` argument in array methods.
|
|
6461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-method-this-argument.md
|
|
6462
6467
|
*/
|
|
6463
6468
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
6464
6469
|
/**
|
|
6465
6470
|
* Enforce combining multiple `Array#push()` into one call.
|
|
6466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-push-push.md
|
|
6467
6472
|
*/
|
|
6468
6473
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
6469
6474
|
/**
|
|
6470
6475
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-reduce.md
|
|
6472
6477
|
*/
|
|
6473
6478
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
6474
6479
|
/**
|
|
6475
6480
|
* Disallow member access from await expression.
|
|
6476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-expression-member.md
|
|
6477
6482
|
*/
|
|
6478
6483
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
6479
6484
|
/**
|
|
6480
6485
|
* Disallow using `await` in `Promise` method parameters.
|
|
6481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6482
6487
|
*/
|
|
6483
6488
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6484
6489
|
/**
|
|
6485
6490
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-console-spaces.md
|
|
6487
6492
|
*/
|
|
6488
6493
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
6489
6494
|
/**
|
|
6490
6495
|
* Do not use `document.cookie` directly.
|
|
6491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-document-cookie.md
|
|
6492
6497
|
*/
|
|
6493
6498
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
6494
6499
|
/**
|
|
6495
6500
|
* Disallow empty files.
|
|
6496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-empty-file.md
|
|
6497
6502
|
*/
|
|
6498
6503
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
6499
|
-
/**
|
|
6500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
6501
|
-
* @deprecated
|
|
6502
|
-
*/
|
|
6503
|
-
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
6504
6504
|
/**
|
|
6505
6505
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-for-loop.md
|
|
6507
6507
|
*/
|
|
6508
6508
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
6509
6509
|
/**
|
|
6510
6510
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-hex-escape.md
|
|
6512
6512
|
*/
|
|
6513
6513
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
6514
6514
|
/**
|
|
6515
|
-
*
|
|
6516
|
-
* @
|
|
6515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
6516
|
+
* @deprecated
|
|
6517
6517
|
*/
|
|
6518
6518
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
6519
|
+
/**
|
|
6520
|
+
* Disallow `instanceof` with built-in objects
|
|
6521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-instanceof-builtins.md
|
|
6522
|
+
*/
|
|
6523
|
+
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
6519
6524
|
/**
|
|
6520
6525
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6522
6527
|
*/
|
|
6523
6528
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
6524
6529
|
/**
|
|
6525
6530
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6527
6532
|
*/
|
|
6528
6533
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
6529
6534
|
/**
|
|
6530
6535
|
* Disallow identifiers starting with `new` or `class`.
|
|
6531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-keyword-prefix.md
|
|
6532
6537
|
*/
|
|
6533
6538
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
6534
6539
|
/**
|
|
6535
6540
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-length-as-slice-end.md
|
|
6537
6542
|
*/
|
|
6538
6543
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
6539
6544
|
/**
|
|
6540
6545
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-lonely-if.md
|
|
6542
6547
|
*/
|
|
6543
6548
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
6544
6549
|
/**
|
|
6545
6550
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6547
6552
|
*/
|
|
6548
6553
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6554
|
+
/**
|
|
6555
|
+
* Disallow named usage of default import and export.
|
|
6556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-named-default.md
|
|
6557
|
+
*/
|
|
6558
|
+
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
6549
6559
|
/**
|
|
6550
6560
|
* Disallow negated conditions.
|
|
6551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negated-condition.md
|
|
6552
6562
|
*/
|
|
6553
6563
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
6554
6564
|
/**
|
|
6555
6565
|
* Disallow negated expression in equality check.
|
|
6556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6557
6567
|
*/
|
|
6558
6568
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
6559
6569
|
/**
|
|
6560
6570
|
* Disallow nested ternary expressions.
|
|
6561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-nested-ternary.md
|
|
6562
6572
|
*/
|
|
6563
6573
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
6564
6574
|
/**
|
|
6565
6575
|
* Disallow `new Array()`.
|
|
6566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-array.md
|
|
6567
6577
|
*/
|
|
6568
6578
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
6569
6579
|
/**
|
|
6570
6580
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-buffer.md
|
|
6572
6582
|
*/
|
|
6573
6583
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
6574
6584
|
/**
|
|
6575
6585
|
* Disallow the use of the `null` literal.
|
|
6576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-null.md
|
|
6577
6587
|
*/
|
|
6578
6588
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
6579
6589
|
/**
|
|
6580
6590
|
* Disallow the use of objects as default parameters.
|
|
6581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6582
6592
|
*/
|
|
6583
6593
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
6584
6594
|
/**
|
|
6585
6595
|
* Disallow `process.exit()`.
|
|
6586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-process-exit.md
|
|
6587
6597
|
*/
|
|
6588
6598
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
6589
|
-
/**
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-reduce
|
|
6591
|
-
* @deprecated
|
|
6592
|
-
*/
|
|
6593
|
-
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
6594
6599
|
/**
|
|
6595
6600
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6597
6602
|
*/
|
|
6598
6603
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6599
6604
|
/**
|
|
6600
6605
|
* Disallow classes that only have static members.
|
|
6601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-static-only-class.md
|
|
6602
6607
|
*/
|
|
6603
6608
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
6604
6609
|
/**
|
|
6605
6610
|
* Disallow `then` property.
|
|
6606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-thenable.md
|
|
6607
6612
|
*/
|
|
6608
6613
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
6609
6614
|
/**
|
|
6610
6615
|
* Disallow assigning `this` to a variable.
|
|
6611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-this-assignment.md
|
|
6612
6617
|
*/
|
|
6613
6618
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
6614
6619
|
/**
|
|
6615
6620
|
* Disallow comparing `undefined` using `typeof`.
|
|
6616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-typeof-undefined.md
|
|
6617
6622
|
*/
|
|
6618
6623
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
6619
6624
|
/**
|
|
6620
6625
|
* Disallow awaiting non-promise values.
|
|
6621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-await.md
|
|
6622
6627
|
*/
|
|
6623
6628
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
6624
6629
|
/**
|
|
6625
6630
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6627
6632
|
*/
|
|
6628
6633
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
6629
6634
|
/**
|
|
6630
6635
|
* Disallow unreadable array destructuring.
|
|
6631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6632
6637
|
*/
|
|
6633
6638
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
6634
6639
|
/**
|
|
6635
6640
|
* Disallow unreadable IIFEs.
|
|
6636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-iife.md
|
|
6637
6642
|
*/
|
|
6638
6643
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
6639
|
-
/**
|
|
6640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-unsafe-regex
|
|
6641
|
-
* @deprecated
|
|
6642
|
-
*/
|
|
6643
|
-
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
6644
6644
|
/**
|
|
6645
6645
|
* Disallow unused object properties.
|
|
6646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unused-properties.md
|
|
6647
6647
|
*/
|
|
6648
6648
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
6649
6649
|
/**
|
|
6650
6650
|
* Disallow useless fallback when spreading in object literals.
|
|
6651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6652
6652
|
*/
|
|
6653
6653
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
6654
6654
|
/**
|
|
6655
6655
|
* Disallow useless array length check.
|
|
6656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-length-check.md
|
|
6657
6657
|
*/
|
|
6658
6658
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
6659
6659
|
/**
|
|
6660
6660
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6662
6662
|
*/
|
|
6663
6663
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
6664
6664
|
/**
|
|
6665
6665
|
* Disallow unnecessary spread.
|
|
6666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-spread.md
|
|
6667
6667
|
*/
|
|
6668
6668
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
6669
6669
|
/**
|
|
6670
6670
|
* Disallow useless case in switch statements.
|
|
6671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-switch-case.md
|
|
6672
6672
|
*/
|
|
6673
6673
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
6674
6674
|
/**
|
|
6675
6675
|
* Disallow useless `undefined`.
|
|
6676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-undefined.md
|
|
6677
6677
|
*/
|
|
6678
6678
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
6679
6679
|
/**
|
|
6680
6680
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-zero-fractions.md
|
|
6682
6682
|
*/
|
|
6683
6683
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
6684
6684
|
/**
|
|
6685
6685
|
* Enforce proper case for numeric literals.
|
|
6686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/number-literal-case.md
|
|
6687
6687
|
*/
|
|
6688
6688
|
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
6689
6689
|
/**
|
|
6690
6690
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/numeric-separators-style.md
|
|
6692
6692
|
*/
|
|
6693
6693
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
6694
6694
|
/**
|
|
6695
6695
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-add-event-listener.md
|
|
6697
6697
|
*/
|
|
6698
6698
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
6699
6699
|
/**
|
|
6700
6700
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-find.md
|
|
6702
6702
|
*/
|
|
6703
6703
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
6704
6704
|
/**
|
|
6705
6705
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat.md
|
|
6707
6707
|
*/
|
|
6708
6708
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
6709
6709
|
/**
|
|
6710
6710
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat-map.md
|
|
6712
6712
|
*/
|
|
6713
6713
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
6714
6714
|
/**
|
|
6715
6715
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-index-of.md
|
|
6717
6717
|
*/
|
|
6718
6718
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
6719
6719
|
/**
|
|
6720
6720
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-some.md
|
|
6722
6722
|
*/
|
|
6723
6723
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
6724
6724
|
/**
|
|
6725
6725
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-at.md
|
|
6727
6727
|
*/
|
|
6728
6728
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
6729
6729
|
/**
|
|
6730
6730
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6732
6732
|
*/
|
|
6733
6733
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
6734
6734
|
/**
|
|
6735
6735
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-code-point.md
|
|
6737
6737
|
*/
|
|
6738
6738
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
6739
|
-
/**
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-dataset
|
|
6741
|
-
* @deprecated
|
|
6742
|
-
*/
|
|
6743
|
-
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
6744
6739
|
/**
|
|
6745
6740
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-date-now.md
|
|
6747
6742
|
*/
|
|
6748
6743
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
6749
6744
|
/**
|
|
6750
6745
|
* Prefer default parameters over reassignment.
|
|
6751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-default-parameters.md
|
|
6752
6747
|
*/
|
|
6753
6748
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
6754
6749
|
/**
|
|
6755
6750
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-append.md
|
|
6757
6752
|
*/
|
|
6758
6753
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
6759
6754
|
/**
|
|
6760
6755
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6762
6757
|
*/
|
|
6763
6758
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
6764
6759
|
/**
|
|
6765
6760
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6767
6762
|
*/
|
|
6768
6763
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
6769
6764
|
/**
|
|
6770
6765
|
* Prefer `.textContent` over `.innerText`.
|
|
6771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6772
6767
|
*/
|
|
6773
6768
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
6774
|
-
/**
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-event-key
|
|
6776
|
-
* @deprecated
|
|
6777
|
-
*/
|
|
6778
|
-
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
6779
6769
|
/**
|
|
6780
6770
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-event-target.md
|
|
6782
6772
|
*/
|
|
6783
6773
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
6784
|
-
/**
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
6786
|
-
* @deprecated
|
|
6787
|
-
*/
|
|
6788
|
-
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
6789
6774
|
/**
|
|
6790
6775
|
* Prefer `export…from` when re-exporting.
|
|
6791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-export-from.md
|
|
6792
6777
|
*/
|
|
6793
6778
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
6794
|
-
/**
|
|
6795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-flat-map
|
|
6796
|
-
* @deprecated
|
|
6797
|
-
*/
|
|
6798
|
-
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
6799
6779
|
/**
|
|
6800
6780
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-global-this.md
|
|
6802
6782
|
*/
|
|
6803
6783
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
6804
6784
|
/**
|
|
6805
6785
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-includes.md
|
|
6807
6787
|
*/
|
|
6808
6788
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
6809
6789
|
/**
|
|
6810
6790
|
* Prefer reading a JSON file as a buffer.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6812
6792
|
*/
|
|
6813
6793
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
6814
6794
|
/**
|
|
6815
6795
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6817
6797
|
*/
|
|
6818
6798
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
6819
6799
|
/**
|
|
6820
6800
|
* Prefer using a logical operator over a ternary.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6822
6802
|
*/
|
|
6823
6803
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
6824
6804
|
/**
|
|
6825
6805
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-min-max.md
|
|
6827
6807
|
*/
|
|
6828
6808
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
6829
6809
|
/**
|
|
6830
6810
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-trunc.md
|
|
6832
6812
|
*/
|
|
6833
6813
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
6834
6814
|
/**
|
|
6835
6815
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6837
6817
|
*/
|
|
6838
6818
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
6839
6819
|
/**
|
|
6840
6820
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6842
6822
|
*/
|
|
6843
6823
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
6844
6824
|
/**
|
|
6845
6825
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-module.md
|
|
6847
6827
|
*/
|
|
6848
6828
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
6849
6829
|
/**
|
|
6850
6830
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6852
6832
|
*/
|
|
6853
6833
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
6854
6834
|
/**
|
|
6855
6835
|
* Prefer negative index over `.length - index` when possible.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-negative-index.md
|
|
6857
6837
|
*/
|
|
6858
6838
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
6859
|
-
/**
|
|
6860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-append
|
|
6861
|
-
* @deprecated
|
|
6862
|
-
*/
|
|
6863
|
-
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
6864
6839
|
/**
|
|
6865
6840
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-node-protocol.md
|
|
6867
6842
|
*/
|
|
6868
6843
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
6869
|
-
/**
|
|
6870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-remove
|
|
6871
|
-
* @deprecated
|
|
6872
|
-
*/
|
|
6873
|
-
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
6874
6844
|
/**
|
|
6875
6845
|
* Prefer `Number` static properties over global ones.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-number-properties.md
|
|
6877
6847
|
*/
|
|
6878
6848
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
6879
6849
|
/**
|
|
6880
6850
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-object-from-entries.md
|
|
6882
6852
|
*/
|
|
6883
6853
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
6884
|
-
/**
|
|
6885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-object-has-own
|
|
6886
|
-
* @deprecated
|
|
6887
|
-
*/
|
|
6888
|
-
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
6889
6854
|
/**
|
|
6890
6855
|
* Prefer omitting the `catch` binding parameter.
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6892
6857
|
*/
|
|
6893
6858
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
6894
6859
|
/**
|
|
6895
6860
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-prototype-methods.md
|
|
6897
6862
|
*/
|
|
6898
6863
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
6899
6864
|
/**
|
|
6900
6865
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-query-selector.md
|
|
6902
6867
|
*/
|
|
6903
6868
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
6904
6869
|
/**
|
|
6905
6870
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-reflect-apply.md
|
|
6907
6872
|
*/
|
|
6908
6873
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
6909
6874
|
/**
|
|
6910
6875
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-regexp-test.md
|
|
6912
6877
|
*/
|
|
6913
6878
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
6914
|
-
/**
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-replace-all
|
|
6916
|
-
* @deprecated
|
|
6917
|
-
*/
|
|
6918
|
-
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
6919
6879
|
/**
|
|
6920
6880
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-has.md
|
|
6922
6882
|
*/
|
|
6923
6883
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
6924
6884
|
/**
|
|
6925
6885
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-size.md
|
|
6927
6887
|
*/
|
|
6928
6888
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
6929
6889
|
/**
|
|
6930
6890
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-spread.md
|
|
6932
6892
|
*/
|
|
6933
6893
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
6934
|
-
/**
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
6936
|
-
* @deprecated
|
|
6937
|
-
*/
|
|
6938
|
-
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
6939
6894
|
/**
|
|
6940
6895
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-raw.md
|
|
6942
6897
|
*/
|
|
6943
6898
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
6944
6899
|
/**
|
|
6945
6900
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-replace-all.md
|
|
6947
6902
|
*/
|
|
6948
6903
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
6949
6904
|
/**
|
|
6950
6905
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-slice.md
|
|
6952
6907
|
*/
|
|
6953
6908
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
6954
6909
|
/**
|
|
6955
6910
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6957
6912
|
*/
|
|
6958
6913
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
6959
6914
|
/**
|
|
6960
6915
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6962
6917
|
*/
|
|
6963
6918
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
6964
6919
|
/**
|
|
6965
6920
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-structured-clone.md
|
|
6967
6922
|
*/
|
|
6968
6923
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
6969
6924
|
/**
|
|
6970
6925
|
* Prefer `switch` over multiple `else-if`.
|
|
6971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-switch.md
|
|
6972
6927
|
*/
|
|
6973
6928
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
6974
6929
|
/**
|
|
6975
6930
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-ternary.md
|
|
6977
6932
|
*/
|
|
6978
6933
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
6979
|
-
/**
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-text-content
|
|
6981
|
-
* @deprecated
|
|
6982
|
-
*/
|
|
6983
|
-
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
6984
6934
|
/**
|
|
6985
6935
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-top-level-await.md
|
|
6987
6937
|
*/
|
|
6988
6938
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
6989
|
-
/**
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-trim-start-end
|
|
6991
|
-
* @deprecated
|
|
6992
|
-
*/
|
|
6993
|
-
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
6994
6939
|
/**
|
|
6995
6940
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-type-error.md
|
|
6997
6942
|
*/
|
|
6998
6943
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
6999
6944
|
/**
|
|
7000
6945
|
* Prevent abbreviations.
|
|
7001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prevent-abbreviations.md
|
|
7002
6947
|
*/
|
|
7003
6948
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
7004
|
-
/**
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#regex-shorthand
|
|
7006
|
-
* @deprecated
|
|
7007
|
-
*/
|
|
7008
|
-
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
7009
6949
|
/**
|
|
7010
6950
|
* Enforce consistent relative URL style.
|
|
7011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/relative-url-style.md
|
|
7012
6952
|
*/
|
|
7013
6953
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
7014
6954
|
/**
|
|
7015
6955
|
* Enforce using the separator argument with `Array#join()`.
|
|
7016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-array-join-separator.md
|
|
7017
6957
|
*/
|
|
7018
6958
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
7019
6959
|
/**
|
|
7020
6960
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7022
6962
|
*/
|
|
7023
6963
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
7024
6964
|
/**
|
|
7025
6965
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-post-message-target-origin.md
|
|
7027
6967
|
*/
|
|
7028
6968
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
7029
6969
|
/**
|
|
7030
6970
|
* Enforce better string content.
|
|
7031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/string-content.md
|
|
7032
6972
|
*/
|
|
7033
6973
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
7034
6974
|
/**
|
|
7035
6975
|
* Enforce consistent brace style for `case` clauses.
|
|
7036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/switch-case-braces.md
|
|
7037
6977
|
*/
|
|
7038
6978
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
7039
6979
|
/**
|
|
7040
6980
|
* Fix whitespace-insensitive template indentation.
|
|
7041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/template-indent.md
|
|
7042
6982
|
*/
|
|
7043
6983
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
7044
6984
|
/**
|
|
7045
6985
|
* Enforce consistent case for text encoding identifiers.
|
|
7046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7047
6987
|
*/
|
|
7048
6988
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
7049
6989
|
/**
|
|
7050
6990
|
* Require `new` when creating an error.
|
|
7051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/throw-new-error.md
|
|
7052
6992
|
*/
|
|
7053
6993
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
7054
6994
|
/**
|
|
@@ -11989,6 +11929,13 @@ type UnicornNoArrayPushPush = []|[{
|
|
|
11989
11929
|
type UnicornNoArrayReduce = []|[{
|
|
11990
11930
|
allowSimpleOperations?: boolean
|
|
11991
11931
|
}]
|
|
11932
|
+
// ----- unicorn/no-instanceof-builtins -----
|
|
11933
|
+
type UnicornNoInstanceofBuiltins = []|[{
|
|
11934
|
+
useErrorIsError?: boolean
|
|
11935
|
+
strategy?: ("loose" | "strict")
|
|
11936
|
+
include?: string[]
|
|
11937
|
+
exclude?: string[]
|
|
11938
|
+
}]
|
|
11992
11939
|
// ----- unicorn/no-keyword-prefix -----
|
|
11993
11940
|
type UnicornNoKeywordPrefix = []|[{
|
|
11994
11941
|
|