@antfu/eslint-config 9.2.0 → 9.3.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/cli.mjs +5 -5
- package/dist/index.d.mts +467 -364
- package/dist/index.mjs +1 -1
- package/package.json +37 -44
- package/dist/lib-BGCOhS6c.mjs +0 -11442
package/dist/index.d.mts
CHANGED
|
@@ -1005,6 +1005,10 @@ interface RuleOptions {
|
|
|
1005
1005
|
* Prefer Array.prototype.toSpliced() over copying and splicing arrays
|
|
1006
1006
|
*/
|
|
1007
1007
|
'e18e/prefer-array-to-spliced'?: Linter.RuleEntry<[]>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Prefer `charCodeAt()` over indexed string access for single-character comparisons inside loops
|
|
1010
|
+
*/
|
|
1011
|
+
'e18e/prefer-charcode-at-in-loop'?: Linter.RuleEntry<[]>;
|
|
1008
1012
|
/**
|
|
1009
1013
|
* Prefer Date.now() over new Date().getTime() and +new Date()
|
|
1010
1014
|
*/
|
|
@@ -1045,6 +1049,10 @@ interface RuleOptions {
|
|
|
1045
1049
|
* prefer `RegExp.test()` over `String.match()` and `RegExp.exec()` when only checking for match existence
|
|
1046
1050
|
*/
|
|
1047
1051
|
'e18e/prefer-regex-test'?: Linter.RuleEntry<[]>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Prefer `indexOf(needle)` and `slice(...)` over `split()[N]` when splitting a string into two pieces.
|
|
1054
|
+
*/
|
|
1055
|
+
'e18e/prefer-slice-over-split-index'?: Linter.RuleEntry<[]>;
|
|
1048
1056
|
/**
|
|
1049
1057
|
* Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
|
|
1050
1058
|
*/
|
|
@@ -1061,6 +1069,10 @@ interface RuleOptions {
|
|
|
1061
1069
|
* Prefer String.fromCharCode() over String.fromCodePoint() for code points below 0x10000
|
|
1062
1070
|
*/
|
|
1063
1071
|
'e18e/prefer-string-fromcharcode'?: Linter.RuleEntry<[]>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Prefer `{throwIfNoEntry: false}` over relying on a thrown error for missing fs entries from sync stat calls
|
|
1074
|
+
*/
|
|
1075
|
+
'e18e/prefer-throw-if-no-entry'?: Linter.RuleEntry<[]>;
|
|
1064
1076
|
/**
|
|
1065
1077
|
* Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
|
|
1066
1078
|
*/
|
|
@@ -2432,6 +2444,11 @@ interface RuleOptions {
|
|
|
2432
2444
|
* @see https://nextjs.org/docs/messages/no-img-element
|
|
2433
2445
|
*/
|
|
2434
2446
|
'next/no-img-element'?: Linter.RuleEntry<[]>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Prevent usage of `location.assign` or `location.href` assignment to navigate to internal Next.js pages.
|
|
2449
|
+
* @see https://nextjs.org/docs/messages/no-location-assign-relative-destination
|
|
2450
|
+
*/
|
|
2451
|
+
'next/no-location-assign-relative-destination'?: Linter.RuleEntry<[]>;
|
|
2435
2452
|
/**
|
|
2436
2453
|
* Prevent page-only custom fonts.
|
|
2437
2454
|
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
@@ -3687,6 +3704,11 @@ interface RuleOptions {
|
|
|
3687
3704
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts
|
|
3688
3705
|
*/
|
|
3689
3706
|
'pnpm/yaml-enforce-settings'?: Linter.RuleEntry<PnpmYamlEnforceSettings>;
|
|
3707
|
+
/**
|
|
3708
|
+
* Disallow the anonymous `catalog:` in `pnpm-workspace.yaml` in favor of named catalogs
|
|
3709
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-anonymous-catalog.test.ts
|
|
3710
|
+
*/
|
|
3711
|
+
'pnpm/yaml-no-anonymous-catalog'?: Linter.RuleEntry<[]>;
|
|
3690
3712
|
/**
|
|
3691
3713
|
* Disallow duplicate catalog items in `pnpm-workspace.yaml`
|
|
3692
3714
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts
|
|
@@ -7270,1715 +7292,1740 @@ interface RuleOptions {
|
|
|
7270
7292
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7271
7293
|
/**
|
|
7272
7294
|
* Prefer better DOM traversal APIs.
|
|
7273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/better-dom-traversing.md
|
|
7274
7296
|
*/
|
|
7275
7297
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7276
7298
|
/**
|
|
7277
7299
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7279
7301
|
* @deprecated
|
|
7280
7302
|
*/
|
|
7281
7303
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7282
7304
|
/**
|
|
7283
7305
|
* Enforce a specific parameter name in catch clauses.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/catch-error-name.md
|
|
7285
7307
|
*/
|
|
7286
7308
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7287
7309
|
/**
|
|
7288
7310
|
* Enforce consistent class references in static methods.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7290
7312
|
*/
|
|
7291
7313
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7292
7314
|
/**
|
|
7293
7315
|
* Enforce better comment content.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/comment-content.md
|
|
7295
7317
|
*/
|
|
7296
7318
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7319
|
+
/**
|
|
7320
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7322
|
+
*/
|
|
7323
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7297
7324
|
/**
|
|
7298
7325
|
* Enforce consistent assertion style with `node:assert`.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-assert.md
|
|
7300
7327
|
*/
|
|
7301
7328
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7302
7329
|
/**
|
|
7303
7330
|
* Enforce consistent naming for boolean names.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-boolean-name.md
|
|
7305
7332
|
*/
|
|
7306
7333
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7307
7334
|
/**
|
|
7308
7335
|
* Enforce consistent class member order.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-class-member-order.md
|
|
7310
7337
|
*/
|
|
7311
7338
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7312
7339
|
/**
|
|
7313
7340
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-compound-words.md
|
|
7315
7342
|
*/
|
|
7316
7343
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7317
7344
|
/**
|
|
7318
7345
|
* Enforce consistent conditional object spread style.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7320
7347
|
*/
|
|
7321
7348
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7322
7349
|
/**
|
|
7323
7350
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-date-clone.md
|
|
7325
7352
|
*/
|
|
7326
7353
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7327
7354
|
/**
|
|
7328
7355
|
* Use destructured variables over properties.
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-destructuring.md
|
|
7330
7357
|
*/
|
|
7331
7358
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7332
7359
|
/**
|
|
7333
7360
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7335
7362
|
*/
|
|
7336
7363
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7337
7364
|
/**
|
|
7338
7365
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-existence-index-check.md
|
|
7340
7367
|
*/
|
|
7341
7368
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7342
7369
|
/**
|
|
7343
7370
|
* Enforce consistent decorator position on exported classes.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7345
7372
|
*/
|
|
7346
7373
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7347
7374
|
/**
|
|
7348
7375
|
* Move function definitions to the highest possible scope.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-scoping.md
|
|
7350
7377
|
*/
|
|
7351
7378
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7352
7379
|
/**
|
|
7353
7380
|
* Enforce function syntax by role.
|
|
7354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-style.md
|
|
7355
7382
|
*/
|
|
7356
7383
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7357
7384
|
/**
|
|
7358
7385
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-json-file-read.md
|
|
7360
7387
|
*/
|
|
7361
7388
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7362
7389
|
/**
|
|
7363
7390
|
* Enforce consistent optional chaining for same-base member access.
|
|
7364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-optional-chaining.md
|
|
7365
7392
|
*/
|
|
7366
7393
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7367
7394
|
/**
|
|
7368
7395
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7370
7397
|
*/
|
|
7371
7398
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7372
7399
|
/**
|
|
7373
7400
|
* Enforce consistent labels on tuple type elements.
|
|
7374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-tuple-labels.md
|
|
7375
7402
|
*/
|
|
7376
7403
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7377
7404
|
/**
|
|
7378
7405
|
* Enforce correct `Error` subclassing.
|
|
7379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/custom-error-definition.md
|
|
7380
7407
|
*/
|
|
7381
7408
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7382
7409
|
/**
|
|
7383
7410
|
* Enforce consistent default export declarations.
|
|
7384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/default-export-style.md
|
|
7385
7412
|
*/
|
|
7386
7413
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7387
7414
|
/**
|
|
7388
7415
|
* Enforce consistent style for DOM element dataset access.
|
|
7389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/dom-node-dataset.md
|
|
7390
7417
|
*/
|
|
7391
7418
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7392
7419
|
/**
|
|
7393
7420
|
* Enforce no spaces between braces.
|
|
7394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/empty-brace-spaces.md
|
|
7395
7422
|
*/
|
|
7396
7423
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7397
7424
|
/**
|
|
7398
7425
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/error-message.md
|
|
7400
7427
|
*/
|
|
7401
7428
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7402
7429
|
/**
|
|
7403
7430
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/escape-case.md
|
|
7405
7432
|
*/
|
|
7406
7433
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7407
7434
|
/**
|
|
7408
7435
|
* Add expiration conditions to TODO comments.
|
|
7409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/expiring-todo-comments.md
|
|
7410
7437
|
*/
|
|
7411
7438
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7412
7439
|
/**
|
|
7413
7440
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-length-check.md
|
|
7415
7442
|
*/
|
|
7416
7443
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7417
7444
|
/**
|
|
7418
7445
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-timer-delay.md
|
|
7420
7447
|
*/
|
|
7421
7448
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7422
7449
|
/**
|
|
7423
7450
|
* Enforce a case style for filenames and directory names.
|
|
7424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/filename-case.md
|
|
7425
7452
|
*/
|
|
7426
7453
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7427
7454
|
/**
|
|
7428
7455
|
* Require identifiers to match a specified regular expression.
|
|
7429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/id-match.md
|
|
7430
7457
|
*/
|
|
7431
7458
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7432
7459
|
/**
|
|
7433
7460
|
* Enforce specific import styles per module.
|
|
7434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/import-style.md
|
|
7435
7462
|
*/
|
|
7436
7463
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7437
7464
|
/**
|
|
7438
7465
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/isolated-functions.md
|
|
7440
7467
|
*/
|
|
7441
7468
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7469
|
+
/**
|
|
7470
|
+
* Enforce a consistent style for optional loop sources.
|
|
7471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/iteration-fallback-style.md
|
|
7472
|
+
*/
|
|
7473
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7442
7474
|
/**
|
|
7443
7475
|
* Require or disallow logical assignment operator shorthand
|
|
7444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/logical-assignment-operators.md
|
|
7445
7477
|
*/
|
|
7446
7478
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7447
7479
|
/**
|
|
7448
7480
|
* Limit the depth of nested calls.
|
|
7449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/max-nested-calls.md
|
|
7450
7482
|
*/
|
|
7451
7483
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7452
7484
|
/**
|
|
7453
7485
|
* Enforce replacements for variable, property, and filenames.
|
|
7454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/name-replacements.md
|
|
7455
7487
|
*/
|
|
7456
7488
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7457
7489
|
/**
|
|
7458
7490
|
* Enforce correct use of `new` for builtin constructors.
|
|
7459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/new-for-builtins.md
|
|
7460
7492
|
*/
|
|
7461
7493
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7462
7494
|
/**
|
|
7463
7495
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7465
7497
|
*/
|
|
7466
7498
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7467
7499
|
/**
|
|
7468
7500
|
* Disallow recursive access to `this` within getters and setters.
|
|
7469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accessor-recursion.md
|
|
7470
7502
|
*/
|
|
7471
7503
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7472
7504
|
/**
|
|
7473
7505
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7475
7507
|
*/
|
|
7476
7508
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7477
7509
|
/**
|
|
7478
7510
|
* Disallow anonymous functions and classes as the default export.
|
|
7479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-anonymous-default-export.md
|
|
7480
7512
|
*/
|
|
7481
7513
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7482
7514
|
/**
|
|
7483
7515
|
* Prevent passing a function reference directly to iterator methods.
|
|
7484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-callback-reference.md
|
|
7485
7517
|
*/
|
|
7486
7518
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7487
7519
|
/**
|
|
7488
7520
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7490
7522
|
*/
|
|
7491
7523
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7492
7524
|
/**
|
|
7493
7525
|
* Disallow using reference values as `Array#fill()` values.
|
|
7494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7495
7527
|
*/
|
|
7496
7528
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7497
7529
|
/**
|
|
7498
7530
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-from-fill.md
|
|
7500
7532
|
*/
|
|
7501
7533
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7502
7534
|
/**
|
|
7503
7535
|
* Disallow front-of-array mutation.
|
|
7504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-front-mutation.md
|
|
7505
7537
|
*/
|
|
7506
7538
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7507
7539
|
/**
|
|
7508
7540
|
* Disallow using the `this` argument in array methods.
|
|
7509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-method-this-argument.md
|
|
7510
7542
|
*/
|
|
7511
7543
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7512
7544
|
/**
|
|
7513
7545
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7515
7547
|
* @deprecated
|
|
7516
7548
|
*/
|
|
7517
7549
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7518
7550
|
/**
|
|
7519
7551
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reduce.md
|
|
7521
7553
|
*/
|
|
7522
7554
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7523
7555
|
/**
|
|
7524
7556
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reverse.md
|
|
7526
7558
|
*/
|
|
7527
7559
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7528
7560
|
/**
|
|
7529
7561
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort.md
|
|
7531
7563
|
*/
|
|
7532
7564
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7533
7565
|
/**
|
|
7534
7566
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7536
7568
|
*/
|
|
7537
7569
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7538
7570
|
/**
|
|
7539
7571
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-splice.md
|
|
7541
7573
|
*/
|
|
7542
7574
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7543
7575
|
/**
|
|
7544
7576
|
* Disallow asterisk prefixes in documentation comments.
|
|
7545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7546
7578
|
*/
|
|
7547
7579
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7548
7580
|
/**
|
|
7549
7581
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-async-promise-finally.md
|
|
7551
7583
|
*/
|
|
7552
7584
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7553
7585
|
/**
|
|
7554
7586
|
* Disallow member access from await expression.
|
|
7555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-expression-member.md
|
|
7556
7588
|
*/
|
|
7557
7589
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7558
7590
|
/**
|
|
7559
7591
|
* Disallow using `await` in `Promise` method parameters.
|
|
7560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7561
7593
|
*/
|
|
7562
7594
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7595
|
+
/**
|
|
7596
|
+
* Disallow barrel files.
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-barrel-files.md
|
|
7598
|
+
*/
|
|
7599
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7563
7600
|
/**
|
|
7564
7601
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-blob-to-file.md
|
|
7566
7603
|
*/
|
|
7567
7604
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7568
7605
|
/**
|
|
7569
7606
|
* Disallow boolean-returning sort comparators.
|
|
7570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7571
7608
|
*/
|
|
7572
7609
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7573
7610
|
/**
|
|
7574
7611
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7576
7613
|
*/
|
|
7577
7614
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7578
7615
|
/**
|
|
7579
7616
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-canvas-to-image.md
|
|
7581
7618
|
*/
|
|
7582
7619
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7583
7620
|
/**
|
|
7584
7621
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-chained-comparison.md
|
|
7586
7623
|
*/
|
|
7587
7624
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7588
7625
|
/**
|
|
7589
7626
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-collection-bracket-access.md
|
|
7591
7628
|
*/
|
|
7592
7629
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7593
7630
|
/**
|
|
7594
7631
|
* Disallow dynamic object property existence checks.
|
|
7595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7596
7633
|
*/
|
|
7597
7634
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7598
7635
|
/**
|
|
7599
7636
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-splice.md
|
|
7601
7638
|
*/
|
|
7602
7639
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7603
7640
|
/**
|
|
7604
7641
|
* Disallow confusing uses of `Array#with()`.
|
|
7605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-with.md
|
|
7606
7643
|
*/
|
|
7607
7644
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7608
7645
|
/**
|
|
7609
7646
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-console-spaces.md
|
|
7611
7648
|
*/
|
|
7612
7649
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7613
7650
|
/**
|
|
7614
7651
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-constant-zero-expression.md
|
|
7616
7653
|
*/
|
|
7617
7654
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7618
7655
|
/**
|
|
7619
7656
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7621
7658
|
*/
|
|
7622
7659
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7623
7660
|
/**
|
|
7624
7661
|
* Do not use `document.cookie` directly.
|
|
7625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-document-cookie.md
|
|
7626
7663
|
*/
|
|
7627
7664
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7628
7665
|
/**
|
|
7629
7666
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-double-comparison.md
|
|
7631
7668
|
*/
|
|
7632
7669
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7633
7670
|
/**
|
|
7634
7671
|
* Disallow duplicate adjacent branches in if chains.
|
|
7635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7636
7673
|
*/
|
|
7637
7674
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7638
7675
|
/**
|
|
7639
7676
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7641
7678
|
*/
|
|
7642
7679
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7643
7680
|
/**
|
|
7644
7681
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-loops.md
|
|
7646
7683
|
*/
|
|
7647
7684
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7648
7685
|
/**
|
|
7649
7686
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-set-values.md
|
|
7651
7688
|
*/
|
|
7652
7689
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7653
7690
|
/**
|
|
7654
7691
|
* Disallow empty files.
|
|
7655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-empty-file.md
|
|
7656
7693
|
*/
|
|
7657
7694
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7658
7695
|
/**
|
|
7659
7696
|
* Disallow assigning to built-in error properties.
|
|
7660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-error-property-assignment.md
|
|
7661
7698
|
*/
|
|
7662
7699
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7663
7700
|
/**
|
|
7664
7701
|
* Disallow exports in scripts.
|
|
7665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-exports-in-scripts.md
|
|
7666
7703
|
*/
|
|
7667
7704
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7668
7705
|
/**
|
|
7669
7706
|
* Prefer `for…of` over the `forEach` method.
|
|
7670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-each.md
|
|
7671
7708
|
*/
|
|
7672
7709
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7673
7710
|
/**
|
|
7674
7711
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-loop.md
|
|
7676
7713
|
*/
|
|
7677
7714
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7678
7715
|
/**
|
|
7679
7716
|
* Disallow assigning properties on the global object.
|
|
7680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7681
7718
|
*/
|
|
7682
7719
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7683
7720
|
/**
|
|
7684
7721
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7686
7723
|
* @deprecated
|
|
7687
7724
|
*/
|
|
7688
7725
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7689
7726
|
/**
|
|
7690
7727
|
* Disallow immediate mutation after variable assignment.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-immediate-mutation.md
|
|
7692
7729
|
*/
|
|
7693
7730
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7694
7731
|
/**
|
|
7695
7732
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7697
7734
|
*/
|
|
7698
7735
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7699
7736
|
/**
|
|
7700
7737
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7702
7739
|
*/
|
|
7703
7740
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7704
7741
|
/**
|
|
7705
7742
|
* Disallow incorrect template literal interpolation syntax.
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7707
7744
|
*/
|
|
7708
7745
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7709
7746
|
/**
|
|
7710
7747
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7712
7749
|
* @deprecated
|
|
7713
7750
|
*/
|
|
7714
7751
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7715
7752
|
/**
|
|
7716
7753
|
* Disallow `instanceof` with built-in objects
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-instanceof-builtins.md
|
|
7718
7755
|
*/
|
|
7719
7756
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7720
7757
|
/**
|
|
7721
7758
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-argument-count.md
|
|
7723
7760
|
*/
|
|
7724
7761
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7725
7762
|
/**
|
|
7726
7763
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7728
7765
|
*/
|
|
7729
7766
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7730
7767
|
/**
|
|
7731
7768
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7733
7770
|
*/
|
|
7734
7771
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7735
7772
|
/**
|
|
7736
7773
|
* Disallow invalid `accept` values on file inputs.
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7738
7775
|
*/
|
|
7739
7776
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7740
7777
|
/**
|
|
7741
7778
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7743
7780
|
*/
|
|
7744
7781
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7745
7782
|
/**
|
|
7746
7783
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7748
7785
|
*/
|
|
7749
7786
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7750
7787
|
/**
|
|
7751
7788
|
* Disallow identifiers starting with `new` or `class`.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-keyword-prefix.md
|
|
7753
7790
|
*/
|
|
7754
7791
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7755
7792
|
/**
|
|
7756
7793
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-current-target-access.md
|
|
7758
7795
|
*/
|
|
7759
7796
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7760
7797
|
/**
|
|
7761
7798
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-event-control.md
|
|
7763
7800
|
*/
|
|
7764
7801
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7765
7802
|
/**
|
|
7766
7803
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7768
7805
|
* @deprecated
|
|
7769
7806
|
*/
|
|
7770
7807
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7771
7808
|
/**
|
|
7772
7809
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-lonely-if.md
|
|
7774
7811
|
*/
|
|
7775
7812
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7776
7813
|
/**
|
|
7777
7814
|
* Disallow mutating a loop iterable during iteration.
|
|
7778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7779
7816
|
*/
|
|
7780
7817
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7781
7818
|
/**
|
|
7782
7819
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7784
7821
|
*/
|
|
7785
7822
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7786
7823
|
/**
|
|
7787
7824
|
* Disallow manually wrapped comments.
|
|
7788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7789
7826
|
*/
|
|
7790
7827
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7791
7828
|
/**
|
|
7792
7829
|
* Disallow checking a Map key before accessing a different key.
|
|
7793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-mismatched-map-key.md
|
|
7794
7831
|
*/
|
|
7795
7832
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7796
7833
|
/**
|
|
7797
7834
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7799
7836
|
*/
|
|
7800
7837
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7801
7838
|
/**
|
|
7802
7839
|
* Disallow references to missing local resources.
|
|
7803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-missing-local-resource.md
|
|
7804
7841
|
*/
|
|
7805
7842
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7806
7843
|
/**
|
|
7807
7844
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7809
7846
|
*/
|
|
7810
7847
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7811
7848
|
/**
|
|
7812
7849
|
* Disallow named usage of default import and export.
|
|
7813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-named-default.md
|
|
7814
7851
|
*/
|
|
7815
7852
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7816
7853
|
/**
|
|
7817
7854
|
* Disallow negated array predicate calls.
|
|
7818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-array-predicate.md
|
|
7819
7856
|
*/
|
|
7820
7857
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7821
7858
|
/**
|
|
7822
7859
|
* Disallow negated comparisons.
|
|
7823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-comparison.md
|
|
7824
7861
|
*/
|
|
7825
7862
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7826
7863
|
/**
|
|
7827
7864
|
* Disallow negated conditions.
|
|
7828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-condition.md
|
|
7829
7866
|
*/
|
|
7830
7867
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7831
7868
|
/**
|
|
7832
7869
|
* Disallow negated expression in equality check.
|
|
7833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7834
7871
|
*/
|
|
7835
7872
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7836
7873
|
/**
|
|
7837
7874
|
* Disallow nested ternary expressions.
|
|
7838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nested-ternary.md
|
|
7839
7876
|
*/
|
|
7840
7877
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7841
7878
|
/**
|
|
7842
7879
|
* Disallow `new Array()`.
|
|
7843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-array.md
|
|
7844
7881
|
*/
|
|
7845
7882
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7846
7883
|
/**
|
|
7847
7884
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-buffer.md
|
|
7849
7886
|
*/
|
|
7850
7887
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7851
7888
|
/**
|
|
7852
7889
|
* Disallow non-function values with function-style verb prefixes.
|
|
7853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7854
7891
|
*/
|
|
7855
7892
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7856
7893
|
/**
|
|
7857
7894
|
* Disallow non-standard properties on built-in objects.
|
|
7858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7859
7896
|
*/
|
|
7860
7897
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7861
7898
|
/**
|
|
7862
7899
|
* Disallow the use of the `null` literal.
|
|
7863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-null.md
|
|
7864
7901
|
*/
|
|
7865
7902
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7866
7903
|
/**
|
|
7867
7904
|
* Disallow the use of objects as default parameters.
|
|
7868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7869
7906
|
*/
|
|
7870
7907
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7871
7908
|
/**
|
|
7872
7909
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7874
7911
|
*/
|
|
7875
7912
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7876
7913
|
/**
|
|
7877
7914
|
* Disallow optional chaining on undeclared variables.
|
|
7878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7879
7916
|
*/
|
|
7880
7917
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7881
7918
|
/**
|
|
7882
7919
|
* Disallow `process.exit()`.
|
|
7883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-process-exit.md
|
|
7884
7921
|
*/
|
|
7885
7922
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7886
7923
|
/**
|
|
7887
7924
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-redundant-comparison.md
|
|
7889
7926
|
*/
|
|
7890
7927
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7891
7928
|
/**
|
|
7892
7929
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-return-array-push.md
|
|
7894
7931
|
*/
|
|
7895
7932
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7896
7933
|
/**
|
|
7897
7934
|
* Disallow selector syntax in DOM names.
|
|
7898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7899
7936
|
*/
|
|
7900
7937
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7901
7938
|
/**
|
|
7902
7939
|
* Disallow shorthand properties that override related longhand properties.
|
|
7903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7904
7941
|
*/
|
|
7905
7942
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7906
7943
|
/**
|
|
7907
7944
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7909
7946
|
*/
|
|
7910
7947
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7911
7948
|
/**
|
|
7912
7949
|
* Disallow classes that only have static members.
|
|
7913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-static-only-class.md
|
|
7914
7951
|
*/
|
|
7915
7952
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7916
7953
|
/**
|
|
7917
7954
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-subtraction-comparison.md
|
|
7919
7956
|
*/
|
|
7920
7957
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7921
7958
|
/**
|
|
7922
7959
|
* Disallow `then` property.
|
|
7923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-thenable.md
|
|
7924
7961
|
*/
|
|
7925
7962
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7926
7963
|
/**
|
|
7927
7964
|
* Disallow assigning `this` to a variable.
|
|
7928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-assignment.md
|
|
7929
7966
|
*/
|
|
7930
7967
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7931
7968
|
/**
|
|
7932
7969
|
* Disallow `this` outside of classes.
|
|
7933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-outside-of-class.md
|
|
7934
7971
|
*/
|
|
7935
7972
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7936
7973
|
/**
|
|
7937
7974
|
* Disallow assigning to top-level variables from inside functions.
|
|
7938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7939
7976
|
*/
|
|
7940
7977
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7941
7978
|
/**
|
|
7942
7979
|
* Disallow top-level side effects in exported modules.
|
|
7943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-side-effects.md
|
|
7944
7981
|
*/
|
|
7945
7982
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7946
7983
|
/**
|
|
7947
7984
|
* Disallow `all` as a transition property.
|
|
7948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-transition-all.md
|
|
7949
7986
|
*/
|
|
7950
7987
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7951
7988
|
/**
|
|
7952
7989
|
* Disallow comparing `undefined` using `typeof`.
|
|
7953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-typeof-undefined.md
|
|
7954
7991
|
*/
|
|
7955
7992
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7956
7993
|
/**
|
|
7957
7994
|
* Disallow referencing methods without calling them.
|
|
7958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-uncalled-method.md
|
|
7959
7996
|
*/
|
|
7960
7997
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7961
7998
|
/**
|
|
7962
7999
|
* Require class members to be declared.
|
|
7963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-undeclared-class-members.md
|
|
7964
8001
|
*/
|
|
7965
8002
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7966
8003
|
/**
|
|
7967
8004
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7969
8006
|
*/
|
|
7970
8007
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7971
8008
|
/**
|
|
7972
8009
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7974
8011
|
*/
|
|
7975
8012
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7976
8013
|
/**
|
|
7977
8014
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7979
8016
|
*/
|
|
7980
8017
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7981
8018
|
/**
|
|
7982
8019
|
* Disallow awaiting non-promise values.
|
|
7983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-await.md
|
|
7984
8021
|
*/
|
|
7985
8022
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7986
8023
|
/**
|
|
7987
8024
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7989
8026
|
*/
|
|
7990
8027
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7991
8028
|
/**
|
|
7992
8029
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7994
8031
|
*/
|
|
7995
8032
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7996
8033
|
/**
|
|
7997
8034
|
* Disallow unnecessary `globalThis` references.
|
|
7998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7999
8036
|
*/
|
|
8000
8037
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8001
8038
|
/**
|
|
8002
8039
|
* Disallow unnecessary nested ternary expressions.
|
|
8003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8004
8041
|
*/
|
|
8005
8042
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8006
8043
|
/**
|
|
8007
8044
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8009
8046
|
*/
|
|
8010
8047
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8011
8048
|
/**
|
|
8012
8049
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8014
8051
|
*/
|
|
8015
8052
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8016
8053
|
/**
|
|
8017
8054
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-splice.md
|
|
8019
8056
|
*/
|
|
8020
8057
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8021
8058
|
/**
|
|
8022
8059
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8024
8061
|
*/
|
|
8025
8062
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8026
8063
|
/**
|
|
8027
8064
|
* Disallow unreadable array destructuring.
|
|
8028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8029
8066
|
*/
|
|
8030
8067
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8031
8068
|
/**
|
|
8032
8069
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8034
8071
|
*/
|
|
8035
8072
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8036
8073
|
/**
|
|
8037
8074
|
* Disallow unreadable IIFEs.
|
|
8038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-iife.md
|
|
8039
8076
|
*/
|
|
8040
8077
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8041
8078
|
/**
|
|
8042
8079
|
* Disallow unreadable `new` expressions.
|
|
8043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8044
8081
|
*/
|
|
8045
8082
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8046
8083
|
/**
|
|
8047
8084
|
* Disallow unreadable object destructuring.
|
|
8048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8049
8086
|
*/
|
|
8050
8087
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8051
8088
|
/**
|
|
8052
8089
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8054
8091
|
*/
|
|
8055
8092
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8056
8093
|
/**
|
|
8057
8094
|
* Disallow unsafe DOM HTML APIs.
|
|
8058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8059
8096
|
*/
|
|
8060
8097
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8061
8098
|
/**
|
|
8062
8099
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8064
8101
|
*/
|
|
8065
8102
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8066
8103
|
/**
|
|
8067
8104
|
* Disallow unsafe values as property keys.
|
|
8068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-property-key.md
|
|
8069
8106
|
*/
|
|
8070
8107
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8108
|
+
/**
|
|
8109
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8111
|
+
*/
|
|
8112
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8071
8113
|
/**
|
|
8072
8114
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8074
8116
|
*/
|
|
8075
8117
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8076
8118
|
/**
|
|
8077
8119
|
* Disallow ignoring the return value of selected array methods.
|
|
8078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-array-method-return.md
|
|
8079
8121
|
*/
|
|
8080
8122
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8081
8123
|
/**
|
|
8082
8124
|
* Disallow unused object properties.
|
|
8083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-properties.md
|
|
8084
8126
|
*/
|
|
8085
8127
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8086
8128
|
/**
|
|
8087
8129
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8089
8131
|
*/
|
|
8090
8132
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8091
8133
|
/**
|
|
8092
8134
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-coercion.md
|
|
8094
8136
|
*/
|
|
8095
8137
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8096
8138
|
/**
|
|
8097
8139
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-collection-argument.md
|
|
8099
8141
|
*/
|
|
8100
8142
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8101
8143
|
/**
|
|
8102
8144
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8104
8146
|
*/
|
|
8105
8147
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8106
8148
|
/**
|
|
8107
8149
|
* Disallow useless concatenation of literals.
|
|
8108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-concat.md
|
|
8109
8151
|
*/
|
|
8110
8152
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8111
8153
|
/**
|
|
8112
8154
|
* Disallow useless `continue` statements.
|
|
8113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-continue.md
|
|
8114
8156
|
*/
|
|
8115
8157
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8116
8158
|
/**
|
|
8117
8159
|
* Disallow unnecessary existence checks before deletion.
|
|
8118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-delete-check.md
|
|
8119
8161
|
*/
|
|
8120
8162
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8121
8163
|
/**
|
|
8122
8164
|
* Disallow `else` after a statement that exits.
|
|
8123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-else.md
|
|
8124
8166
|
*/
|
|
8125
8167
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8126
8168
|
/**
|
|
8127
8169
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8129
8171
|
*/
|
|
8130
8172
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8131
8173
|
/**
|
|
8132
8174
|
* Disallow useless fallback when spreading in object literals.
|
|
8133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8134
8176
|
*/
|
|
8135
8177
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8136
8178
|
/**
|
|
8137
8179
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8139
8181
|
*/
|
|
8140
8182
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8141
8183
|
/**
|
|
8142
8184
|
* Disallow useless array length check.
|
|
8143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-length-check.md
|
|
8144
8186
|
*/
|
|
8145
8187
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8146
8188
|
/**
|
|
8147
8189
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-logical-operand.md
|
|
8149
8191
|
*/
|
|
8150
8192
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8151
8193
|
/**
|
|
8152
8194
|
* Disallow useless overrides of class methods.
|
|
8153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-override.md
|
|
8154
8196
|
*/
|
|
8155
8197
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8156
8198
|
/**
|
|
8157
8199
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8159
8201
|
*/
|
|
8160
8202
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8161
8203
|
/**
|
|
8162
8204
|
* Disallow redundant re-exports.
|
|
8163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-re-export.md
|
|
8164
8206
|
*/
|
|
8165
8207
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8166
8208
|
/**
|
|
8167
8209
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-recursion.md
|
|
8169
8211
|
*/
|
|
8170
8212
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8171
8213
|
/**
|
|
8172
8214
|
* Disallow unnecessary spread.
|
|
8173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-spread.md
|
|
8174
8216
|
*/
|
|
8175
8217
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8176
8218
|
/**
|
|
8177
8219
|
* Disallow useless case in switch statements.
|
|
8178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-switch-case.md
|
|
8179
8221
|
*/
|
|
8180
8222
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8181
8223
|
/**
|
|
8182
8224
|
* Disallow useless template literal expressions.
|
|
8183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-template-literals.md
|
|
8184
8226
|
*/
|
|
8185
8227
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8186
8228
|
/**
|
|
8187
8229
|
* Disallow useless `undefined`.
|
|
8188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-undefined.md
|
|
8189
8231
|
*/
|
|
8190
8232
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8191
8233
|
/**
|
|
8192
8234
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8194
8236
|
*/
|
|
8195
8237
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8196
8238
|
/**
|
|
8197
8239
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-zero-fractions.md
|
|
8199
8241
|
*/
|
|
8200
8242
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8201
8243
|
/**
|
|
8202
8244
|
* Enforce proper case for numeric literals.
|
|
8203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/number-literal-case.md
|
|
8204
8246
|
*/
|
|
8205
8247
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8206
8248
|
/**
|
|
8207
8249
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/numeric-separators-style.md
|
|
8209
8251
|
*/
|
|
8210
8252
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8211
8253
|
/**
|
|
8212
8254
|
* Require assignment operator shorthand where possible.
|
|
8213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/operator-assignment.md
|
|
8214
8256
|
*/
|
|
8215
8257
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8216
8258
|
/**
|
|
8217
8259
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8219
8261
|
*/
|
|
8220
8262
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8221
8263
|
/**
|
|
8222
8264
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8224
8266
|
*/
|
|
8225
8267
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8226
8268
|
/**
|
|
8227
8269
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener.md
|
|
8229
8271
|
*/
|
|
8230
8272
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8231
8273
|
/**
|
|
8232
8274
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8234
8276
|
*/
|
|
8235
8277
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8236
8278
|
/**
|
|
8237
8279
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-aggregate-error.md
|
|
8239
8281
|
*/
|
|
8240
8282
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8241
8283
|
/**
|
|
8242
8284
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-find.md
|
|
8244
8286
|
*/
|
|
8245
8287
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8246
8288
|
/**
|
|
8247
8289
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat.md
|
|
8249
8291
|
*/
|
|
8250
8292
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8251
8293
|
/**
|
|
8252
8294
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat-map.md
|
|
8254
8296
|
*/
|
|
8255
8297
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8256
8298
|
/**
|
|
8257
8299
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-async.md
|
|
8259
8301
|
*/
|
|
8260
8302
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8261
8303
|
/**
|
|
8262
8304
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-map.md
|
|
8264
8306
|
*/
|
|
8265
8307
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8266
8308
|
/**
|
|
8267
8309
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-range.md
|
|
8269
8311
|
*/
|
|
8270
8312
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8271
8313
|
/**
|
|
8272
8314
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-index-of.md
|
|
8274
8316
|
*/
|
|
8275
8317
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8276
8318
|
/**
|
|
8277
8319
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8279
8321
|
*/
|
|
8280
8322
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8281
8323
|
/**
|
|
8282
8324
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-last-methods.md
|
|
8284
8326
|
*/
|
|
8285
8327
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8286
8328
|
/**
|
|
8287
8329
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-slice.md
|
|
8289
8331
|
*/
|
|
8290
8332
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8291
8333
|
/**
|
|
8292
8334
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-some.md
|
|
8294
8336
|
*/
|
|
8295
8337
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8296
8338
|
/**
|
|
8297
8339
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-at.md
|
|
8299
8341
|
*/
|
|
8300
8342
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8301
8343
|
/**
|
|
8302
8344
|
* Prefer `await` over promise chaining.
|
|
8303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-await.md
|
|
8304
8346
|
*/
|
|
8305
8347
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8306
8348
|
/**
|
|
8307
8349
|
* Prefer `BigInt` literals over the constructor.
|
|
8308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-bigint-literals.md
|
|
8309
8351
|
*/
|
|
8310
8352
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8311
8353
|
/**
|
|
8312
8354
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8314
8356
|
*/
|
|
8315
8357
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8316
8358
|
/**
|
|
8317
8359
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8319
8361
|
*/
|
|
8320
8362
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8321
8363
|
/**
|
|
8322
8364
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-boolean-return.md
|
|
8324
8366
|
*/
|
|
8325
8367
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8326
8368
|
/**
|
|
8327
8369
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-class-fields.md
|
|
8329
8371
|
*/
|
|
8330
8372
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8331
8373
|
/**
|
|
8332
8374
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8334
8376
|
*/
|
|
8335
8377
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8336
8378
|
/**
|
|
8337
8379
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-code-point.md
|
|
8339
8381
|
*/
|
|
8340
8382
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8341
8383
|
/**
|
|
8342
8384
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-continue.md
|
|
8344
8386
|
*/
|
|
8345
8387
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8346
8388
|
/**
|
|
8347
8389
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-date-now.md
|
|
8349
8391
|
*/
|
|
8350
8392
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8351
8393
|
/**
|
|
8352
8394
|
* Prefer default parameters over reassignment.
|
|
8353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-default-parameters.md
|
|
8354
8396
|
*/
|
|
8355
8397
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8356
8398
|
/**
|
|
8357
8399
|
* Prefer direct iteration over default iterator method calls.
|
|
8358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-direct-iteration.md
|
|
8359
8401
|
*/
|
|
8360
8402
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8361
8403
|
/**
|
|
8362
8404
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dispose.md
|
|
8364
8406
|
*/
|
|
8365
8407
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8366
8408
|
/**
|
|
8367
8409
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-append.md
|
|
8369
8411
|
*/
|
|
8370
8412
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8371
8413
|
/**
|
|
8372
8414
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8374
8416
|
* @deprecated
|
|
8375
8417
|
*/
|
|
8376
8418
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8377
8419
|
/**
|
|
8378
8420
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8380
8422
|
*/
|
|
8381
8423
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8382
8424
|
/**
|
|
8383
8425
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8385
8427
|
*/
|
|
8386
8428
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8387
8429
|
/**
|
|
8388
8430
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8390
8432
|
*/
|
|
8391
8433
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8392
8434
|
/**
|
|
8393
8435
|
* Prefer `.textContent` over `.innerText`.
|
|
8394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8395
8437
|
*/
|
|
8396
8438
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8397
8439
|
/**
|
|
8398
8440
|
* Prefer early returns over full-function conditional wrapping.
|
|
8399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-early-return.md
|
|
8400
8442
|
*/
|
|
8401
8443
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8402
8444
|
/**
|
|
8403
8445
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-else-if.md
|
|
8405
8447
|
*/
|
|
8406
8448
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8407
8449
|
/**
|
|
8408
8450
|
* Prefer `Error.isError()` when checking for errors.
|
|
8409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-error-is-error.md
|
|
8410
8452
|
*/
|
|
8411
8453
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8412
8454
|
/**
|
|
8413
8455
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-event-target.md
|
|
8415
8457
|
*/
|
|
8416
8458
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8417
8459
|
/**
|
|
8418
8460
|
* Prefer explicit viewport units.
|
|
8419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8420
8462
|
*/
|
|
8421
8463
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8422
8464
|
/**
|
|
8423
8465
|
* Prefer `export…from` when re-exporting.
|
|
8424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-export-from.md
|
|
8425
8467
|
*/
|
|
8426
8468
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8427
8469
|
/**
|
|
8428
8470
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8430
8472
|
*/
|
|
8431
8473
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8432
8474
|
/**
|
|
8433
8475
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8435
8477
|
*/
|
|
8436
8478
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8437
8479
|
/**
|
|
8438
8480
|
* Prefer global numeric constants over `Number` static properties.
|
|
8439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-number-constants.md
|
|
8440
8482
|
*/
|
|
8441
8483
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8442
8484
|
/**
|
|
8443
8485
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-this.md
|
|
8445
8487
|
*/
|
|
8446
8488
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8447
8489
|
/**
|
|
8448
8490
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-group-by.md
|
|
8450
8492
|
*/
|
|
8451
8493
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8452
8494
|
/**
|
|
8453
8495
|
* Prefer `.has()` when checking existence.
|
|
8454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-has-check.md
|
|
8455
8497
|
*/
|
|
8456
8498
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8457
8499
|
/**
|
|
8458
8500
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8460
8502
|
*/
|
|
8461
8503
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8462
8504
|
/**
|
|
8463
8505
|
* Prefer HTTPS over HTTP.
|
|
8464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-https.md
|
|
8465
8507
|
*/
|
|
8466
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
8508
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8467
8509
|
/**
|
|
8468
8510
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8470
8512
|
*/
|
|
8471
8513
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8472
8514
|
/**
|
|
8473
8515
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8475
8517
|
*/
|
|
8476
8518
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8477
8519
|
/**
|
|
8478
8520
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes.md
|
|
8480
8522
|
*/
|
|
8481
8523
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8482
8524
|
/**
|
|
8483
8525
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8485
8527
|
*/
|
|
8486
8528
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8487
8529
|
/**
|
|
8488
8530
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8490
8532
|
*/
|
|
8491
8533
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8492
8534
|
/**
|
|
8493
8535
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-concat.md
|
|
8495
8537
|
*/
|
|
8496
8538
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8497
8539
|
/**
|
|
8498
8540
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8500
8542
|
*/
|
|
8501
8543
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8502
8544
|
/**
|
|
8503
8545
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8505
8547
|
*/
|
|
8506
8548
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8507
8549
|
/**
|
|
8508
8550
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8510
8552
|
*/
|
|
8511
8553
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8512
8554
|
/**
|
|
8513
8555
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8515
8557
|
* @deprecated
|
|
8516
8558
|
*/
|
|
8517
8559
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8518
8560
|
/**
|
|
8519
8561
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8521
8563
|
*/
|
|
8522
8564
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8523
8565
|
/**
|
|
8524
8566
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-location-assign.md
|
|
8526
8568
|
*/
|
|
8527
8569
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8528
8570
|
/**
|
|
8529
8571
|
* Prefer using a logical operator over a ternary.
|
|
8530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8531
8573
|
*/
|
|
8532
8574
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8533
8575
|
/**
|
|
8534
8576
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-map-from-entries.md
|
|
8536
8578
|
*/
|
|
8537
8579
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8538
8580
|
/**
|
|
8539
8581
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-abs.md
|
|
8541
8583
|
*/
|
|
8542
8584
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8543
8585
|
/**
|
|
8544
8586
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-constants.md
|
|
8546
8588
|
*/
|
|
8547
8589
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8548
8590
|
/**
|
|
8549
8591
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-min-max.md
|
|
8551
8593
|
*/
|
|
8552
8594
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8553
8595
|
/**
|
|
8554
8596
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-trunc.md
|
|
8556
8598
|
*/
|
|
8557
8599
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8558
8600
|
/**
|
|
8559
8601
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8561
8603
|
*/
|
|
8562
8604
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8563
8605
|
/**
|
|
8564
8606
|
* Prefer modern DOM APIs.
|
|
8565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8566
8608
|
*/
|
|
8567
8609
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8568
8610
|
/**
|
|
8569
8611
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8571
8613
|
*/
|
|
8572
8614
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8573
8615
|
/**
|
|
8574
8616
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-module.md
|
|
8576
8618
|
*/
|
|
8577
8619
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8578
8620
|
/**
|
|
8579
8621
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8581
8623
|
*/
|
|
8582
8624
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8583
8625
|
/**
|
|
8584
8626
|
* Prefer negative index over `.length - index` when possible.
|
|
8585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-negative-index.md
|
|
8586
8628
|
*/
|
|
8587
8629
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8588
8630
|
/**
|
|
8589
8631
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-node-protocol.md
|
|
8591
8633
|
*/
|
|
8592
8634
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8593
8635
|
/**
|
|
8594
8636
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-coercion.md
|
|
8596
8638
|
*/
|
|
8597
8639
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8598
8640
|
/**
|
|
8599
8641
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8601
8643
|
*/
|
|
8602
8644
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8603
8645
|
/**
|
|
8604
8646
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-properties.md
|
|
8606
8648
|
*/
|
|
8607
8649
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8608
8650
|
/**
|
|
8609
8651
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-define-properties.md
|
|
8611
8653
|
*/
|
|
8612
8654
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8613
8655
|
/**
|
|
8614
8656
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8616
8658
|
*/
|
|
8617
8659
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8618
8660
|
/**
|
|
8619
8661
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-from-entries.md
|
|
8621
8663
|
*/
|
|
8622
8664
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8623
8665
|
/**
|
|
8624
8666
|
* Prefer the most specific `Object` iterable method.
|
|
8625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8626
8668
|
*/
|
|
8627
8669
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8628
8670
|
/**
|
|
8629
8671
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-observer-apis.md
|
|
8631
8673
|
*/
|
|
8632
8674
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8633
8675
|
/**
|
|
8634
8676
|
* Prefer omitting the `catch` binding parameter.
|
|
8635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8636
8678
|
*/
|
|
8637
8679
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8638
8680
|
/**
|
|
8639
8681
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-path2d.md
|
|
8641
8683
|
*/
|
|
8642
8684
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8643
8685
|
/**
|
|
8644
8686
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-private-class-fields.md
|
|
8646
8688
|
*/
|
|
8647
8689
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8648
8690
|
/**
|
|
8649
8691
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-try.md
|
|
8651
8693
|
*/
|
|
8652
8694
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8653
8695
|
/**
|
|
8654
8696
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8656
8698
|
*/
|
|
8657
8699
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8658
8700
|
/**
|
|
8659
8701
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-prototype-methods.md
|
|
8661
8703
|
*/
|
|
8662
8704
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8663
8705
|
/**
|
|
8664
8706
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-query-selector.md
|
|
8666
8708
|
*/
|
|
8667
8709
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8668
8710
|
/**
|
|
8669
8711
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-queue-microtask.md
|
|
8671
8713
|
*/
|
|
8672
8714
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8673
8715
|
/**
|
|
8674
8716
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-reflect-apply.md
|
|
8676
8718
|
*/
|
|
8677
8719
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8678
8720
|
/**
|
|
8679
8721
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-escape.md
|
|
8681
8723
|
*/
|
|
8682
8724
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8683
8725
|
/**
|
|
8684
8726
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-test.md
|
|
8686
8728
|
*/
|
|
8687
8729
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8688
8730
|
/**
|
|
8689
8731
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-response-static-json.md
|
|
8691
8733
|
*/
|
|
8692
8734
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8693
8735
|
/**
|
|
8694
8736
|
* Prefer `:scope` when using element query selector methods.
|
|
8695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-scoped-selector.md
|
|
8696
8738
|
*/
|
|
8697
8739
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8698
8740
|
/**
|
|
8699
8741
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-has.md
|
|
8701
8743
|
*/
|
|
8702
8744
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8703
8745
|
/**
|
|
8704
8746
|
* Prefer `Set` methods for Set operations.
|
|
8705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-methods.md
|
|
8706
8748
|
*/
|
|
8707
8749
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8708
8750
|
/**
|
|
8709
8751
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-size.md
|
|
8711
8753
|
*/
|
|
8712
8754
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8713
8755
|
/**
|
|
8714
8756
|
* Prefer arrow function properties over methods with a single return.
|
|
8715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8716
8758
|
*/
|
|
8717
8759
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8718
8760
|
/**
|
|
8719
8761
|
* Prefer simple conditions first in logical expressions.
|
|
8720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8721
8763
|
*/
|
|
8722
8764
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8723
8765
|
/**
|
|
8724
8766
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8726
8768
|
*/
|
|
8727
8769
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8728
8770
|
/**
|
|
8729
8771
|
* Prefer simplified conditions.
|
|
8730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8731
8773
|
*/
|
|
8732
8774
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8733
8775
|
/**
|
|
8734
8776
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8736
8778
|
*/
|
|
8737
8779
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8738
8780
|
/**
|
|
8739
8781
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-call.md
|
|
8741
8783
|
*/
|
|
8742
8784
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8743
8785
|
/**
|
|
8744
8786
|
* Prefer a single object destructuring declaration per local const source.
|
|
8745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8746
8788
|
*/
|
|
8747
8789
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8748
8790
|
/**
|
|
8749
8791
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-replace.md
|
|
8751
8793
|
*/
|
|
8752
8794
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8753
8795
|
/**
|
|
8754
8796
|
* Prefer declaring variables in the smallest possible scope.
|
|
8755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-smaller-scope.md
|
|
8756
8798
|
*/
|
|
8757
8799
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8758
8800
|
/**
|
|
8759
8801
|
* Prefer `String#split()` with a limit.
|
|
8760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-split-limit.md
|
|
8761
8803
|
*/
|
|
8762
8804
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8763
8805
|
/**
|
|
8764
8806
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-spread.md
|
|
8766
8808
|
*/
|
|
8767
8809
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8768
8810
|
/**
|
|
8769
8811
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-match-all.md
|
|
8771
8813
|
*/
|
|
8772
8814
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8773
8815
|
/**
|
|
8774
8816
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8776
8818
|
*/
|
|
8777
8819
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8778
8820
|
/**
|
|
8779
8821
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-raw.md
|
|
8781
8823
|
*/
|
|
8782
8824
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8783
8825
|
/**
|
|
8784
8826
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-repeat.md
|
|
8786
8828
|
*/
|
|
8787
8829
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8788
8830
|
/**
|
|
8789
8831
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-replace-all.md
|
|
8791
8833
|
*/
|
|
8792
8834
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8793
8835
|
/**
|
|
8794
8836
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-slice.md
|
|
8796
8838
|
*/
|
|
8797
8839
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8798
8840
|
/**
|
|
8799
8841
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8801
8843
|
*/
|
|
8802
8844
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8803
8845
|
/**
|
|
8804
8846
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8806
8848
|
*/
|
|
8807
8849
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8808
8850
|
/**
|
|
8809
8851
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-structured-clone.md
|
|
8811
8853
|
*/
|
|
8812
8854
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8813
8855
|
/**
|
|
8814
8856
|
* Prefer `switch` over multiple `else-if`.
|
|
8815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-switch.md
|
|
8816
8858
|
*/
|
|
8817
8859
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8818
8860
|
/**
|
|
8819
8861
|
* Prefer `Temporal` over `Date`.
|
|
8820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-temporal.md
|
|
8821
8863
|
*/
|
|
8822
8864
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8823
8865
|
/**
|
|
8824
8866
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-ternary.md
|
|
8826
8868
|
*/
|
|
8827
8869
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8828
8870
|
/**
|
|
8829
8871
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-then-catch.md
|
|
8831
8873
|
*/
|
|
8832
8874
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8833
8875
|
/**
|
|
8834
8876
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8836
8878
|
*/
|
|
8837
8879
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8838
8880
|
/**
|
|
8839
8881
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-top-level-await.md
|
|
8841
8883
|
*/
|
|
8842
8884
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8843
8885
|
/**
|
|
8844
8886
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-error.md
|
|
8846
8888
|
*/
|
|
8847
8889
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8848
8890
|
/**
|
|
8849
8891
|
* Require type literals to be last in union types.
|
|
8850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-literal-last.md
|
|
8851
8893
|
*/
|
|
8852
8894
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8853
8895
|
/**
|
|
8854
8896
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8856
8898
|
*/
|
|
8857
8899
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8858
8900
|
/**
|
|
8859
8901
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unary-minus.md
|
|
8861
8903
|
*/
|
|
8862
8904
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8863
8905
|
/**
|
|
8864
8906
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8866
8908
|
*/
|
|
8867
8909
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8868
8910
|
/**
|
|
8869
8911
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-can-parse.md
|
|
8871
8913
|
*/
|
|
8872
8914
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8873
8915
|
/**
|
|
8874
8916
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-href.md
|
|
8876
8918
|
*/
|
|
8877
8919
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8878
8920
|
/**
|
|
8879
8921
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8881
8923
|
*/
|
|
8882
8924
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8883
8925
|
/**
|
|
8884
8926
|
* Prefer putting the condition in the while statement.
|
|
8885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8886
8928
|
*/
|
|
8887
8929
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8888
8930
|
/**
|
|
8889
8931
|
* Renamed to `unicorn/name-replacements`.
|
|
8890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8891
8933
|
* @deprecated
|
|
8892
8934
|
*/
|
|
8893
8935
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8894
8936
|
/**
|
|
8895
8937
|
* Enforce consistent relative URL style.
|
|
8896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/relative-url-style.md
|
|
8897
8939
|
*/
|
|
8898
8940
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8899
8941
|
/**
|
|
8900
8942
|
* Enforce using the separator argument with `Array#join()`.
|
|
8901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-join-separator.md
|
|
8902
8944
|
*/
|
|
8903
8945
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8904
8946
|
/**
|
|
8905
8947
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-sort-compare.md
|
|
8907
8949
|
*/
|
|
8908
8950
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8909
8951
|
/**
|
|
8910
8952
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-css-escape.md
|
|
8912
8954
|
*/
|
|
8913
8955
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8914
8956
|
/**
|
|
8915
8957
|
* Require configured YAML frontmatter fields.
|
|
8916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-frontmatter-fields.md
|
|
8917
8959
|
*/
|
|
8918
8960
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8919
8961
|
/**
|
|
8920
8962
|
* Require non-empty module attributes for imports and exports
|
|
8921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-attributes.md
|
|
8922
8964
|
*/
|
|
8923
8965
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8924
8966
|
/**
|
|
8925
8967
|
* Require non-empty specifier list in import and export statements.
|
|
8926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-specifiers.md
|
|
8927
8969
|
*/
|
|
8928
8970
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8929
8971
|
/**
|
|
8930
8972
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8932
8974
|
*/
|
|
8933
8975
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8934
8976
|
/**
|
|
8935
8977
|
* Require passive event listeners for high-frequency events.
|
|
8936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-passive-events.md
|
|
8937
8979
|
*/
|
|
8938
8980
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8939
8981
|
/**
|
|
8940
8982
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-post-message-target-origin.md
|
|
8942
8984
|
*/
|
|
8943
8985
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8944
8986
|
/**
|
|
8945
8987
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8947
8989
|
*/
|
|
8948
8990
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8991
|
+
/**
|
|
8992
|
+
* Enforce a consistent style for single-line block comments.
|
|
8993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/single-line-block-comment-style.md
|
|
8994
|
+
*/
|
|
8995
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8949
8996
|
/**
|
|
8950
8997
|
* Enforce better string content.
|
|
8951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/string-content.md
|
|
8952
8999
|
*/
|
|
8953
9000
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8954
9001
|
/**
|
|
8955
9002
|
* Enforce consistent brace style for `case` clauses.
|
|
8956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-braces.md
|
|
8957
9004
|
*/
|
|
8958
9005
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8959
9006
|
/**
|
|
8960
9007
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-break-position.md
|
|
8962
9009
|
*/
|
|
8963
9010
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8964
9011
|
/**
|
|
8965
9012
|
* Fix whitespace-insensitive template indentation.
|
|
8966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/template-indent.md
|
|
8967
9014
|
*/
|
|
8968
9015
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8969
9016
|
/**
|
|
8970
9017
|
* Enforce consistent case for text encoding identifiers.
|
|
8971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8972
9019
|
*/
|
|
8973
9020
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8974
9021
|
/**
|
|
8975
9022
|
* Require `new` when creating an error.
|
|
8976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/throw-new-error.md
|
|
8977
9024
|
*/
|
|
8978
9025
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8979
9026
|
/**
|
|
8980
9027
|
* Limit the complexity of `try` blocks.
|
|
8981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/try-complexity.md
|
|
8982
9029
|
*/
|
|
8983
9030
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8984
9031
|
/**
|
|
@@ -10460,6 +10507,11 @@ interface RuleOptions {
|
|
|
10460
10507
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
10461
10508
|
*/
|
|
10462
10509
|
'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>;
|
|
10510
|
+
/**
|
|
10511
|
+
* disallow boolean mapping keys
|
|
10512
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-boolean-key.html
|
|
10513
|
+
*/
|
|
10514
|
+
'yaml/no-boolean-key'?: Linter.RuleEntry<[]>;
|
|
10463
10515
|
/**
|
|
10464
10516
|
* disallow empty document
|
|
10465
10517
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
@@ -12106,15 +12158,19 @@ type JsoncSortKeys = ([{
|
|
|
12106
12158
|
hasProperties?: string[];
|
|
12107
12159
|
order: ((string | {
|
|
12108
12160
|
keyPattern?: string;
|
|
12109
|
-
order?: {
|
|
12161
|
+
order?: ({
|
|
12110
12162
|
type?: ("asc" | "desc");
|
|
12111
12163
|
caseSensitive?: boolean;
|
|
12112
12164
|
natural?: boolean;
|
|
12113
|
-
}
|
|
12165
|
+
} | {
|
|
12166
|
+
type: "ignore";
|
|
12167
|
+
});
|
|
12114
12168
|
})[] | {
|
|
12115
12169
|
type?: ("asc" | "desc");
|
|
12116
12170
|
caseSensitive?: boolean;
|
|
12117
12171
|
natural?: boolean;
|
|
12172
|
+
} | {
|
|
12173
|
+
type: "ignore";
|
|
12118
12174
|
});
|
|
12119
12175
|
minKeys?: number;
|
|
12120
12176
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -12123,15 +12179,19 @@ type JsoncSortKeys = ([{
|
|
|
12123
12179
|
hasProperties?: string[];
|
|
12124
12180
|
order: ((string | {
|
|
12125
12181
|
keyPattern?: string;
|
|
12126
|
-
order?: {
|
|
12182
|
+
order?: ({
|
|
12127
12183
|
type?: ("asc" | "desc");
|
|
12128
12184
|
caseSensitive?: boolean;
|
|
12129
12185
|
natural?: boolean;
|
|
12130
|
-
}
|
|
12186
|
+
} | {
|
|
12187
|
+
type: "ignore";
|
|
12188
|
+
});
|
|
12131
12189
|
})[] | {
|
|
12132
12190
|
type?: ("asc" | "desc");
|
|
12133
12191
|
caseSensitive?: boolean;
|
|
12134
12192
|
natural?: boolean;
|
|
12193
|
+
} | {
|
|
12194
|
+
type: "ignore";
|
|
12135
12195
|
});
|
|
12136
12196
|
minKeys?: number;
|
|
12137
12197
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -19563,7 +19623,9 @@ type UnicodeBom = [] | [("always" | "never")];
|
|
|
19563
19623
|
// ----- unicorn/catch-error-name -----
|
|
19564
19624
|
type UnicornCatchErrorName = [] | [{
|
|
19565
19625
|
name?: string;
|
|
19566
|
-
ignore?:
|
|
19626
|
+
ignore?: (string | {
|
|
19627
|
+
[k: string]: unknown | undefined;
|
|
19628
|
+
})[];
|
|
19567
19629
|
}];
|
|
19568
19630
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
19569
19631
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -19583,11 +19645,19 @@ type UnicornCommentContent = [] | [{
|
|
|
19583
19645
|
}];
|
|
19584
19646
|
// ----- unicorn/consistent-boolean-name -----
|
|
19585
19647
|
type UnicornConsistentBooleanName = [] | [{
|
|
19586
|
-
|
|
19648
|
+
checkVariables?: ("always" | "prohibit" | "never");
|
|
19649
|
+
checkArguments?: ("always" | "prohibit" | "never");
|
|
19650
|
+
checkFunctions?: ("always" | "prohibit" | "never");
|
|
19651
|
+
checkMethods?: ("always" | "prohibit" | "never");
|
|
19652
|
+
checkFields?: ("always" | "prohibit" | "never");
|
|
19587
19653
|
prefixes?: {
|
|
19588
19654
|
[k: string]: boolean | undefined;
|
|
19589
19655
|
};
|
|
19656
|
+
wrappers?: {
|
|
19657
|
+
[k: string]: string | undefined;
|
|
19658
|
+
};
|
|
19590
19659
|
ignore?: unknown[];
|
|
19660
|
+
[k: string]: unknown;
|
|
19591
19661
|
}];
|
|
19592
19662
|
// ----- unicorn/consistent-class-member-order -----
|
|
19593
19663
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -19621,6 +19691,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
19621
19691
|
// ----- unicorn/consistent-function-style -----
|
|
19622
19692
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
19623
19693
|
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19694
|
+
defaultExport?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19624
19695
|
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19625
19696
|
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19626
19697
|
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
@@ -19644,7 +19715,9 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")];
|
|
|
19644
19715
|
// ----- unicorn/expiring-todo-comments -----
|
|
19645
19716
|
type UnicornExpiringTodoComments = [] | [{
|
|
19646
19717
|
terms?: string[];
|
|
19647
|
-
ignore?:
|
|
19718
|
+
ignore?: (string | {
|
|
19719
|
+
[k: string]: unknown | undefined;
|
|
19720
|
+
})[];
|
|
19648
19721
|
checkDates?: boolean;
|
|
19649
19722
|
checkDatesOnPullRequests?: boolean;
|
|
19650
19723
|
allowWarningComments?: boolean;
|
|
@@ -19659,7 +19732,9 @@ type UnicornExplicitTimerDelay = [] | [("always" | "never")];
|
|
|
19659
19732
|
// ----- unicorn/filename-case -----
|
|
19660
19733
|
type UnicornFilenameCase = [] | [({
|
|
19661
19734
|
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
19662
|
-
ignore?:
|
|
19735
|
+
ignore?: (string | {
|
|
19736
|
+
[k: string]: unknown | undefined;
|
|
19737
|
+
})[];
|
|
19663
19738
|
multipleFileExtensions?: boolean;
|
|
19664
19739
|
checkDirectories?: boolean;
|
|
19665
19740
|
} | {
|
|
@@ -19670,7 +19745,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19670
19745
|
kebabCase?: boolean;
|
|
19671
19746
|
pascalCase?: boolean;
|
|
19672
19747
|
};
|
|
19673
|
-
ignore?:
|
|
19748
|
+
ignore?: (string | {
|
|
19749
|
+
[k: string]: unknown | undefined;
|
|
19750
|
+
})[];
|
|
19674
19751
|
multipleFileExtensions?: boolean;
|
|
19675
19752
|
checkDirectories?: boolean;
|
|
19676
19753
|
})];
|
|
@@ -19707,6 +19784,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
19707
19784
|
selectors?: string[];
|
|
19708
19785
|
comments?: string[];
|
|
19709
19786
|
}];
|
|
19787
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
19788
|
+
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
19710
19789
|
// ----- unicorn/logical-assignment-operators -----
|
|
19711
19790
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
19712
19791
|
enforceForIfStatements?: boolean;
|
|
@@ -19727,7 +19806,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
19727
19806
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
19728
19807
|
extendDefaultAllowList?: boolean;
|
|
19729
19808
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
19730
|
-
ignore?:
|
|
19809
|
+
ignore?: (string | {
|
|
19810
|
+
[k: string]: unknown | undefined;
|
|
19811
|
+
})[];
|
|
19731
19812
|
}];
|
|
19732
19813
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
19733
19814
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -19775,7 +19856,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
19775
19856
|
}];
|
|
19776
19857
|
// ----- unicorn/no-keyword-prefix -----
|
|
19777
19858
|
type UnicornNoKeywordPrefix = [] | [{
|
|
19778
|
-
disallowedPrefixes?: []
|
|
19859
|
+
disallowedPrefixes?: string[];
|
|
19779
19860
|
checkProperties?: boolean;
|
|
19780
19861
|
onlyCamelCase?: boolean;
|
|
19781
19862
|
}];
|
|
@@ -19786,7 +19867,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
19786
19867
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
19787
19868
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
19788
19869
|
verbs?: string[];
|
|
19789
|
-
ignore?:
|
|
19870
|
+
ignore?: (string | {
|
|
19871
|
+
[k: string]: unknown | undefined;
|
|
19872
|
+
})[];
|
|
19790
19873
|
}];
|
|
19791
19874
|
// ----- unicorn/no-null -----
|
|
19792
19875
|
type UnicornNoNull = [] | [{
|
|
@@ -19799,7 +19882,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
19799
19882
|
}];
|
|
19800
19883
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
19801
19884
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
19802
|
-
targets?: (string |
|
|
19885
|
+
targets?: (string | string[] | {
|
|
19803
19886
|
[k: string]: unknown | undefined;
|
|
19804
19887
|
});
|
|
19805
19888
|
}];
|
|
@@ -19853,11 +19936,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
19853
19936
|
}];
|
|
19854
19937
|
// ----- unicorn/prefer-array-flat -----
|
|
19855
19938
|
type UnicornPreferArrayFlat = [] | [{
|
|
19856
|
-
functions?:
|
|
19939
|
+
functions?: string[];
|
|
19857
19940
|
}];
|
|
19858
19941
|
// ----- unicorn/prefer-at -----
|
|
19859
19942
|
type UnicornPreferAt = [] | [{
|
|
19860
|
-
getLastElementFunctions?:
|
|
19943
|
+
getLastElementFunctions?: string[];
|
|
19861
19944
|
checkAllIndexAccess?: boolean;
|
|
19862
19945
|
}];
|
|
19863
19946
|
// ----- unicorn/prefer-continue -----
|
|
@@ -19881,6 +19964,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
19881
19964
|
type UnicornPreferExportFrom = [] | [{
|
|
19882
19965
|
checkUsedVariables?: boolean;
|
|
19883
19966
|
}];
|
|
19967
|
+
// ----- unicorn/prefer-https -----
|
|
19968
|
+
type UnicornPreferHttps = [] | [{
|
|
19969
|
+
ignore?: (string | {
|
|
19970
|
+
[k: string]: unknown | undefined;
|
|
19971
|
+
})[];
|
|
19972
|
+
}];
|
|
19884
19973
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
19885
19974
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
19886
19975
|
minimumComparisons?: number;
|
|
@@ -19897,7 +19986,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
19897
19986
|
}];
|
|
19898
19987
|
// ----- unicorn/prefer-object-from-entries -----
|
|
19899
19988
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
19900
|
-
functions?:
|
|
19989
|
+
functions?: string[];
|
|
19901
19990
|
}];
|
|
19902
19991
|
// ----- unicorn/prefer-query-selector -----
|
|
19903
19992
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -19916,7 +20005,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
19916
20005
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
19917
20006
|
// ----- unicorn/prefer-single-call -----
|
|
19918
20007
|
type UnicornPreferSingleCall = [] | [{
|
|
19919
|
-
ignore?:
|
|
20008
|
+
ignore?: string[];
|
|
19920
20009
|
}];
|
|
19921
20010
|
// ----- unicorn/prefer-string-repeat -----
|
|
19922
20011
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -19924,7 +20013,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
19924
20013
|
}];
|
|
19925
20014
|
// ----- unicorn/prefer-structured-clone -----
|
|
19926
20015
|
type UnicornPreferStructuredClone = [] | [{
|
|
19927
|
-
functions?:
|
|
20016
|
+
functions?: string[];
|
|
19928
20017
|
}];
|
|
19929
20018
|
// ----- unicorn/prefer-switch -----
|
|
19930
20019
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -19949,6 +20038,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
19949
20038
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
19950
20039
|
fields?: string[];
|
|
19951
20040
|
}];
|
|
20041
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
20042
|
+
type UnicornSingleLineBlockCommentStyle = [] | [("multiline" | "single-line")] | [("multiline" | "single-line"), {
|
|
20043
|
+
ignore?: (string | {
|
|
20044
|
+
[k: string]: unknown | undefined;
|
|
20045
|
+
})[];
|
|
20046
|
+
}];
|
|
19952
20047
|
// ----- unicorn/string-content -----
|
|
19953
20048
|
type UnicornStringContent = [] | [{
|
|
19954
20049
|
patterns?: {
|
|
@@ -21522,15 +21617,19 @@ type YamlSortKeys = ([{
|
|
|
21522
21617
|
hasProperties?: string[];
|
|
21523
21618
|
order: ((string | {
|
|
21524
21619
|
keyPattern?: string;
|
|
21525
|
-
order?: {
|
|
21620
|
+
order?: ({
|
|
21526
21621
|
type?: ("asc" | "desc");
|
|
21527
21622
|
caseSensitive?: boolean;
|
|
21528
21623
|
natural?: boolean;
|
|
21529
|
-
}
|
|
21624
|
+
} | {
|
|
21625
|
+
type: "ignore";
|
|
21626
|
+
});
|
|
21530
21627
|
})[] | {
|
|
21531
21628
|
type?: ("asc" | "desc");
|
|
21532
21629
|
caseSensitive?: boolean;
|
|
21533
21630
|
natural?: boolean;
|
|
21631
|
+
} | {
|
|
21632
|
+
type: "ignore";
|
|
21534
21633
|
});
|
|
21535
21634
|
minKeys?: number;
|
|
21536
21635
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21539,15 +21638,19 @@ type YamlSortKeys = ([{
|
|
|
21539
21638
|
hasProperties?: string[];
|
|
21540
21639
|
order: ((string | {
|
|
21541
21640
|
keyPattern?: string;
|
|
21542
|
-
order?: {
|
|
21641
|
+
order?: ({
|
|
21543
21642
|
type?: ("asc" | "desc");
|
|
21544
21643
|
caseSensitive?: boolean;
|
|
21545
21644
|
natural?: boolean;
|
|
21546
|
-
}
|
|
21645
|
+
} | {
|
|
21646
|
+
type: "ignore";
|
|
21647
|
+
});
|
|
21547
21648
|
})[] | {
|
|
21548
21649
|
type?: ("asc" | "desc");
|
|
21549
21650
|
caseSensitive?: boolean;
|
|
21550
21651
|
natural?: boolean;
|
|
21652
|
+
} | {
|
|
21653
|
+
type: "ignore";
|
|
21551
21654
|
});
|
|
21552
21655
|
minKeys?: number;
|
|
21553
21656
|
allowLineSeparatedGroups?: boolean;
|