@w5s/eslint-config 3.20.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +410 -336
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/typegen/e18e.d.ts +12 -0
- package/src/typegen/jsdoc.d.ts +2 -0
- package/src/typegen/ts.d.ts +1 -0
- package/src/typegen/unicorn.d.ts +400 -336
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ interface RuleOptions$15 {
|
|
|
52
52
|
* Prefer Array.prototype.toSpliced() over copying and splicing arrays
|
|
53
53
|
*/
|
|
54
54
|
'e18e/prefer-array-to-spliced'?: Linter.RuleEntry<[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Prefer `charCodeAt()` over indexed string access for single-character comparisons inside loops
|
|
57
|
+
*/
|
|
58
|
+
'e18e/prefer-charcode-at-in-loop'?: Linter.RuleEntry<[]>;
|
|
55
59
|
/**
|
|
56
60
|
* Prefer Date.now() over new Date().getTime() and +new Date()
|
|
57
61
|
*/
|
|
@@ -92,6 +96,10 @@ interface RuleOptions$15 {
|
|
|
92
96
|
* prefer `RegExp.test()` over `String.match()` and `RegExp.exec()` when only checking for match existence
|
|
93
97
|
*/
|
|
94
98
|
'e18e/prefer-regex-test'?: Linter.RuleEntry<[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Prefer `indexOf(needle)` and `slice(...)` over `split()[N]` when splitting a string into two pieces.
|
|
101
|
+
*/
|
|
102
|
+
'e18e/prefer-slice-over-split-index'?: Linter.RuleEntry<[]>;
|
|
95
103
|
/**
|
|
96
104
|
* Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
|
|
97
105
|
*/
|
|
@@ -108,6 +116,10 @@ interface RuleOptions$15 {
|
|
|
108
116
|
* Prefer String.fromCharCode() over String.fromCodePoint() for code points below 0x10000
|
|
109
117
|
*/
|
|
110
118
|
'e18e/prefer-string-fromcharcode'?: Linter.RuleEntry<[]>;
|
|
119
|
+
/**
|
|
120
|
+
* Prefer `{throwIfNoEntry: false}` over relying on a thrown error for missing fs entries from sync stat calls
|
|
121
|
+
*/
|
|
122
|
+
'e18e/prefer-throw-if-no-entry'?: Linter.RuleEntry<[]>;
|
|
111
123
|
/**
|
|
112
124
|
* Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
|
|
113
125
|
*/
|
|
@@ -2132,6 +2144,7 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
2132
2144
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
2133
2145
|
canonicalForm?: ("pipe" | "prefix");
|
|
2134
2146
|
enableFixer?: boolean;
|
|
2147
|
+
wrapBareUrls?: boolean;
|
|
2135
2148
|
}];
|
|
2136
2149
|
// ----- jsdoc/prefer-import-tag -----
|
|
2137
2150
|
type JsdocPreferImportTag = [] | [{
|
|
@@ -9980,6 +9993,7 @@ interface RuleOptions$3 {
|
|
|
9980
9993
|
/**
|
|
9981
9994
|
* Disallow specified modules when loaded by `import`
|
|
9982
9995
|
* @see https://typescript-eslint.io/rules/no-restricted-imports
|
|
9996
|
+
* @deprecated
|
|
9983
9997
|
*/
|
|
9984
9998
|
'ts/no-restricted-imports'?: Linter.RuleEntry<TsNoRestrictedImports>;
|
|
9985
9999
|
/**
|
|
@@ -11335,1670 +11349,1715 @@ declare module 'eslint' {
|
|
|
11335
11349
|
interface RuleOptions$2 {
|
|
11336
11350
|
/**
|
|
11337
11351
|
* Prefer better DOM traversal APIs.
|
|
11338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/better-dom-traversing.md
|
|
11339
11353
|
*/
|
|
11340
11354
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
11341
11355
|
/**
|
|
11342
11356
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
11343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
11344
11358
|
* @deprecated
|
|
11345
11359
|
*/
|
|
11346
11360
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
11347
11361
|
/**
|
|
11348
11362
|
* Enforce a specific parameter name in catch clauses.
|
|
11349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/catch-error-name.md
|
|
11350
11364
|
*/
|
|
11351
11365
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
11352
11366
|
/**
|
|
11353
11367
|
* Enforce consistent class references in static methods.
|
|
11354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/class-reference-in-static-methods.md
|
|
11355
11369
|
*/
|
|
11356
11370
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
11357
11371
|
/**
|
|
11358
11372
|
* Enforce better comment content.
|
|
11359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/comment-content.md
|
|
11360
11374
|
*/
|
|
11361
11375
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
11362
11376
|
/**
|
|
11363
11377
|
* Enforce consistent assertion style with `node:assert`.
|
|
11364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-assert.md
|
|
11365
11379
|
*/
|
|
11366
11380
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
11367
11381
|
/**
|
|
11368
11382
|
* Enforce consistent naming for boolean names.
|
|
11369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-boolean-name.md
|
|
11370
11384
|
*/
|
|
11371
11385
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
11372
11386
|
/**
|
|
11373
11387
|
* Enforce consistent class member order.
|
|
11374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-class-member-order.md
|
|
11375
11389
|
*/
|
|
11376
11390
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
11377
11391
|
/**
|
|
11378
11392
|
* Enforce consistent spelling of compound words in identifiers.
|
|
11379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-compound-words.md
|
|
11380
11394
|
*/
|
|
11381
11395
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
11382
11396
|
/**
|
|
11383
11397
|
* Enforce consistent conditional object spread style.
|
|
11384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
11385
11399
|
*/
|
|
11386
11400
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
11387
11401
|
/**
|
|
11388
11402
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
11389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-date-clone.md
|
|
11390
11404
|
*/
|
|
11391
11405
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
11392
11406
|
/**
|
|
11393
11407
|
* Use destructured variables over properties.
|
|
11394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-destructuring.md
|
|
11395
11409
|
*/
|
|
11396
11410
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
11397
11411
|
/**
|
|
11398
11412
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
11399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-empty-array-spread.md
|
|
11400
11414
|
*/
|
|
11401
11415
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
11402
11416
|
/**
|
|
11403
11417
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
11404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-existence-index-check.md
|
|
11405
11419
|
*/
|
|
11406
11420
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
11407
11421
|
/**
|
|
11408
11422
|
* Enforce consistent decorator position on exported classes.
|
|
11409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-export-decorator-position.md
|
|
11410
11424
|
*/
|
|
11411
11425
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
11412
11426
|
/**
|
|
11413
11427
|
* Move function definitions to the highest possible scope.
|
|
11414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-scoping.md
|
|
11415
11429
|
*/
|
|
11416
11430
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
11417
11431
|
/**
|
|
11418
11432
|
* Enforce function syntax by role.
|
|
11419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-style.md
|
|
11420
11434
|
*/
|
|
11421
11435
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
11422
11436
|
/**
|
|
11423
11437
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
11424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-json-file-read.md
|
|
11425
11439
|
*/
|
|
11426
11440
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
11427
11441
|
/**
|
|
11428
11442
|
* Enforce consistent optional chaining for same-base member access.
|
|
11429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-optional-chaining.md
|
|
11430
11444
|
*/
|
|
11431
11445
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
11432
11446
|
/**
|
|
11433
11447
|
* Enforce consistent style for escaping `${` in template literals.
|
|
11434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-template-literal-escape.md
|
|
11435
11449
|
*/
|
|
11436
11450
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
11437
11451
|
/**
|
|
11438
11452
|
* Enforce consistent labels on tuple type elements.
|
|
11439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-tuple-labels.md
|
|
11440
11454
|
*/
|
|
11441
11455
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
11442
11456
|
/**
|
|
11443
11457
|
* Enforce correct `Error` subclassing.
|
|
11444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/custom-error-definition.md
|
|
11445
11459
|
*/
|
|
11446
11460
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
11447
11461
|
/**
|
|
11448
11462
|
* Enforce consistent default export declarations.
|
|
11449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/default-export-style.md
|
|
11450
11464
|
*/
|
|
11451
11465
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
11452
11466
|
/**
|
|
11453
11467
|
* Enforce consistent style for DOM element dataset access.
|
|
11454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/dom-node-dataset.md
|
|
11455
11469
|
*/
|
|
11456
11470
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
11457
11471
|
/**
|
|
11458
11472
|
* Enforce no spaces between braces.
|
|
11459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/empty-brace-spaces.md
|
|
11460
11474
|
*/
|
|
11461
11475
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
11462
11476
|
/**
|
|
11463
11477
|
* Enforce passing a `message` value when creating a built-in error.
|
|
11464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/error-message.md
|
|
11465
11479
|
*/
|
|
11466
11480
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
11467
11481
|
/**
|
|
11468
11482
|
* Require escape sequences to use uppercase or lowercase values.
|
|
11469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/escape-case.md
|
|
11470
11484
|
*/
|
|
11471
11485
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
11472
11486
|
/**
|
|
11473
11487
|
* Add expiration conditions to TODO comments.
|
|
11474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/expiring-todo-comments.md
|
|
11475
11489
|
*/
|
|
11476
11490
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
11477
11491
|
/**
|
|
11478
11492
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
11479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-length-check.md
|
|
11480
11494
|
*/
|
|
11481
11495
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
11482
11496
|
/**
|
|
11483
11497
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
11484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-timer-delay.md
|
|
11485
11499
|
*/
|
|
11486
11500
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
11487
11501
|
/**
|
|
11488
11502
|
* Enforce a case style for filenames and directory names.
|
|
11489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/filename-case.md
|
|
11490
11504
|
*/
|
|
11491
11505
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
11492
11506
|
/**
|
|
11493
11507
|
* Require identifiers to match a specified regular expression.
|
|
11494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/id-match.md
|
|
11495
11509
|
*/
|
|
11496
11510
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
11497
11511
|
/**
|
|
11498
11512
|
* Enforce specific import styles per module.
|
|
11499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/import-style.md
|
|
11500
11514
|
*/
|
|
11501
11515
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
11502
11516
|
/**
|
|
11503
11517
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
11504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/isolated-functions.md
|
|
11505
11519
|
*/
|
|
11506
11520
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
11507
11521
|
/**
|
|
11508
11522
|
* Require or disallow logical assignment operator shorthand
|
|
11509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/logical-assignment-operators.md
|
|
11510
11524
|
*/
|
|
11511
11525
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
11512
11526
|
/**
|
|
11513
11527
|
* Limit the depth of nested calls.
|
|
11514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/max-nested-calls.md
|
|
11515
11529
|
*/
|
|
11516
11530
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
11517
11531
|
/**
|
|
11518
11532
|
* Enforce replacements for variable, property, and filenames.
|
|
11519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/name-replacements.md
|
|
11520
11534
|
*/
|
|
11521
11535
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
11522
11536
|
/**
|
|
11523
11537
|
* Enforce correct use of `new` for builtin constructors.
|
|
11524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/new-for-builtins.md
|
|
11525
11539
|
*/
|
|
11526
11540
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
11527
11541
|
/**
|
|
11528
11542
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
11529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
11530
11544
|
*/
|
|
11531
11545
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
11532
11546
|
/**
|
|
11533
11547
|
* Disallow recursive access to `this` within getters and setters.
|
|
11534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accessor-recursion.md
|
|
11535
11549
|
*/
|
|
11536
11550
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
11537
11551
|
/**
|
|
11538
11552
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
11539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
11540
11554
|
*/
|
|
11541
11555
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
11542
11556
|
/**
|
|
11543
11557
|
* Disallow anonymous functions and classes as the default export.
|
|
11544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-anonymous-default-export.md
|
|
11545
11559
|
*/
|
|
11546
11560
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
11547
11561
|
/**
|
|
11548
11562
|
* Prevent passing a function reference directly to iterator methods.
|
|
11549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-callback-reference.md
|
|
11550
11564
|
*/
|
|
11551
11565
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
11552
11566
|
/**
|
|
11553
11567
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
11554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-concat-in-loop.md
|
|
11555
11569
|
*/
|
|
11556
11570
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
11557
11571
|
/**
|
|
11558
11572
|
* Disallow using reference values as `Array#fill()` values.
|
|
11559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
11560
11574
|
*/
|
|
11561
11575
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
11562
11576
|
/**
|
|
11563
11577
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
11564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-from-fill.md
|
|
11565
11579
|
*/
|
|
11566
11580
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
11567
11581
|
/**
|
|
11568
11582
|
* Disallow front-of-array mutation.
|
|
11569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-front-mutation.md
|
|
11570
11584
|
*/
|
|
11571
11585
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
11572
11586
|
/**
|
|
11573
11587
|
* Disallow using the `this` argument in array methods.
|
|
11574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-method-this-argument.md
|
|
11575
11589
|
*/
|
|
11576
11590
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
11577
11591
|
/**
|
|
11578
11592
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
11579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
11580
11594
|
* @deprecated
|
|
11581
11595
|
*/
|
|
11582
11596
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
11583
11597
|
/**
|
|
11584
11598
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
11585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reduce.md
|
|
11586
11600
|
*/
|
|
11587
11601
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
11588
11602
|
/**
|
|
11589
11603
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
11590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reverse.md
|
|
11591
11605
|
*/
|
|
11592
11606
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
11593
11607
|
/**
|
|
11594
11608
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
11595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort.md
|
|
11596
11610
|
*/
|
|
11597
11611
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
11598
11612
|
/**
|
|
11599
11613
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
11600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
11601
11615
|
*/
|
|
11602
11616
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
11603
11617
|
/**
|
|
11604
11618
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
11605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-splice.md
|
|
11606
11620
|
*/
|
|
11607
11621
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
11608
11622
|
/**
|
|
11609
11623
|
* Disallow asterisk prefixes in documentation comments.
|
|
11610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
11611
11625
|
*/
|
|
11612
11626
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
11613
11627
|
/**
|
|
11614
11628
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
11615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-async-promise-finally.md
|
|
11616
11630
|
*/
|
|
11617
11631
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
11618
11632
|
/**
|
|
11619
11633
|
* Disallow member access from await expression.
|
|
11620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-expression-member.md
|
|
11621
11635
|
*/
|
|
11622
11636
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
11623
11637
|
/**
|
|
11624
11638
|
* Disallow using `await` in `Promise` method parameters.
|
|
11625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-in-promise-methods.md
|
|
11626
11640
|
*/
|
|
11627
11641
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
11628
11642
|
/**
|
|
11629
11643
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
11630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-blob-to-file.md
|
|
11631
11645
|
*/
|
|
11632
11646
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
11633
11647
|
/**
|
|
11634
11648
|
* Disallow boolean-returning sort comparators.
|
|
11635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
11636
11650
|
*/
|
|
11637
11651
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11638
11652
|
/**
|
|
11639
11653
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
11640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-break-in-nested-loop.md
|
|
11641
11655
|
*/
|
|
11642
11656
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
11643
11657
|
/**
|
|
11644
11658
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
11645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-canvas-to-image.md
|
|
11646
11660
|
*/
|
|
11647
11661
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
11648
11662
|
/**
|
|
11649
11663
|
* Disallow chained comparisons such as `a < b < c`.
|
|
11650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-chained-comparison.md
|
|
11651
11665
|
*/
|
|
11652
11666
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
11653
11667
|
/**
|
|
11654
11668
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
11655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-collection-bracket-access.md
|
|
11656
11670
|
*/
|
|
11657
11671
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
11658
11672
|
/**
|
|
11659
11673
|
* Disallow dynamic object property existence checks.
|
|
11660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-computed-property-existence-check.md
|
|
11661
11675
|
*/
|
|
11662
11676
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
11663
11677
|
/**
|
|
11664
11678
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
11665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-splice.md
|
|
11666
11680
|
*/
|
|
11667
11681
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
11668
11682
|
/**
|
|
11669
11683
|
* Disallow confusing uses of `Array#with()`.
|
|
11670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-with.md
|
|
11671
11685
|
*/
|
|
11672
11686
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
11673
11687
|
/**
|
|
11674
11688
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
11675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-console-spaces.md
|
|
11676
11690
|
*/
|
|
11677
11691
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
11678
11692
|
/**
|
|
11679
11693
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
11680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-constant-zero-expression.md
|
|
11681
11695
|
*/
|
|
11682
11696
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
11683
11697
|
/**
|
|
11684
11698
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
11685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
11686
11700
|
*/
|
|
11687
11701
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
11688
11702
|
/**
|
|
11689
11703
|
* Do not use `document.cookie` directly.
|
|
11690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-document-cookie.md
|
|
11691
11705
|
*/
|
|
11692
11706
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
11693
11707
|
/**
|
|
11694
11708
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
11695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-double-comparison.md
|
|
11696
11710
|
*/
|
|
11697
11711
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
11698
11712
|
/**
|
|
11699
11713
|
* Disallow duplicate adjacent branches in if chains.
|
|
11700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-if-branches.md
|
|
11701
11715
|
*/
|
|
11702
11716
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
11703
11717
|
/**
|
|
11704
11718
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
11705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
11706
11720
|
*/
|
|
11707
11721
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
11708
11722
|
/**
|
|
11709
11723
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
11710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-loops.md
|
|
11711
11725
|
*/
|
|
11712
11726
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
11713
11727
|
/**
|
|
11714
11728
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
11715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-set-values.md
|
|
11716
11730
|
*/
|
|
11717
11731
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
11718
11732
|
/**
|
|
11719
11733
|
* Disallow empty files.
|
|
11720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-empty-file.md
|
|
11721
11735
|
*/
|
|
11722
11736
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
11723
11737
|
/**
|
|
11724
11738
|
* Disallow assigning to built-in error properties.
|
|
11725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-error-property-assignment.md
|
|
11726
11740
|
*/
|
|
11727
11741
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
11728
11742
|
/**
|
|
11729
11743
|
* Disallow exports in scripts.
|
|
11730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-exports-in-scripts.md
|
|
11731
11745
|
*/
|
|
11732
11746
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
11733
11747
|
/**
|
|
11734
11748
|
* Prefer `for…of` over the `forEach` method.
|
|
11735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-each.md
|
|
11736
11750
|
*/
|
|
11737
11751
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
11738
11752
|
/**
|
|
11739
11753
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
11740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-loop.md
|
|
11741
11755
|
*/
|
|
11742
11756
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
11743
11757
|
/**
|
|
11744
11758
|
* Disallow assigning properties on the global object.
|
|
11745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-global-object-property-assignment.md
|
|
11746
11760
|
*/
|
|
11747
11761
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
11748
11762
|
/**
|
|
11749
11763
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
11750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
11751
11765
|
* @deprecated
|
|
11752
11766
|
*/
|
|
11753
11767
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
11754
11768
|
/**
|
|
11755
11769
|
* Disallow immediate mutation after variable assignment.
|
|
11756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-immediate-mutation.md
|
|
11757
11771
|
*/
|
|
11758
11772
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
11759
11773
|
/**
|
|
11760
11774
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
11761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-impossible-length-comparison.md
|
|
11762
11776
|
*/
|
|
11763
11777
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
11764
11778
|
/**
|
|
11765
11779
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
11766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-query-selector.md
|
|
11767
11781
|
*/
|
|
11768
11782
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
11769
11783
|
/**
|
|
11770
11784
|
* Disallow incorrect template literal interpolation syntax.
|
|
11771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
11772
11786
|
*/
|
|
11773
11787
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
11774
11788
|
/**
|
|
11775
11789
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
11776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
11777
11791
|
* @deprecated
|
|
11778
11792
|
*/
|
|
11779
11793
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
11780
11794
|
/**
|
|
11781
11795
|
* Disallow `instanceof` with built-in objects
|
|
11782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-instanceof-builtins.md
|
|
11783
11797
|
*/
|
|
11784
11798
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
11785
11799
|
/**
|
|
11786
11800
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
11787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-argument-count.md
|
|
11788
11802
|
*/
|
|
11789
11803
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
11790
11804
|
/**
|
|
11791
11805
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
11792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-character-comparison.md
|
|
11793
11807
|
*/
|
|
11794
11808
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
11795
11809
|
/**
|
|
11796
11810
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
11797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-fetch-options.md
|
|
11798
11812
|
*/
|
|
11799
11813
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
11800
11814
|
/**
|
|
11801
11815
|
* Disallow invalid `accept` values on file inputs.
|
|
11802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
11803
11817
|
*/
|
|
11804
11818
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
11805
11819
|
/**
|
|
11806
11820
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
11807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
11808
11822
|
*/
|
|
11809
11823
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
11810
11824
|
/**
|
|
11811
11825
|
* Disallow invalid implementations of well-known symbol methods.
|
|
11812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
11813
11827
|
*/
|
|
11814
11828
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
11815
11829
|
/**
|
|
11816
11830
|
* Disallow identifiers starting with `new` or `class`.
|
|
11817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-keyword-prefix.md
|
|
11818
11832
|
*/
|
|
11819
11833
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
11820
11834
|
/**
|
|
11821
11835
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
11822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-current-target-access.md
|
|
11823
11837
|
*/
|
|
11824
11838
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
11825
11839
|
/**
|
|
11826
11840
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
11827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-event-control.md
|
|
11828
11842
|
*/
|
|
11829
11843
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
11830
11844
|
/**
|
|
11831
11845
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
11832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
11833
11847
|
* @deprecated
|
|
11834
11848
|
*/
|
|
11835
11849
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
11836
11850
|
/**
|
|
11837
11851
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
11838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-lonely-if.md
|
|
11839
11853
|
*/
|
|
11840
11854
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
11841
11855
|
/**
|
|
11842
11856
|
* Disallow mutating a loop iterable during iteration.
|
|
11843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
11844
11858
|
*/
|
|
11845
11859
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
11846
11860
|
/**
|
|
11847
11861
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
11848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
11849
11863
|
*/
|
|
11850
11864
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
11851
11865
|
/**
|
|
11852
11866
|
* Disallow manually wrapped comments.
|
|
11853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
11854
11868
|
*/
|
|
11855
11869
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
11856
11870
|
/**
|
|
11857
11871
|
* Disallow checking a Map key before accessing a different key.
|
|
11858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-mismatched-map-key.md
|
|
11859
11873
|
*/
|
|
11860
11874
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
11861
11875
|
/**
|
|
11862
11876
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
11863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-misrefactored-assignment.md
|
|
11864
11878
|
*/
|
|
11865
11879
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
11880
|
+
/**
|
|
11881
|
+
* Disallow references to missing local resources.
|
|
11882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-missing-local-resource.md
|
|
11883
|
+
*/
|
|
11884
|
+
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
11885
|
+
/**
|
|
11886
|
+
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
11887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
11888
|
+
*/
|
|
11889
|
+
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
11866
11890
|
/**
|
|
11867
11891
|
* Disallow named usage of default import and export.
|
|
11868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-named-default.md
|
|
11869
11893
|
*/
|
|
11870
11894
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
11871
11895
|
/**
|
|
11872
11896
|
* Disallow negated array predicate calls.
|
|
11873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-array-predicate.md
|
|
11874
11898
|
*/
|
|
11875
11899
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
11876
11900
|
/**
|
|
11877
11901
|
* Disallow negated comparisons.
|
|
11878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-comparison.md
|
|
11879
11903
|
*/
|
|
11880
11904
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
11881
11905
|
/**
|
|
11882
11906
|
* Disallow negated conditions.
|
|
11883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-condition.md
|
|
11884
11908
|
*/
|
|
11885
11909
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
11886
11910
|
/**
|
|
11887
11911
|
* Disallow negated expression in equality check.
|
|
11888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negation-in-equality-check.md
|
|
11889
11913
|
*/
|
|
11890
11914
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
11891
11915
|
/**
|
|
11892
11916
|
* Disallow nested ternary expressions.
|
|
11893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nested-ternary.md
|
|
11894
11918
|
*/
|
|
11895
11919
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
11896
11920
|
/**
|
|
11897
11921
|
* Disallow `new Array()`.
|
|
11898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-array.md
|
|
11899
11923
|
*/
|
|
11900
11924
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
11901
11925
|
/**
|
|
11902
11926
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
11903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-buffer.md
|
|
11904
11928
|
*/
|
|
11905
11929
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
11906
11930
|
/**
|
|
11907
11931
|
* Disallow non-function values with function-style verb prefixes.
|
|
11908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
11909
11933
|
*/
|
|
11910
11934
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
11911
11935
|
/**
|
|
11912
11936
|
* Disallow non-standard properties on built-in objects.
|
|
11913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
11914
11938
|
*/
|
|
11915
11939
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
11916
11940
|
/**
|
|
11917
11941
|
* Disallow the use of the `null` literal.
|
|
11918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-null.md
|
|
11919
11943
|
*/
|
|
11920
11944
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
11921
11945
|
/**
|
|
11922
11946
|
* Disallow the use of objects as default parameters.
|
|
11923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-as-default-parameter.md
|
|
11924
11948
|
*/
|
|
11925
11949
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
11926
11950
|
/**
|
|
11927
11951
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
11928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-methods-with-collections.md
|
|
11929
11953
|
*/
|
|
11930
11954
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
11931
11955
|
/**
|
|
11932
11956
|
* Disallow optional chaining on undeclared variables.
|
|
11933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
11934
11958
|
*/
|
|
11935
11959
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
11936
11960
|
/**
|
|
11937
11961
|
* Disallow `process.exit()`.
|
|
11938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-process-exit.md
|
|
11939
11963
|
*/
|
|
11940
11964
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
11941
11965
|
/**
|
|
11942
11966
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
11943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-redundant-comparison.md
|
|
11944
11968
|
*/
|
|
11945
11969
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
11946
11970
|
/**
|
|
11947
11971
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
11948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-return-array-push.md
|
|
11949
11973
|
*/
|
|
11950
11974
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
11951
11975
|
/**
|
|
11952
11976
|
* Disallow selector syntax in DOM names.
|
|
11953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-selector-as-dom-name.md
|
|
11954
11978
|
*/
|
|
11955
11979
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
11980
|
+
/**
|
|
11981
|
+
* Disallow shorthand properties that override related longhand properties.
|
|
11982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
11983
|
+
*/
|
|
11984
|
+
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
11956
11985
|
/**
|
|
11957
11986
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
11958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
11959
11988
|
*/
|
|
11960
11989
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
11961
11990
|
/**
|
|
11962
11991
|
* Disallow classes that only have static members.
|
|
11963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-static-only-class.md
|
|
11964
11993
|
*/
|
|
11965
11994
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
11966
11995
|
/**
|
|
11967
11996
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
11968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-subtraction-comparison.md
|
|
11969
11998
|
*/
|
|
11970
11999
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
11971
12000
|
/**
|
|
11972
12001
|
* Disallow `then` property.
|
|
11973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-thenable.md
|
|
11974
12003
|
*/
|
|
11975
12004
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
11976
12005
|
/**
|
|
11977
12006
|
* Disallow assigning `this` to a variable.
|
|
11978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-assignment.md
|
|
11979
12008
|
*/
|
|
11980
12009
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
11981
12010
|
/**
|
|
11982
12011
|
* Disallow `this` outside of classes.
|
|
11983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-outside-of-class.md
|
|
11984
12013
|
*/
|
|
11985
12014
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
11986
12015
|
/**
|
|
11987
12016
|
* Disallow assigning to top-level variables from inside functions.
|
|
11988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
11989
12018
|
*/
|
|
11990
12019
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
11991
12020
|
/**
|
|
11992
12021
|
* Disallow top-level side effects in exported modules.
|
|
11993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-side-effects.md
|
|
11994
12023
|
*/
|
|
11995
12024
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
12025
|
+
/**
|
|
12026
|
+
* Disallow `all` as a transition property.
|
|
12027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-transition-all.md
|
|
12028
|
+
*/
|
|
12029
|
+
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
11996
12030
|
/**
|
|
11997
12031
|
* Disallow comparing `undefined` using `typeof`.
|
|
11998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-typeof-undefined.md
|
|
11999
12033
|
*/
|
|
12000
12034
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
12001
12035
|
/**
|
|
12002
12036
|
* Disallow referencing methods without calling them.
|
|
12003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-uncalled-method.md
|
|
12004
12038
|
*/
|
|
12005
12039
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
12006
12040
|
/**
|
|
12007
12041
|
* Require class members to be declared.
|
|
12008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-undeclared-class-members.md
|
|
12009
12043
|
*/
|
|
12010
12044
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
12011
12045
|
/**
|
|
12012
12046
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
12013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
12014
12048
|
*/
|
|
12015
12049
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
12016
12050
|
/**
|
|
12017
12051
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
12018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
12019
12053
|
*/
|
|
12020
12054
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
12021
12055
|
/**
|
|
12022
12056
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
12023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
12024
12058
|
*/
|
|
12025
12059
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
12026
12060
|
/**
|
|
12027
12061
|
* Disallow awaiting non-promise values.
|
|
12028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-await.md
|
|
12029
12063
|
*/
|
|
12030
12064
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
12031
12065
|
/**
|
|
12032
12066
|
* Disallow unnecessary comparisons against boolean literals.
|
|
12033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
12034
12068
|
*/
|
|
12035
12069
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
12036
12070
|
/**
|
|
12037
12071
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
12038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
12039
12073
|
*/
|
|
12040
12074
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
12041
12075
|
/**
|
|
12042
12076
|
* Disallow unnecessary `globalThis` references.
|
|
12043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-global-this.md
|
|
12044
12078
|
*/
|
|
12045
12079
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
12046
12080
|
/**
|
|
12047
12081
|
* Disallow unnecessary nested ternary expressions.
|
|
12048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
12049
12083
|
*/
|
|
12050
12084
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
12051
12085
|
/**
|
|
12052
12086
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
12053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
12054
12088
|
*/
|
|
12055
12089
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
12056
12090
|
/**
|
|
12057
12091
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
12058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
12059
12093
|
*/
|
|
12060
12094
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
12061
12095
|
/**
|
|
12062
12096
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
12063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-splice.md
|
|
12064
12098
|
*/
|
|
12065
12099
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
12100
|
+
/**
|
|
12101
|
+
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
12102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
12103
|
+
*/
|
|
12104
|
+
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
12066
12105
|
/**
|
|
12067
12106
|
* Disallow unreadable array destructuring.
|
|
12068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
12069
12108
|
*/
|
|
12070
12109
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
12071
12110
|
/**
|
|
12072
12111
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
12073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
12074
12113
|
*/
|
|
12075
12114
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
12076
12115
|
/**
|
|
12077
12116
|
* Disallow unreadable IIFEs.
|
|
12078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-iife.md
|
|
12079
12118
|
*/
|
|
12080
12119
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
12081
12120
|
/**
|
|
12082
12121
|
* Disallow unreadable `new` expressions.
|
|
12083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-new-expression.md
|
|
12084
12123
|
*/
|
|
12085
12124
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
12086
12125
|
/**
|
|
12087
12126
|
* Disallow unreadable object destructuring.
|
|
12088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
12089
12128
|
*/
|
|
12090
12129
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
12091
12130
|
/**
|
|
12092
12131
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
12093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
12094
12133
|
*/
|
|
12095
12134
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
12096
12135
|
/**
|
|
12097
12136
|
* Disallow unsafe DOM HTML APIs.
|
|
12098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-dom-html.md
|
|
12099
12138
|
*/
|
|
12100
12139
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
12101
12140
|
/**
|
|
12102
12141
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
12103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
12104
12143
|
*/
|
|
12105
12144
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
12106
12145
|
/**
|
|
12107
12146
|
* Disallow unsafe values as property keys.
|
|
12108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-property-key.md
|
|
12109
12148
|
*/
|
|
12110
12149
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
12111
12150
|
/**
|
|
12112
12151
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
12113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
12114
12153
|
*/
|
|
12115
12154
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
12116
12155
|
/**
|
|
12117
12156
|
* Disallow ignoring the return value of selected array methods.
|
|
12118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-array-method-return.md
|
|
12119
12158
|
*/
|
|
12120
12159
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
12121
12160
|
/**
|
|
12122
12161
|
* Disallow unused object properties.
|
|
12123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-properties.md
|
|
12124
12163
|
*/
|
|
12125
12164
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
12126
12165
|
/**
|
|
12127
12166
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
12128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-boolean-cast.md
|
|
12129
12168
|
*/
|
|
12130
12169
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
12131
12170
|
/**
|
|
12132
12171
|
* Disallow useless type coercions of values that are already of the target type.
|
|
12133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-coercion.md
|
|
12134
12173
|
*/
|
|
12135
12174
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
12136
12175
|
/**
|
|
12137
12176
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
12138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-collection-argument.md
|
|
12139
12178
|
*/
|
|
12140
12179
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
12141
12180
|
/**
|
|
12142
12181
|
* Disallow useless compound assignments such as `x += 0`.
|
|
12143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-compound-assignment.md
|
|
12144
12183
|
*/
|
|
12145
12184
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
12146
12185
|
/**
|
|
12147
12186
|
* Disallow useless concatenation of literals.
|
|
12148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-concat.md
|
|
12149
12188
|
*/
|
|
12150
12189
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
12151
12190
|
/**
|
|
12152
12191
|
* Disallow useless `continue` statements.
|
|
12153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-continue.md
|
|
12154
12193
|
*/
|
|
12155
12194
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
12156
12195
|
/**
|
|
12157
12196
|
* Disallow unnecessary existence checks before deletion.
|
|
12158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-delete-check.md
|
|
12159
12198
|
*/
|
|
12160
12199
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
12161
12200
|
/**
|
|
12162
12201
|
* Disallow `else` after a statement that exits.
|
|
12163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-else.md
|
|
12164
12203
|
*/
|
|
12165
12204
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
12166
12205
|
/**
|
|
12167
12206
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
12168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
12169
12208
|
*/
|
|
12170
12209
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
12171
12210
|
/**
|
|
12172
12211
|
* Disallow useless fallback when spreading in object literals.
|
|
12173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
12174
12213
|
*/
|
|
12175
12214
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
12176
12215
|
/**
|
|
12177
12216
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
12178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
12179
12218
|
*/
|
|
12180
12219
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
12181
12220
|
/**
|
|
12182
12221
|
* Disallow useless array length check.
|
|
12183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-length-check.md
|
|
12184
12223
|
*/
|
|
12185
12224
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
12186
12225
|
/**
|
|
12187
12226
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
12188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-logical-operand.md
|
|
12189
12228
|
*/
|
|
12190
12229
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
12191
12230
|
/**
|
|
12192
12231
|
* Disallow useless overrides of class methods.
|
|
12193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-override.md
|
|
12194
12233
|
*/
|
|
12195
12234
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
12196
12235
|
/**
|
|
12197
12236
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
12198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
12199
12238
|
*/
|
|
12200
12239
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
12240
|
+
/**
|
|
12241
|
+
* Disallow redundant re-exports.
|
|
12242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-re-export.md
|
|
12243
|
+
*/
|
|
12244
|
+
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
12201
12245
|
/**
|
|
12202
12246
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
12203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-recursion.md
|
|
12204
12248
|
*/
|
|
12205
12249
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
12206
12250
|
/**
|
|
12207
12251
|
* Disallow unnecessary spread.
|
|
12208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-spread.md
|
|
12209
12253
|
*/
|
|
12210
12254
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
12211
12255
|
/**
|
|
12212
12256
|
* Disallow useless case in switch statements.
|
|
12213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-switch-case.md
|
|
12214
12258
|
*/
|
|
12215
12259
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
12216
12260
|
/**
|
|
12217
12261
|
* Disallow useless template literal expressions.
|
|
12218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-template-literals.md
|
|
12219
12263
|
*/
|
|
12220
12264
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
12221
12265
|
/**
|
|
12222
12266
|
* Disallow useless `undefined`.
|
|
12223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-undefined.md
|
|
12224
12268
|
*/
|
|
12225
12269
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
12226
12270
|
/**
|
|
12227
12271
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
12228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
12229
12273
|
*/
|
|
12230
12274
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
12231
12275
|
/**
|
|
12232
12276
|
* Disallow number literals with zero fractions or dangling dots.
|
|
12233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-zero-fractions.md
|
|
12234
12278
|
*/
|
|
12235
12279
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
12236
12280
|
/**
|
|
12237
12281
|
* Enforce proper case for numeric literals.
|
|
12238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/number-literal-case.md
|
|
12239
12283
|
*/
|
|
12240
12284
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
12241
12285
|
/**
|
|
12242
12286
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
12243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/numeric-separators-style.md
|
|
12244
12288
|
*/
|
|
12245
12289
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
12246
12290
|
/**
|
|
12247
12291
|
* Require assignment operator shorthand where possible.
|
|
12248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/operator-assignment.md
|
|
12249
12293
|
*/
|
|
12250
12294
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
12251
12295
|
/**
|
|
12252
12296
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
12253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-any.md
|
|
12254
12298
|
*/
|
|
12255
12299
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
12256
12300
|
/**
|
|
12257
12301
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
12258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
12259
12303
|
*/
|
|
12260
12304
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
12261
12305
|
/**
|
|
12262
12306
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
12263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener.md
|
|
12264
12308
|
*/
|
|
12265
12309
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
12266
12310
|
/**
|
|
12267
12311
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
12268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
12269
12313
|
*/
|
|
12270
12314
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
12271
12315
|
/**
|
|
12272
12316
|
* Prefer `AggregateError` when throwing collected errors.
|
|
12273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-aggregate-error.md
|
|
12274
12318
|
*/
|
|
12275
12319
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
12276
12320
|
/**
|
|
12277
12321
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
12278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-find.md
|
|
12279
12323
|
*/
|
|
12280
12324
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
12281
12325
|
/**
|
|
12282
12326
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
12283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat.md
|
|
12284
12328
|
*/
|
|
12285
12329
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
12286
12330
|
/**
|
|
12287
12331
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
12288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat-map.md
|
|
12289
12333
|
*/
|
|
12290
12334
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
12291
12335
|
/**
|
|
12292
12336
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
12293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-async.md
|
|
12294
12338
|
*/
|
|
12295
12339
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
12296
12340
|
/**
|
|
12297
12341
|
* Prefer using the `Array.from()` mapping function argument.
|
|
12298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-map.md
|
|
12299
12343
|
*/
|
|
12300
12344
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
12301
12345
|
/**
|
|
12302
12346
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
12303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-range.md
|
|
12304
12348
|
*/
|
|
12305
12349
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
12306
12350
|
/**
|
|
12307
12351
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
12308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-index-of.md
|
|
12309
12353
|
*/
|
|
12310
12354
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
12311
12355
|
/**
|
|
12312
12356
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
12313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
12314
12358
|
*/
|
|
12315
12359
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
12316
12360
|
/**
|
|
12317
12361
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
12318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-last-methods.md
|
|
12319
12363
|
*/
|
|
12320
12364
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
12321
12365
|
/**
|
|
12322
12366
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
12323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-slice.md
|
|
12324
12368
|
*/
|
|
12325
12369
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
12326
12370
|
/**
|
|
12327
12371
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
12328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-some.md
|
|
12329
12373
|
*/
|
|
12330
12374
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
12331
12375
|
/**
|
|
12332
12376
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
12333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-at.md
|
|
12334
12378
|
*/
|
|
12335
12379
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
12336
12380
|
/**
|
|
12337
12381
|
* Prefer `await` over promise chaining.
|
|
12338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-await.md
|
|
12339
12383
|
*/
|
|
12340
12384
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
12341
12385
|
/**
|
|
12342
12386
|
* Prefer `BigInt` literals over the constructor.
|
|
12343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-bigint-literals.md
|
|
12344
12388
|
*/
|
|
12345
12389
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
12346
12390
|
/**
|
|
12347
12391
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
12348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
12349
12393
|
*/
|
|
12350
12394
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
12351
12395
|
/**
|
|
12352
12396
|
* Prefer block statements over IIFEs used only for scoping.
|
|
12353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
12354
12398
|
*/
|
|
12355
12399
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
12356
12400
|
/**
|
|
12357
12401
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
12358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-boolean-return.md
|
|
12359
12403
|
*/
|
|
12360
12404
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
12361
12405
|
/**
|
|
12362
12406
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
12363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-class-fields.md
|
|
12364
12408
|
*/
|
|
12365
12409
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
12366
12410
|
/**
|
|
12367
12411
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
12368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-classlist-toggle.md
|
|
12369
12413
|
*/
|
|
12370
12414
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
12371
12415
|
/**
|
|
12372
12416
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
12373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-code-point.md
|
|
12374
12418
|
*/
|
|
12375
12419
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
12376
12420
|
/**
|
|
12377
12421
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
12378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-continue.md
|
|
12379
12423
|
*/
|
|
12380
12424
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
12381
12425
|
/**
|
|
12382
12426
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
12383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-date-now.md
|
|
12384
12428
|
*/
|
|
12385
12429
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
12386
12430
|
/**
|
|
12387
12431
|
* Prefer default parameters over reassignment.
|
|
12388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-default-parameters.md
|
|
12389
12433
|
*/
|
|
12390
12434
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
12391
12435
|
/**
|
|
12392
12436
|
* Prefer direct iteration over default iterator method calls.
|
|
12393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-direct-iteration.md
|
|
12394
12438
|
*/
|
|
12395
12439
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
12396
12440
|
/**
|
|
12397
12441
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
12398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dispose.md
|
|
12399
12443
|
*/
|
|
12400
12444
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
12401
12445
|
/**
|
|
12402
12446
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
12403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-append.md
|
|
12404
12448
|
*/
|
|
12405
12449
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
12406
12450
|
/**
|
|
12407
12451
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
12408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
12409
12453
|
* @deprecated
|
|
12410
12454
|
*/
|
|
12411
12455
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
12412
12456
|
/**
|
|
12413
12457
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
12414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
12415
12459
|
*/
|
|
12416
|
-
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<
|
|
12460
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
12417
12461
|
/**
|
|
12418
12462
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
12419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-remove.md
|
|
12420
12464
|
*/
|
|
12421
12465
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
12422
12466
|
/**
|
|
12423
12467
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
12424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
12425
12469
|
*/
|
|
12426
12470
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
12427
12471
|
/**
|
|
12428
12472
|
* Prefer `.textContent` over `.innerText`.
|
|
12429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
12430
12474
|
*/
|
|
12431
12475
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
12432
12476
|
/**
|
|
12433
12477
|
* Prefer early returns over full-function conditional wrapping.
|
|
12434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-early-return.md
|
|
12435
12479
|
*/
|
|
12436
12480
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
12437
12481
|
/**
|
|
12438
12482
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
12439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-else-if.md
|
|
12440
12484
|
*/
|
|
12441
12485
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
12442
12486
|
/**
|
|
12443
12487
|
* Prefer `Error.isError()` when checking for errors.
|
|
12444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-error-is-error.md
|
|
12445
12489
|
*/
|
|
12446
12490
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
12447
12491
|
/**
|
|
12448
12492
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
12449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-event-target.md
|
|
12450
12494
|
*/
|
|
12451
12495
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
12496
|
+
/**
|
|
12497
|
+
* Prefer explicit viewport units.
|
|
12498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
12499
|
+
*/
|
|
12500
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
12452
12501
|
/**
|
|
12453
12502
|
* Prefer `export…from` when re-exporting.
|
|
12454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-export-from.md
|
|
12455
12504
|
*/
|
|
12456
12505
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
12457
12506
|
/**
|
|
12458
12507
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
12459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
12460
12509
|
*/
|
|
12461
12510
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
12462
12511
|
/**
|
|
12463
12512
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
12464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
12465
12514
|
*/
|
|
12466
12515
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
12467
12516
|
/**
|
|
12468
12517
|
* Prefer global numeric constants over `Number` static properties.
|
|
12469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-number-constants.md
|
|
12470
12519
|
*/
|
|
12471
12520
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
12472
12521
|
/**
|
|
12473
12522
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
12474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-this.md
|
|
12475
12524
|
*/
|
|
12476
12525
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
12477
12526
|
/**
|
|
12478
12527
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
12479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-group-by.md
|
|
12480
12529
|
*/
|
|
12481
12530
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
12482
12531
|
/**
|
|
12483
12532
|
* Prefer `.has()` when checking existence.
|
|
12484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-has-check.md
|
|
12485
12534
|
*/
|
|
12486
12535
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
12487
12536
|
/**
|
|
12488
12537
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
12489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
12490
12539
|
*/
|
|
12491
12540
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
12492
12541
|
/**
|
|
12493
12542
|
* Prefer HTTPS over HTTP.
|
|
12494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-https.md
|
|
12495
12544
|
*/
|
|
12496
12545
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
12497
12546
|
/**
|
|
12498
12547
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
12499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
12500
12549
|
*/
|
|
12501
12550
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
12502
12551
|
/**
|
|
12503
12552
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
12504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-import-meta-properties.md
|
|
12505
12554
|
*/
|
|
12506
12555
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
12507
12556
|
/**
|
|
12508
12557
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
12509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes.md
|
|
12510
12559
|
*/
|
|
12511
12560
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
12512
12561
|
/**
|
|
12513
12562
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
12514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
12515
12564
|
*/
|
|
12516
12565
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
12517
12566
|
/**
|
|
12518
12567
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
12519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
12520
12569
|
*/
|
|
12521
12570
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
12522
12571
|
/**
|
|
12523
12572
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
12524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-concat.md
|
|
12525
12574
|
*/
|
|
12526
12575
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
12527
12576
|
/**
|
|
12528
12577
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
12529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-helpers.md
|
|
12530
12579
|
*/
|
|
12531
12580
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
12532
12581
|
/**
|
|
12533
12582
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
12534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array.md
|
|
12535
12584
|
*/
|
|
12536
12585
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
12537
12586
|
/**
|
|
12538
12587
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
12539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
12540
12589
|
*/
|
|
12541
12590
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
12542
12591
|
/**
|
|
12543
12592
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
12544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
12545
12594
|
* @deprecated
|
|
12546
12595
|
*/
|
|
12547
12596
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
12548
12597
|
/**
|
|
12549
12598
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
12550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
12551
12600
|
*/
|
|
12552
12601
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
12553
12602
|
/**
|
|
12554
12603
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
12555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-location-assign.md
|
|
12556
12605
|
*/
|
|
12557
12606
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
12558
12607
|
/**
|
|
12559
12608
|
* Prefer using a logical operator over a ternary.
|
|
12560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
12561
12610
|
*/
|
|
12562
12611
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
12563
12612
|
/**
|
|
12564
12613
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
12565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-map-from-entries.md
|
|
12566
12615
|
*/
|
|
12567
12616
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
12568
12617
|
/**
|
|
12569
12618
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
12570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-abs.md
|
|
12571
12620
|
*/
|
|
12572
12621
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
12573
12622
|
/**
|
|
12574
12623
|
* Prefer `Math` constants over their approximate numeric values.
|
|
12575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-constants.md
|
|
12576
12625
|
*/
|
|
12577
12626
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
12578
12627
|
/**
|
|
12579
12628
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
12580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-min-max.md
|
|
12581
12630
|
*/
|
|
12582
12631
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
12583
12632
|
/**
|
|
12584
12633
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
12585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-trunc.md
|
|
12586
12635
|
*/
|
|
12587
12636
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
12588
12637
|
/**
|
|
12589
12638
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
12590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-minimal-ternary.md
|
|
12591
12640
|
*/
|
|
12592
12641
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
12593
12642
|
/**
|
|
12594
12643
|
* Prefer modern DOM APIs.
|
|
12595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
12596
12645
|
*/
|
|
12597
12646
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
12598
12647
|
/**
|
|
12599
12648
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
12600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-math-apis.md
|
|
12601
12650
|
*/
|
|
12602
12651
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
12603
12652
|
/**
|
|
12604
12653
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
12605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-module.md
|
|
12606
12655
|
*/
|
|
12607
12656
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
12608
12657
|
/**
|
|
12609
12658
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
12610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
12611
12660
|
*/
|
|
12612
12661
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
12613
12662
|
/**
|
|
12614
12663
|
* Prefer negative index over `.length - index` when possible.
|
|
12615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-negative-index.md
|
|
12616
12665
|
*/
|
|
12617
12666
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
12618
12667
|
/**
|
|
12619
12668
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
12620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-node-protocol.md
|
|
12621
12670
|
*/
|
|
12622
12671
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
12623
12672
|
/**
|
|
12624
12673
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
12625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-coercion.md
|
|
12626
12675
|
*/
|
|
12627
12676
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
12628
12677
|
/**
|
|
12629
12678
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
12630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
12631
12680
|
*/
|
|
12632
12681
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
12633
12682
|
/**
|
|
12634
12683
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
12635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-properties.md
|
|
12636
12685
|
*/
|
|
12637
12686
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
12638
12687
|
/**
|
|
12639
12688
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
12640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-define-properties.md
|
|
12641
12690
|
*/
|
|
12642
12691
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
12643
12692
|
/**
|
|
12644
12693
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
12645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
12646
12695
|
*/
|
|
12647
12696
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
12648
12697
|
/**
|
|
12649
12698
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
12650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-from-entries.md
|
|
12651
12700
|
*/
|
|
12652
12701
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
12653
12702
|
/**
|
|
12654
12703
|
* Prefer the most specific `Object` iterable method.
|
|
12655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
12656
12705
|
*/
|
|
12657
12706
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
12658
12707
|
/**
|
|
12659
12708
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
12660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-observer-apis.md
|
|
12661
12710
|
*/
|
|
12662
12711
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
12663
12712
|
/**
|
|
12664
12713
|
* Prefer omitting the `catch` binding parameter.
|
|
12665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
12666
12715
|
*/
|
|
12667
12716
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
12668
12717
|
/**
|
|
12669
12718
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
12670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-path2d.md
|
|
12671
12720
|
*/
|
|
12672
12721
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
12673
12722
|
/**
|
|
12674
12723
|
* Prefer private class fields over the underscore-prefix convention.
|
|
12675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-private-class-fields.md
|
|
12676
12725
|
*/
|
|
12677
12726
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
12678
12727
|
/**
|
|
12679
12728
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
12680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-try.md
|
|
12681
12730
|
*/
|
|
12682
12731
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
12683
12732
|
/**
|
|
12684
12733
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
12685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
12686
12735
|
*/
|
|
12687
12736
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
12688
12737
|
/**
|
|
12689
12738
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
12690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-prototype-methods.md
|
|
12691
12740
|
*/
|
|
12692
12741
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
12693
12742
|
/**
|
|
12694
12743
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
12695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-query-selector.md
|
|
12696
12745
|
*/
|
|
12697
12746
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
12698
12747
|
/**
|
|
12699
12748
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
12700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-queue-microtask.md
|
|
12701
12750
|
*/
|
|
12702
12751
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
12703
12752
|
/**
|
|
12704
12753
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
12705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-reflect-apply.md
|
|
12706
12755
|
*/
|
|
12707
12756
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
12708
12757
|
/**
|
|
12709
12758
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
12710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-escape.md
|
|
12711
12760
|
*/
|
|
12712
12761
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
12713
12762
|
/**
|
|
12714
12763
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
12715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-test.md
|
|
12716
12765
|
*/
|
|
12717
12766
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
12718
12767
|
/**
|
|
12719
12768
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
12720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-response-static-json.md
|
|
12721
12770
|
*/
|
|
12722
12771
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
12723
12772
|
/**
|
|
12724
12773
|
* Prefer `:scope` when using element query selector methods.
|
|
12725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-scoped-selector.md
|
|
12726
12775
|
*/
|
|
12727
12776
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
12728
12777
|
/**
|
|
12729
12778
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
12730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-has.md
|
|
12731
12780
|
*/
|
|
12732
12781
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
12733
12782
|
/**
|
|
12734
12783
|
* Prefer `Set` methods for Set operations.
|
|
12735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-methods.md
|
|
12736
12785
|
*/
|
|
12737
12786
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
12738
12787
|
/**
|
|
12739
12788
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
12740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-size.md
|
|
12741
12790
|
*/
|
|
12742
12791
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
12743
12792
|
/**
|
|
12744
12793
|
* Prefer arrow function properties over methods with a single return.
|
|
12745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-short-arrow-method.md
|
|
12746
12795
|
*/
|
|
12747
|
-
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<
|
|
12796
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
12748
12797
|
/**
|
|
12749
12798
|
* Prefer simple conditions first in logical expressions.
|
|
12750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-condition-first.md
|
|
12751
12800
|
*/
|
|
12752
12801
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
12753
12802
|
/**
|
|
12754
12803
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
12755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
12756
12805
|
*/
|
|
12757
12806
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
12758
12807
|
/**
|
|
12759
12808
|
* Prefer simplified conditions.
|
|
12760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simplified-conditions.md
|
|
12761
12810
|
*/
|
|
12762
12811
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
12763
12812
|
/**
|
|
12764
12813
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
12765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-array-predicate.md
|
|
12766
12815
|
*/
|
|
12767
12816
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
12768
12817
|
/**
|
|
12769
12818
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
12770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-call.md
|
|
12771
12820
|
*/
|
|
12772
12821
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
12773
12822
|
/**
|
|
12774
12823
|
* Prefer a single object destructuring declaration per local const source.
|
|
12775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
12776
12825
|
*/
|
|
12777
12826
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
12778
12827
|
/**
|
|
12779
12828
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
12780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-replace.md
|
|
12781
12830
|
*/
|
|
12782
12831
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
12783
12832
|
/**
|
|
12784
12833
|
* Prefer declaring variables in the smallest possible scope.
|
|
12785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-smaller-scope.md
|
|
12786
12835
|
*/
|
|
12787
12836
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
12788
12837
|
/**
|
|
12789
12838
|
* Prefer `String#split()` with a limit.
|
|
12790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-split-limit.md
|
|
12791
12840
|
*/
|
|
12792
12841
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
12793
12842
|
/**
|
|
12794
12843
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
12795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-spread.md
|
|
12796
12845
|
*/
|
|
12797
12846
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
12798
12847
|
/**
|
|
12799
12848
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
12800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-match-all.md
|
|
12801
12850
|
*/
|
|
12802
12851
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
12803
12852
|
/**
|
|
12804
12853
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
12805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
12806
12855
|
*/
|
|
12807
12856
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
12808
12857
|
/**
|
|
12809
12858
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
12810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-raw.md
|
|
12811
12860
|
*/
|
|
12812
12861
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
12813
12862
|
/**
|
|
12814
12863
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
12815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-repeat.md
|
|
12816
12865
|
*/
|
|
12817
12866
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
12818
12867
|
/**
|
|
12819
12868
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
12820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-replace-all.md
|
|
12821
12870
|
*/
|
|
12822
12871
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
12823
12872
|
/**
|
|
12824
12873
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
12825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-slice.md
|
|
12826
12875
|
*/
|
|
12827
12876
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
12828
12877
|
/**
|
|
12829
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over
|
|
12830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12878
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
12879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
12831
12880
|
*/
|
|
12832
12881
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
12833
12882
|
/**
|
|
12834
12883
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
12835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
12836
12885
|
*/
|
|
12837
12886
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
12838
12887
|
/**
|
|
12839
12888
|
* Prefer using `structuredClone` to create a deep clone.
|
|
12840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-structured-clone.md
|
|
12841
12890
|
*/
|
|
12842
12891
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
12843
12892
|
/**
|
|
12844
12893
|
* Prefer `switch` over multiple `else-if`.
|
|
12845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-switch.md
|
|
12846
12895
|
*/
|
|
12847
12896
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
12848
12897
|
/**
|
|
12849
12898
|
* Prefer `Temporal` over `Date`.
|
|
12850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-temporal.md
|
|
12851
12900
|
*/
|
|
12852
12901
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
12853
12902
|
/**
|
|
12854
12903
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
12855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-ternary.md
|
|
12856
12905
|
*/
|
|
12857
12906
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
12907
|
+
/**
|
|
12908
|
+
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
12909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-then-catch.md
|
|
12910
|
+
*/
|
|
12911
|
+
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
12858
12912
|
/**
|
|
12859
12913
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
12860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-toggle-attribute.md
|
|
12861
12915
|
*/
|
|
12862
12916
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
12863
12917
|
/**
|
|
12864
12918
|
* Prefer top-level await over top-level promises and async function calls.
|
|
12865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-top-level-await.md
|
|
12866
12920
|
*/
|
|
12867
12921
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
12868
12922
|
/**
|
|
12869
12923
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
12870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-error.md
|
|
12871
12925
|
*/
|
|
12872
12926
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
12873
12927
|
/**
|
|
12874
12928
|
* Require type literals to be last in union types.
|
|
12875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-literal-last.md
|
|
12876
12930
|
*/
|
|
12877
12931
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
12878
12932
|
/**
|
|
12879
12933
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
12880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-uint8array-base64.md
|
|
12881
12935
|
*/
|
|
12882
12936
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
12883
12937
|
/**
|
|
12884
12938
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
12885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unary-minus.md
|
|
12886
12940
|
*/
|
|
12887
12941
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
12888
12942
|
/**
|
|
12889
12943
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
12890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
12891
12945
|
*/
|
|
12892
12946
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
12893
12947
|
/**
|
|
12894
12948
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
12895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-can-parse.md
|
|
12896
12950
|
*/
|
|
12897
12951
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
12898
12952
|
/**
|
|
12899
12953
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
12900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-href.md
|
|
12901
12955
|
*/
|
|
12902
12956
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
12903
12957
|
/**
|
|
12904
12958
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
12905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-search-parameters.md
|
|
12906
12960
|
*/
|
|
12907
12961
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
12908
12962
|
/**
|
|
12909
12963
|
* Prefer putting the condition in the while statement.
|
|
12910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-while-loop-condition.md
|
|
12911
12965
|
*/
|
|
12912
12966
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
12913
12967
|
/**
|
|
12914
12968
|
* Renamed to `unicorn/name-replacements`.
|
|
12915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
12916
12970
|
* @deprecated
|
|
12917
12971
|
*/
|
|
12918
12972
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
12919
12973
|
/**
|
|
12920
12974
|
* Enforce consistent relative URL style.
|
|
12921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/relative-url-style.md
|
|
12922
12976
|
*/
|
|
12923
12977
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
12924
12978
|
/**
|
|
12925
12979
|
* Enforce using the separator argument with `Array#join()`.
|
|
12926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-join-separator.md
|
|
12927
12981
|
*/
|
|
12928
12982
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
12929
12983
|
/**
|
|
12930
12984
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
12931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-sort-compare.md
|
|
12932
12986
|
*/
|
|
12933
12987
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
12934
12988
|
/**
|
|
12935
12989
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
12936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-css-escape.md
|
|
12937
12991
|
*/
|
|
12938
12992
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
12993
|
+
/**
|
|
12994
|
+
* Require configured YAML frontmatter fields.
|
|
12995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-frontmatter-fields.md
|
|
12996
|
+
*/
|
|
12997
|
+
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
12939
12998
|
/**
|
|
12940
12999
|
* Require non-empty module attributes for imports and exports
|
|
12941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-attributes.md
|
|
12942
13001
|
*/
|
|
12943
13002
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
12944
13003
|
/**
|
|
12945
13004
|
* Require non-empty specifier list in import and export statements.
|
|
12946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-specifiers.md
|
|
12947
13006
|
*/
|
|
12948
13007
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
12949
13008
|
/**
|
|
12950
13009
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
12951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
12952
13011
|
*/
|
|
12953
13012
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
12954
13013
|
/**
|
|
12955
13014
|
* Require passive event listeners for high-frequency events.
|
|
12956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-passive-events.md
|
|
12957
13016
|
*/
|
|
12958
13017
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
12959
13018
|
/**
|
|
12960
13019
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
12961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-post-message-target-origin.md
|
|
12962
13021
|
*/
|
|
12963
13022
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
12964
13023
|
/**
|
|
12965
13024
|
* Require boolean-returning Proxy traps to return booleans.
|
|
12966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
12967
13026
|
*/
|
|
12968
13027
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
12969
13028
|
/**
|
|
12970
13029
|
* Enforce better string content.
|
|
12971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/string-content.md
|
|
12972
13031
|
*/
|
|
12973
13032
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
12974
13033
|
/**
|
|
12975
13034
|
* Enforce consistent brace style for `case` clauses.
|
|
12976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-braces.md
|
|
12977
13036
|
*/
|
|
12978
13037
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
12979
13038
|
/**
|
|
12980
13039
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
12981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-break-position.md
|
|
12982
13041
|
*/
|
|
12983
13042
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
12984
13043
|
/**
|
|
12985
13044
|
* Fix whitespace-insensitive template indentation.
|
|
12986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/template-indent.md
|
|
12987
13046
|
*/
|
|
12988
13047
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
12989
13048
|
/**
|
|
12990
13049
|
* Enforce consistent case for text encoding identifiers.
|
|
12991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/text-encoding-identifier-case.md
|
|
12992
13051
|
*/
|
|
12993
13052
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
12994
13053
|
/**
|
|
12995
13054
|
* Require `new` when creating an error.
|
|
12996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/throw-new-error.md
|
|
12997
13056
|
*/
|
|
12998
13057
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
12999
13058
|
/**
|
|
13000
13059
|
* Limit the complexity of `try` blocks.
|
|
13001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/try-complexity.md
|
|
13002
13061
|
*/
|
|
13003
13062
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
13004
13063
|
}
|
|
@@ -13307,10 +13366,19 @@ type UnicornPreferAt = [] | [{
|
|
|
13307
13366
|
type UnicornPreferContinue = [] | [{
|
|
13308
13367
|
maximumStatements?: number;
|
|
13309
13368
|
}];
|
|
13369
|
+
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
13370
|
+
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
13371
|
+
checkGetHTML?: boolean;
|
|
13372
|
+
checkSetHTML?: boolean;
|
|
13373
|
+
}];
|
|
13310
13374
|
// ----- unicorn/prefer-early-return -----
|
|
13311
13375
|
type UnicornPreferEarlyReturn = [] | [{
|
|
13312
13376
|
maximumStatements?: number;
|
|
13313
13377
|
}];
|
|
13378
|
+
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
13379
|
+
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
13380
|
+
unit?: ("dvh" | "svh" | "lvh");
|
|
13381
|
+
}];
|
|
13314
13382
|
// ----- unicorn/prefer-export-from -----
|
|
13315
13383
|
type UnicornPreferExportFrom = [] | [{
|
|
13316
13384
|
checkUsedVariables?: boolean;
|
|
@@ -13321,7 +13389,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
13321
13389
|
}];
|
|
13322
13390
|
// ----- unicorn/prefer-minimal-ternary -----
|
|
13323
13391
|
type UnicornPreferMinimalTernary = [] | [{
|
|
13324
|
-
|
|
13392
|
+
checkVaryingBase?: boolean;
|
|
13325
13393
|
checkComputedMemberAccess?: boolean;
|
|
13326
13394
|
}];
|
|
13327
13395
|
// ----- unicorn/prefer-number-properties -----
|
|
@@ -13346,6 +13414,8 @@ type UnicornPreferQueueMicrotask = [] | [{
|
|
|
13346
13414
|
type UnicornPreferSetHas = [] | [{
|
|
13347
13415
|
minimumItems?: number;
|
|
13348
13416
|
}];
|
|
13417
|
+
// ----- unicorn/prefer-short-arrow-method -----
|
|
13418
|
+
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
13349
13419
|
// ----- unicorn/prefer-single-call -----
|
|
13350
13420
|
type UnicornPreferSingleCall = [] | [{
|
|
13351
13421
|
ignore?: unknown[];
|
|
@@ -13377,6 +13447,10 @@ type UnicornRelativeUrlStyle = [] | [("never" | "always")];
|
|
|
13377
13447
|
type UnicornRequireCssEscape = [] | [{
|
|
13378
13448
|
checkAllSelectors?: boolean;
|
|
13379
13449
|
}];
|
|
13450
|
+
// ----- unicorn/require-frontmatter-fields -----
|
|
13451
|
+
type UnicornRequireFrontmatterFields = [] | [{
|
|
13452
|
+
fields?: string[];
|
|
13453
|
+
}];
|
|
13380
13454
|
// ----- unicorn/string-content -----
|
|
13381
13455
|
type UnicornStringContent = [] | [{
|
|
13382
13456
|
patterns?: {
|