@ntnyq/eslint-config 7.0.0-beta.1 → 7.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +414 -174
- package/dist/index.mjs +22 -7
- package/package.json +32 -29
package/dist/index.d.mts
CHANGED
|
@@ -515,6 +515,10 @@ declare const configImportX: (options?: ConfigImportXOptions) => TypedConfigItem
|
|
|
515
515
|
* Built-in presets of `eslint-plugin-unicorn`
|
|
516
516
|
*/
|
|
517
517
|
declare const PLUGIN_UNICORN_PRESET: readonly ['all', 'recommended', 'unopinionated'];
|
|
518
|
+
/**
|
|
519
|
+
* Type of built-in presets of `eslint-plugin-unicorn`
|
|
520
|
+
*/
|
|
521
|
+
type UnicornPreset = (typeof PLUGIN_UNICORN_PRESET)[number];
|
|
518
522
|
/**
|
|
519
523
|
* Options type of {@link configUnicorn}
|
|
520
524
|
*/
|
|
@@ -522,7 +526,7 @@ type ConfigUnicornOptions = OptionsOverrides & {
|
|
|
522
526
|
/**
|
|
523
527
|
* Use a built-in preset
|
|
524
528
|
*/
|
|
525
|
-
preset?:
|
|
529
|
+
preset?: UnicornPreset;
|
|
526
530
|
};
|
|
527
531
|
/**
|
|
528
532
|
* Config for powerful rules
|
|
@@ -2609,6 +2613,11 @@ interface RuleOptions {
|
|
|
2609
2613
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-test-case-name.md
|
|
2610
2614
|
*/
|
|
2611
2615
|
'eslint-plugin/require-test-case-name'?: Linter.RuleEntry<EslintPluginRequireTestCaseName>;
|
|
2616
|
+
/**
|
|
2617
|
+
* requires the position of errors to be explicitly stated for all expected errors
|
|
2618
|
+
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-test-error-positions.md
|
|
2619
|
+
*/
|
|
2620
|
+
'eslint-plugin/require-test-error-positions'?: Linter.RuleEntry<[]>;
|
|
2612
2621
|
/**
|
|
2613
2622
|
* require the properties of a test case to be placed in a consistent order
|
|
2614
2623
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/test-case-property-ordering.md
|
|
@@ -5983,6 +5992,11 @@ interface RuleOptions {
|
|
|
5983
5992
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/
|
|
5984
5993
|
*/
|
|
5985
5994
|
'svelte/no-navigation-without-resolve'?: Linter.RuleEntry<SvelteNoNavigationWithoutResolve>;
|
|
5995
|
+
/**
|
|
5996
|
+
* disallow `<style>` elements nested inside other elements or blocks
|
|
5997
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-nested-style-tag/
|
|
5998
|
+
*/
|
|
5999
|
+
'svelte/no-nested-style-tag'?: Linter.RuleEntry<[]>;
|
|
5986
6000
|
/**
|
|
5987
6001
|
* disallow use of not function in event handler
|
|
5988
6002
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
|
|
@@ -6098,6 +6112,11 @@ interface RuleOptions {
|
|
|
6098
6112
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
|
|
6099
6113
|
*/
|
|
6100
6114
|
'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>;
|
|
6115
|
+
/**
|
|
6116
|
+
* disallow unnecessary `$derived.by()` when `$derived()` is sufficient
|
|
6117
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-derived-over-derived-by/
|
|
6118
|
+
*/
|
|
6119
|
+
'svelte/prefer-derived-over-derived-by'?: Linter.RuleEntry<[]>;
|
|
6101
6120
|
/**
|
|
6102
6121
|
* destructure values from object stores for better change tracking & fewer redraws
|
|
6103
6122
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
|
|
@@ -6353,753 +6372,921 @@ interface RuleOptions {
|
|
|
6353
6372
|
*/
|
|
6354
6373
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6355
6374
|
/**
|
|
6356
|
-
*
|
|
6357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6375
|
+
* Prefer better DOM traversal APIs.
|
|
6376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/better-dom-traversing.md
|
|
6377
|
+
*/
|
|
6378
|
+
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6379
|
+
/**
|
|
6380
|
+
* Removed. Prefer `eslint-plugin-regexp`
|
|
6381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6382
|
+
* @deprecated
|
|
6358
6383
|
*/
|
|
6359
|
-
'unicorn/better-regex'?: Linter.RuleEntry<
|
|
6384
|
+
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6360
6385
|
/**
|
|
6361
6386
|
* Enforce a specific parameter name in catch clauses.
|
|
6362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/catch-error-name.md
|
|
6363
6388
|
*/
|
|
6364
6389
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6365
6390
|
/**
|
|
6366
6391
|
* Enforce consistent assertion style with `node:assert`.
|
|
6367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-assert.md
|
|
6368
6393
|
*/
|
|
6369
6394
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6395
|
+
/**
|
|
6396
|
+
* Enforce consistent spelling of compound words in identifiers.
|
|
6397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-compound-words.md
|
|
6398
|
+
*/
|
|
6399
|
+
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6370
6400
|
/**
|
|
6371
6401
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-date-clone.md
|
|
6373
6403
|
*/
|
|
6374
6404
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6375
6405
|
/**
|
|
6376
6406
|
* Use destructured variables over properties.
|
|
6377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-destructuring.md
|
|
6378
6408
|
*/
|
|
6379
6409
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6380
6410
|
/**
|
|
6381
6411
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-empty-array-spread.md
|
|
6383
6413
|
*/
|
|
6384
6414
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6385
6415
|
/**
|
|
6386
6416
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-existence-index-check.md
|
|
6388
6418
|
*/
|
|
6389
6419
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6390
6420
|
/**
|
|
6391
6421
|
* Move function definitions to the highest possible scope.
|
|
6392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-function-scoping.md
|
|
6393
6423
|
*/
|
|
6394
6424
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6425
|
+
/**
|
|
6426
|
+
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-json-file-read.md
|
|
6428
|
+
*/
|
|
6429
|
+
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6395
6430
|
/**
|
|
6396
6431
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-template-literal-escape.md
|
|
6398
6433
|
*/
|
|
6399
6434
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6400
6435
|
/**
|
|
6401
6436
|
* Enforce correct `Error` subclassing.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/custom-error-definition.md
|
|
6403
6438
|
*/
|
|
6404
6439
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6440
|
+
/**
|
|
6441
|
+
* Enforce consistent style for DOM element dataset access.
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/dom-node-dataset.md
|
|
6443
|
+
*/
|
|
6444
|
+
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6405
6445
|
/**
|
|
6406
6446
|
* Enforce no spaces between braces.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/empty-brace-spaces.md
|
|
6408
6448
|
*/
|
|
6409
6449
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6410
6450
|
/**
|
|
6411
6451
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/error-message.md
|
|
6413
6453
|
*/
|
|
6414
6454
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6415
6455
|
/**
|
|
6416
6456
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/escape-case.md
|
|
6418
6458
|
*/
|
|
6419
6459
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6420
6460
|
/**
|
|
6421
6461
|
* Add expiration conditions to TODO comments.
|
|
6422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/expiring-todo-comments.md
|
|
6423
6463
|
*/
|
|
6424
6464
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6425
6465
|
/**
|
|
6426
6466
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/explicit-length-check.md
|
|
6428
6468
|
*/
|
|
6429
6469
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6430
6470
|
/**
|
|
6431
|
-
* Enforce a case style for filenames.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6471
|
+
* Enforce a case style for filenames and directory names.
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/filename-case.md
|
|
6433
6473
|
*/
|
|
6434
6474
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6435
6475
|
/**
|
|
6436
6476
|
* Enforce specific import styles per module.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/import-style.md
|
|
6438
6478
|
*/
|
|
6439
6479
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6440
6480
|
/**
|
|
6441
6481
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/isolated-functions.md
|
|
6443
6483
|
*/
|
|
6444
6484
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6445
6485
|
/**
|
|
6446
6486
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/new-for-builtins.md
|
|
6448
6488
|
*/
|
|
6449
6489
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6450
6490
|
/**
|
|
6451
6491
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-abusive-eslint-disable.md
|
|
6453
6493
|
*/
|
|
6454
6494
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6455
6495
|
/**
|
|
6456
6496
|
* Disallow recursive access to `this` within getters and setters.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-accessor-recursion.md
|
|
6458
6498
|
*/
|
|
6459
6499
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6460
6500
|
/**
|
|
6461
6501
|
* Disallow anonymous functions and classes as the default export.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-anonymous-default-export.md
|
|
6463
6503
|
*/
|
|
6464
6504
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6465
6505
|
/**
|
|
6466
6506
|
* Prevent passing a function reference directly to iterator methods.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-callback-reference.md
|
|
6468
6508
|
*/
|
|
6469
|
-
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<
|
|
6509
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6510
|
+
/**
|
|
6511
|
+
* Disallow using reference values as `Array#fill()` values.
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-fill-with-reference-type.md
|
|
6513
|
+
*/
|
|
6514
|
+
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6470
6515
|
/**
|
|
6471
6516
|
* Prefer `for…of` over the `forEach` method.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-for-each.md
|
|
6473
6518
|
*/
|
|
6474
6519
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6520
|
+
/**
|
|
6521
|
+
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-from-fill.md
|
|
6523
|
+
*/
|
|
6524
|
+
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6475
6525
|
/**
|
|
6476
6526
|
* Disallow using the `this` argument in array methods.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-method-this-argument.md
|
|
6478
6528
|
*/
|
|
6479
6529
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6480
6530
|
/**
|
|
6481
6531
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6483
6533
|
* @deprecated
|
|
6484
6534
|
*/
|
|
6485
6535
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6486
6536
|
/**
|
|
6487
6537
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-reduce.md
|
|
6489
6539
|
*/
|
|
6490
6540
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6491
6541
|
/**
|
|
6492
6542
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-reverse.md
|
|
6494
6544
|
*/
|
|
6495
6545
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6496
6546
|
/**
|
|
6497
6547
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-sort.md
|
|
6499
6549
|
*/
|
|
6500
6550
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6501
6551
|
/**
|
|
6502
6552
|
* Disallow member access from await expression.
|
|
6503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-await-expression-member.md
|
|
6504
6554
|
*/
|
|
6505
6555
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6506
6556
|
/**
|
|
6507
6557
|
* Disallow using `await` in `Promise` method parameters.
|
|
6508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-await-in-promise-methods.md
|
|
6509
6559
|
*/
|
|
6510
6560
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6561
|
+
/**
|
|
6562
|
+
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-blob-to-file.md
|
|
6564
|
+
*/
|
|
6565
|
+
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6566
|
+
/**
|
|
6567
|
+
* Prefer drawing canvases directly instead of converting them to images.
|
|
6568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-canvas-to-image.md
|
|
6569
|
+
*/
|
|
6570
|
+
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6571
|
+
/**
|
|
6572
|
+
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-confusing-array-splice.md
|
|
6574
|
+
*/
|
|
6575
|
+
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6511
6576
|
/**
|
|
6512
6577
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-console-spaces.md
|
|
6514
6579
|
*/
|
|
6515
6580
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6516
6581
|
/**
|
|
6517
6582
|
* Do not use `document.cookie` directly.
|
|
6518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-document-cookie.md
|
|
6519
6584
|
*/
|
|
6520
6585
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6586
|
+
/**
|
|
6587
|
+
* Disallow duplicate values in `Set` constructor array literals.
|
|
6588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-duplicate-set-values.md
|
|
6589
|
+
*/
|
|
6590
|
+
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6521
6591
|
/**
|
|
6522
6592
|
* Disallow empty files.
|
|
6523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-empty-file.md
|
|
6594
|
+
*/
|
|
6595
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6596
|
+
/**
|
|
6597
|
+
* Disallow exports in scripts.
|
|
6598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-exports-in-scripts.md
|
|
6524
6599
|
*/
|
|
6525
|
-
'unicorn/no-
|
|
6600
|
+
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6526
6601
|
/**
|
|
6527
6602
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-for-loop.md
|
|
6529
6604
|
*/
|
|
6530
6605
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6531
6606
|
/**
|
|
6532
6607
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-hex-escape.md
|
|
6534
6609
|
*/
|
|
6535
6610
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6536
6611
|
/**
|
|
6537
6612
|
* Disallow immediate mutation after variable assignment.
|
|
6538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-immediate-mutation.md
|
|
6539
6614
|
*/
|
|
6540
6615
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6616
|
+
/**
|
|
6617
|
+
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-incorrect-query-selector.md
|
|
6619
|
+
*/
|
|
6620
|
+
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6541
6621
|
/**
|
|
6542
6622
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6544
6624
|
* @deprecated
|
|
6545
6625
|
*/
|
|
6546
6626
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6547
6627
|
/**
|
|
6548
6628
|
* Disallow `instanceof` with built-in objects
|
|
6549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-instanceof-builtins.md
|
|
6550
6630
|
*/
|
|
6551
6631
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6552
6632
|
/**
|
|
6553
6633
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-fetch-options.md
|
|
6555
6635
|
*/
|
|
6556
6636
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6637
|
+
/**
|
|
6638
|
+
* Disallow invalid `accept` values on file inputs.
|
|
6639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-file-input-accept.md
|
|
6640
|
+
*/
|
|
6641
|
+
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6557
6642
|
/**
|
|
6558
6643
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-remove-event-listener.md
|
|
6560
6645
|
*/
|
|
6561
6646
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6562
6647
|
/**
|
|
6563
6648
|
* Disallow identifiers starting with `new` or `class`.
|
|
6564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-keyword-prefix.md
|
|
6565
6650
|
*/
|
|
6566
6651
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6652
|
+
/**
|
|
6653
|
+
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-late-current-target-access.md
|
|
6655
|
+
*/
|
|
6656
|
+
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6567
6657
|
/**
|
|
6568
6658
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6570
6660
|
* @deprecated
|
|
6571
6661
|
*/
|
|
6572
6662
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6573
6663
|
/**
|
|
6574
6664
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-lonely-if.md
|
|
6576
6666
|
*/
|
|
6577
6667
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6578
6668
|
/**
|
|
6579
6669
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-magic-array-flat-depth.md
|
|
6581
6671
|
*/
|
|
6582
6672
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6673
|
+
/**
|
|
6674
|
+
* Disallow manually wrapped comments.
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-manually-wrapped-comments.md
|
|
6676
|
+
*/
|
|
6677
|
+
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6583
6678
|
/**
|
|
6584
6679
|
* Disallow named usage of default import and export.
|
|
6585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-named-default.md
|
|
6586
6681
|
*/
|
|
6587
6682
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6588
6683
|
/**
|
|
6589
6684
|
* Disallow negated conditions.
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-negated-condition.md
|
|
6591
6686
|
*/
|
|
6592
6687
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6593
6688
|
/**
|
|
6594
6689
|
* Disallow negated expression in equality check.
|
|
6595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-negation-in-equality-check.md
|
|
6596
6691
|
*/
|
|
6597
6692
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6598
6693
|
/**
|
|
6599
6694
|
* Disallow nested ternary expressions.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-nested-ternary.md
|
|
6601
6696
|
*/
|
|
6602
6697
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6603
6698
|
/**
|
|
6604
6699
|
* Disallow `new Array()`.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-new-array.md
|
|
6606
6701
|
*/
|
|
6607
6702
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6608
6703
|
/**
|
|
6609
6704
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-new-buffer.md
|
|
6611
6706
|
*/
|
|
6612
6707
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6613
6708
|
/**
|
|
6614
6709
|
* Disallow the use of the `null` literal.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-null.md
|
|
6616
6711
|
*/
|
|
6617
6712
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6618
6713
|
/**
|
|
6619
6714
|
* Disallow the use of objects as default parameters.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-object-as-default-parameter.md
|
|
6621
6716
|
*/
|
|
6622
6717
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6623
6718
|
/**
|
|
6624
6719
|
* Disallow `process.exit()`.
|
|
6625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-process-exit.md
|
|
6626
6721
|
*/
|
|
6627
6722
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6628
6723
|
/**
|
|
6629
6724
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-single-promise-in-promise-methods.md
|
|
6631
6726
|
*/
|
|
6632
6727
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6633
6728
|
/**
|
|
6634
6729
|
* Disallow classes that only have static members.
|
|
6635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-static-only-class.md
|
|
6636
6731
|
*/
|
|
6637
6732
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6638
6733
|
/**
|
|
6639
6734
|
* Disallow `then` property.
|
|
6640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-thenable.md
|
|
6641
6736
|
*/
|
|
6642
6737
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6643
6738
|
/**
|
|
6644
6739
|
* Disallow assigning `this` to a variable.
|
|
6645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-this-assignment.md
|
|
6646
6741
|
*/
|
|
6647
6742
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6743
|
+
/**
|
|
6744
|
+
* Disallow `this` outside of classes.
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-this-outside-of-class.md
|
|
6746
|
+
*/
|
|
6747
|
+
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6648
6748
|
/**
|
|
6649
6749
|
* Disallow comparing `undefined` using `typeof`.
|
|
6650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-typeof-undefined.md
|
|
6651
6751
|
*/
|
|
6652
6752
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6653
6753
|
/**
|
|
6654
6754
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6656
6756
|
*/
|
|
6657
6757
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6658
6758
|
/**
|
|
6659
6759
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-array-splice-count.md
|
|
6661
6761
|
*/
|
|
6662
6762
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6663
6763
|
/**
|
|
6664
6764
|
* Disallow awaiting non-promise values.
|
|
6665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-await.md
|
|
6666
6766
|
*/
|
|
6667
6767
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6768
|
+
/**
|
|
6769
|
+
* Disallow unnecessary nested ternary expressions.
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-nested-ternary.md
|
|
6771
|
+
*/
|
|
6772
|
+
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6668
6773
|
/**
|
|
6669
6774
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-polyfills.md
|
|
6671
6776
|
*/
|
|
6672
6777
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6673
6778
|
/**
|
|
6674
6779
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-slice-end.md
|
|
6676
6781
|
*/
|
|
6677
6782
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6678
6783
|
/**
|
|
6679
6784
|
* Disallow unreadable array destructuring.
|
|
6680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unreadable-array-destructuring.md
|
|
6681
6786
|
*/
|
|
6682
6787
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6683
6788
|
/**
|
|
6684
6789
|
* Disallow unreadable IIFEs.
|
|
6685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unreadable-iife.md
|
|
6686
6791
|
*/
|
|
6687
6792
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6793
|
+
/**
|
|
6794
|
+
* Disallow ignoring the return value of selected array methods.
|
|
6795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unused-array-method-return.md
|
|
6796
|
+
*/
|
|
6797
|
+
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6688
6798
|
/**
|
|
6689
6799
|
* Disallow unused object properties.
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unused-properties.md
|
|
6691
6801
|
*/
|
|
6692
6802
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6693
6803
|
/**
|
|
6694
6804
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-collection-argument.md
|
|
6696
6806
|
*/
|
|
6697
6807
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6698
6808
|
/**
|
|
6699
6809
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6701
6811
|
*/
|
|
6702
6812
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6703
6813
|
/**
|
|
6704
6814
|
* Disallow useless fallback when spreading in object literals.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-fallback-in-spread.md
|
|
6706
6816
|
*/
|
|
6707
6817
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6708
6818
|
/**
|
|
6709
6819
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-iterator-to-array.md
|
|
6711
6821
|
*/
|
|
6712
6822
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
6713
6823
|
/**
|
|
6714
6824
|
* Disallow useless array length check.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-length-check.md
|
|
6716
6826
|
*/
|
|
6717
6827
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6718
6828
|
/**
|
|
6719
6829
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-promise-resolve-reject.md
|
|
6721
6831
|
*/
|
|
6722
6832
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6723
6833
|
/**
|
|
6724
6834
|
* Disallow unnecessary spread.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-spread.md
|
|
6726
6836
|
*/
|
|
6727
6837
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6728
6838
|
/**
|
|
6729
6839
|
* Disallow useless case in switch statements.
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-switch-case.md
|
|
6731
6841
|
*/
|
|
6732
6842
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6733
6843
|
/**
|
|
6734
6844
|
* Disallow useless `undefined`.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-undefined.md
|
|
6736
6846
|
*/
|
|
6737
6847
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6738
6848
|
/**
|
|
6739
6849
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-zero-fractions.md
|
|
6741
6851
|
*/
|
|
6742
6852
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6743
6853
|
/**
|
|
6744
6854
|
* Enforce proper case for numeric literals.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/number-literal-case.md
|
|
6746
6856
|
*/
|
|
6747
6857
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6748
6858
|
/**
|
|
6749
6859
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/numeric-separators-style.md
|
|
6751
6861
|
*/
|
|
6752
6862
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6753
6863
|
/**
|
|
6754
6864
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-add-event-listener.md
|
|
6756
6866
|
*/
|
|
6757
6867
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6758
6868
|
/**
|
|
6759
6869
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-find.md
|
|
6761
6871
|
*/
|
|
6762
6872
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6763
6873
|
/**
|
|
6764
6874
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-flat.md
|
|
6766
6876
|
*/
|
|
6767
6877
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6768
6878
|
/**
|
|
6769
6879
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-flat-map.md
|
|
6771
6881
|
*/
|
|
6772
6882
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6773
6883
|
/**
|
|
6774
6884
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-index-of.md
|
|
6776
6886
|
*/
|
|
6777
6887
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6888
|
+
/**
|
|
6889
|
+
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
6890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-last-methods.md
|
|
6891
|
+
*/
|
|
6892
|
+
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
6778
6893
|
/**
|
|
6779
6894
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-some.md
|
|
6781
6896
|
*/
|
|
6782
6897
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6783
6898
|
/**
|
|
6784
6899
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-at.md
|
|
6786
6901
|
*/
|
|
6787
6902
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6788
6903
|
/**
|
|
6789
6904
|
* Prefer `BigInt` literals over the constructor.
|
|
6790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-bigint-literals.md
|
|
6791
6906
|
*/
|
|
6792
6907
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6793
6908
|
/**
|
|
6794
6909
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-blob-reading-methods.md
|
|
6796
6911
|
*/
|
|
6797
6912
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6798
6913
|
/**
|
|
6799
6914
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-class-fields.md
|
|
6801
6916
|
*/
|
|
6802
6917
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6803
6918
|
/**
|
|
6804
6919
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-classlist-toggle.md
|
|
6806
6921
|
*/
|
|
6807
6922
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6808
6923
|
/**
|
|
6809
6924
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-code-point.md
|
|
6811
6926
|
*/
|
|
6812
6927
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6813
6928
|
/**
|
|
6814
6929
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-date-now.md
|
|
6816
6931
|
*/
|
|
6817
6932
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6818
6933
|
/**
|
|
6819
6934
|
* Prefer default parameters over reassignment.
|
|
6820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-default-parameters.md
|
|
6821
6936
|
*/
|
|
6822
6937
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6823
6938
|
/**
|
|
6824
|
-
* Prefer `
|
|
6825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6939
|
+
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
6940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-append.md
|
|
6826
6941
|
*/
|
|
6827
6942
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6828
6943
|
/**
|
|
6829
|
-
*
|
|
6830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6944
|
+
* Renamed to `unicorn/dom-node-dataset`.
|
|
6945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
6946
|
+
* @deprecated
|
|
6831
6947
|
*/
|
|
6832
6948
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6833
6949
|
/**
|
|
6834
6950
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-remove.md
|
|
6836
6952
|
*/
|
|
6837
6953
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6838
6954
|
/**
|
|
6839
6955
|
* Prefer `.textContent` over `.innerText`.
|
|
6840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-text-content.md
|
|
6841
6957
|
*/
|
|
6842
6958
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6843
6959
|
/**
|
|
6844
6960
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-event-target.md
|
|
6846
6962
|
*/
|
|
6847
6963
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6848
6964
|
/**
|
|
6849
6965
|
* Prefer `export…from` when re-exporting.
|
|
6850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-export-from.md
|
|
6851
6967
|
*/
|
|
6852
6968
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6969
|
+
/**
|
|
6970
|
+
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
6971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-get-or-insert-computed.md
|
|
6972
|
+
*/
|
|
6973
|
+
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
6853
6974
|
/**
|
|
6854
6975
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-global-this.md
|
|
6856
6977
|
*/
|
|
6857
6978
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6979
|
+
/**
|
|
6980
|
+
* Prefer HTTPS over HTTP.
|
|
6981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-https.md
|
|
6982
|
+
*/
|
|
6983
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
6858
6984
|
/**
|
|
6859
6985
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-import-meta-properties.md
|
|
6861
6987
|
*/
|
|
6862
6988
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6863
6989
|
/**
|
|
6864
6990
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-includes.md
|
|
6866
6992
|
*/
|
|
6867
6993
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6868
6994
|
/**
|
|
6869
|
-
* Prefer
|
|
6870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6995
|
+
* Prefer `.includes()` over repeated equality comparisons.
|
|
6996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
6997
|
+
*/
|
|
6998
|
+
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
6999
|
+
/**
|
|
7000
|
+
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-iterator-concat.md
|
|
7002
|
+
*/
|
|
7003
|
+
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7004
|
+
/**
|
|
7005
|
+
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7007
|
+
*/
|
|
7008
|
+
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7009
|
+
/**
|
|
7010
|
+
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7012
|
+
* @deprecated
|
|
6871
7013
|
*/
|
|
6872
7014
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6873
7015
|
/**
|
|
6874
|
-
* Prefer `KeyboardEvent#key` over
|
|
6875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7016
|
+
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-keyboard-event-key.md
|
|
6876
7018
|
*/
|
|
6877
7019
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6878
7020
|
/**
|
|
6879
7021
|
* Prefer using a logical operator over a ternary.
|
|
6880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6881
7023
|
*/
|
|
6882
7024
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7025
|
+
/**
|
|
7026
|
+
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-abs.md
|
|
7028
|
+
*/
|
|
7029
|
+
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
6883
7030
|
/**
|
|
6884
7031
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-min-max.md
|
|
6886
7033
|
*/
|
|
6887
7034
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6888
7035
|
/**
|
|
6889
7036
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-trunc.md
|
|
6891
7038
|
*/
|
|
6892
7039
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6893
7040
|
/**
|
|
6894
7041
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-modern-dom-apis.md
|
|
6896
7043
|
*/
|
|
6897
7044
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6898
7045
|
/**
|
|
6899
7046
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-modern-math-apis.md
|
|
6901
7048
|
*/
|
|
6902
7049
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6903
7050
|
/**
|
|
6904
7051
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-module.md
|
|
6906
7053
|
*/
|
|
6907
7054
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6908
7055
|
/**
|
|
6909
7056
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-native-coercion-functions.md
|
|
6911
7058
|
*/
|
|
6912
7059
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6913
7060
|
/**
|
|
6914
7061
|
* Prefer negative index over `.length - index` when possible.
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-negative-index.md
|
|
6916
7063
|
*/
|
|
6917
7064
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6918
7065
|
/**
|
|
6919
7066
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-node-protocol.md
|
|
6921
7068
|
*/
|
|
6922
7069
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6923
7070
|
/**
|
|
6924
7071
|
* Prefer `Number` static properties over global ones.
|
|
6925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-number-properties.md
|
|
6926
7073
|
*/
|
|
6927
7074
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6928
7075
|
/**
|
|
6929
7076
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-object-from-entries.md
|
|
6931
7078
|
*/
|
|
6932
7079
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6933
7080
|
/**
|
|
6934
7081
|
* Prefer omitting the `catch` binding parameter.
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-optional-catch-binding.md
|
|
6936
7083
|
*/
|
|
6937
7084
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6938
7085
|
/**
|
|
6939
7086
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-prototype-methods.md
|
|
6941
7088
|
*/
|
|
6942
7089
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6943
7090
|
/**
|
|
6944
|
-
* Prefer `.querySelector()`
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7091
|
+
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-query-selector.md
|
|
6946
7093
|
*/
|
|
6947
|
-
'unicorn/prefer-query-selector'?: Linter.RuleEntry<
|
|
7094
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7095
|
+
/**
|
|
7096
|
+
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-queue-microtask.md
|
|
7098
|
+
*/
|
|
7099
|
+
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
6948
7100
|
/**
|
|
6949
7101
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-reflect-apply.md
|
|
6951
7103
|
*/
|
|
6952
7104
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6953
7105
|
/**
|
|
6954
7106
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-regexp-test.md
|
|
6956
7108
|
*/
|
|
6957
7109
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6958
7110
|
/**
|
|
6959
7111
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-response-static-json.md
|
|
6961
7113
|
*/
|
|
6962
7114
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6963
7115
|
/**
|
|
6964
7116
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-set-has.md
|
|
6966
7118
|
*/
|
|
6967
|
-
'unicorn/prefer-set-has'?: Linter.RuleEntry<
|
|
7119
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
6968
7120
|
/**
|
|
6969
7121
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-set-size.md
|
|
6971
7123
|
*/
|
|
6972
7124
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6973
7125
|
/**
|
|
6974
7126
|
* Prefer simple conditions first in logical expressions.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-simple-condition-first.md
|
|
6976
7128
|
*/
|
|
6977
7129
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
6978
7130
|
/**
|
|
6979
|
-
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7131
|
+
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-single-call.md
|
|
6981
7133
|
*/
|
|
6982
7134
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7135
|
+
/**
|
|
7136
|
+
* Prefer `String#split()` with a limit.
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-split-limit.md
|
|
7138
|
+
*/
|
|
7139
|
+
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
6983
7140
|
/**
|
|
6984
7141
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-spread.md
|
|
6986
7143
|
*/
|
|
6987
7144
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7145
|
+
/**
|
|
7146
|
+
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-match-all.md
|
|
7148
|
+
*/
|
|
7149
|
+
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7150
|
+
/**
|
|
7151
|
+
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-pad-start-end.md
|
|
7153
|
+
*/
|
|
7154
|
+
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
6988
7155
|
/**
|
|
6989
7156
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-raw.md
|
|
6991
7158
|
*/
|
|
6992
7159
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6993
7160
|
/**
|
|
6994
|
-
* Prefer `String#
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7161
|
+
* Prefer `String#repeat()` for repeated whitespace.
|
|
7162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-repeat.md
|
|
7163
|
+
*/
|
|
7164
|
+
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7165
|
+
/**
|
|
7166
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-replace-all.md
|
|
6996
7168
|
*/
|
|
6997
7169
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6998
7170
|
/**
|
|
6999
7171
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-slice.md
|
|
7001
7173
|
*/
|
|
7002
7174
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7003
7175
|
/**
|
|
7004
7176
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-starts-ends-with.md
|
|
7006
7178
|
*/
|
|
7007
7179
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7008
7180
|
/**
|
|
7009
7181
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-trim-start-end.md
|
|
7011
7183
|
*/
|
|
7012
7184
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7013
7185
|
/**
|
|
7014
7186
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-structured-clone.md
|
|
7016
7188
|
*/
|
|
7017
7189
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7018
7190
|
/**
|
|
7019
7191
|
* Prefer `switch` over multiple `else-if`.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-switch.md
|
|
7021
7193
|
*/
|
|
7022
7194
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7023
7195
|
/**
|
|
7024
7196
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-ternary.md
|
|
7026
7198
|
*/
|
|
7027
7199
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7028
7200
|
/**
|
|
7029
7201
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-top-level-await.md
|
|
7031
7203
|
*/
|
|
7032
7204
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7033
7205
|
/**
|
|
7034
7206
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-type-error.md
|
|
7036
7208
|
*/
|
|
7037
7209
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7038
7210
|
/**
|
|
7039
7211
|
* Prevent abbreviations.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prevent-abbreviations.md
|
|
7041
7213
|
*/
|
|
7042
7214
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7043
7215
|
/**
|
|
7044
7216
|
* Enforce consistent relative URL style.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/relative-url-style.md
|
|
7046
7218
|
*/
|
|
7047
7219
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7048
7220
|
/**
|
|
7049
7221
|
* Enforce using the separator argument with `Array#join()`.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-array-join-separator.md
|
|
7051
7223
|
*/
|
|
7052
7224
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7225
|
+
/**
|
|
7226
|
+
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-css-escape.md
|
|
7228
|
+
*/
|
|
7229
|
+
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7053
7230
|
/**
|
|
7054
7231
|
* Require non-empty module attributes for imports and exports
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-module-attributes.md
|
|
7056
7233
|
*/
|
|
7057
7234
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7058
7235
|
/**
|
|
7059
7236
|
* Require non-empty specifier list in import and export statements.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-module-specifiers.md
|
|
7061
7238
|
*/
|
|
7062
7239
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7063
7240
|
/**
|
|
7064
7241
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7066
7243
|
*/
|
|
7067
7244
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7245
|
+
/**
|
|
7246
|
+
* Require passive event listeners for high-frequency events.
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-passive-events.md
|
|
7248
|
+
*/
|
|
7249
|
+
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7068
7250
|
/**
|
|
7069
7251
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-post-message-target-origin.md
|
|
7071
7253
|
*/
|
|
7072
7254
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7073
7255
|
/**
|
|
7074
7256
|
* Enforce better string content.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/string-content.md
|
|
7076
7258
|
*/
|
|
7077
7259
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7078
7260
|
/**
|
|
7079
7261
|
* Enforce consistent brace style for `case` clauses.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/switch-case-braces.md
|
|
7081
7263
|
*/
|
|
7082
7264
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7083
7265
|
/**
|
|
7084
7266
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/switch-case-break-position.md
|
|
7086
7268
|
*/
|
|
7087
7269
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7088
7270
|
/**
|
|
7089
7271
|
* Fix whitespace-insensitive template indentation.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/template-indent.md
|
|
7091
7273
|
*/
|
|
7092
7274
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7093
7275
|
/**
|
|
7094
7276
|
* Enforce consistent case for text encoding identifiers.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/text-encoding-identifier-case.md
|
|
7096
7278
|
*/
|
|
7097
7279
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7098
7280
|
/**
|
|
7099
7281
|
* Require `new` when creating an error.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/throw-new-error.md
|
|
7101
7283
|
*/
|
|
7102
7284
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7285
|
+
/**
|
|
7286
|
+
* Limit the complexity of `try` blocks.
|
|
7287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/try-complexity.md
|
|
7288
|
+
*/
|
|
7289
|
+
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7103
7290
|
/**
|
|
7104
7291
|
* Utilities in UnoCSS blocklist
|
|
7105
7292
|
* @see https://unocss.dev/integrations/eslint#rules
|
|
@@ -8989,6 +9176,7 @@ type EslintCommunityEslintCommentsRequireDescription = [] | [{
|
|
|
8989
9176
|
type HtmlEslintAttrsNewline = [] | [{
|
|
8990
9177
|
closeStyle?: ("newline" | "sameline");
|
|
8991
9178
|
ifAttrsMoreThan?: number;
|
|
9179
|
+
maxLen?: number;
|
|
8992
9180
|
skip?: string[];
|
|
8993
9181
|
inline?: string[];
|
|
8994
9182
|
}]; // ----- @html-eslint/element-newline -----
|
|
@@ -9084,6 +9272,7 @@ type HtmlEslintRequireOpenGraphProtocol = [] | [string[]]; // ----- @html-eslint
|
|
|
9084
9272
|
type HtmlEslintSortAttrs = [] | [{
|
|
9085
9273
|
priority?: (string | {
|
|
9086
9274
|
pattern: string;
|
|
9275
|
+
order?: ("preserve" | "alphabetically");
|
|
9087
9276
|
})[];
|
|
9088
9277
|
}]; // ----- @html-eslint/use-baseline -----
|
|
9089
9278
|
type HtmlEslintUseBaseline = [] | [{
|
|
@@ -16327,23 +16516,40 @@ type TomlSpacedComment = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
16327
16516
|
markers?: string[];
|
|
16328
16517
|
}]; // ----- toml/table-bracket-spacing -----
|
|
16329
16518
|
type TomlTableBracketSpacing = [] | [("always" | "never")]; // ----- unicode-bom -----
|
|
16330
|
-
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/
|
|
16331
|
-
type UnicornBetterRegex = [] | [{
|
|
16332
|
-
sortCharacterClasses?: boolean;
|
|
16333
|
-
}]; // ----- unicorn/catch-error-name -----
|
|
16519
|
+
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
|
|
16334
16520
|
type UnicornCatchErrorName = [] | [{
|
|
16335
16521
|
name?: string;
|
|
16336
16522
|
ignore?: unknown[];
|
|
16337
|
-
}]; // ----- unicorn/consistent-
|
|
16523
|
+
}]; // ----- unicorn/consistent-compound-words -----
|
|
16524
|
+
type UnicornConsistentCompoundWords = [] | [{
|
|
16525
|
+
checkProperties?: boolean;
|
|
16526
|
+
checkVariables?: boolean;
|
|
16527
|
+
checkDefaultAndNamespaceImports?: (boolean | "internal");
|
|
16528
|
+
checkShorthandImports?: (boolean | "internal");
|
|
16529
|
+
checkShorthandProperties?: boolean;
|
|
16530
|
+
extendDefaultReplacements?: boolean;
|
|
16531
|
+
replacements?: _UnicornConsistentCompoundWords_Replacements;
|
|
16532
|
+
allowList?: _UnicornConsistentCompoundWords_TrueObject;
|
|
16533
|
+
}];
|
|
16534
|
+
interface _UnicornConsistentCompoundWords_Replacements {
|
|
16535
|
+
[k: string]: (false | string) | undefined;
|
|
16536
|
+
}
|
|
16537
|
+
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
16538
|
+
[k: string]: true | undefined;
|
|
16539
|
+
} // ----- unicorn/consistent-function-scoping -----
|
|
16338
16540
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
16339
16541
|
checkArrowFunctions?: boolean;
|
|
16542
|
+
}]; // ----- unicorn/consistent-json-file-read -----
|
|
16543
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/dom-node-dataset -----
|
|
16544
|
+
type UnicornDomNodeDataset = [] | [{
|
|
16545
|
+
preferAttributes?: boolean;
|
|
16340
16546
|
}]; // ----- unicorn/escape-case -----
|
|
16341
16547
|
type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/expiring-todo-comments -----
|
|
16342
16548
|
type UnicornExpiringTodoComments = [] | [{
|
|
16343
16549
|
terms?: string[];
|
|
16344
16550
|
ignore?: unknown[];
|
|
16345
|
-
|
|
16346
|
-
|
|
16551
|
+
checkDates?: boolean;
|
|
16552
|
+
checkDatesOnPullRequests?: boolean;
|
|
16347
16553
|
allowWarningComments?: boolean;
|
|
16348
16554
|
date?: string;
|
|
16349
16555
|
}]; // ----- unicorn/explicit-length-check -----
|
|
@@ -16354,6 +16560,7 @@ type UnicornFilenameCase = [] | [({
|
|
|
16354
16560
|
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
16355
16561
|
ignore?: unknown[];
|
|
16356
16562
|
multipleFileExtensions?: boolean;
|
|
16563
|
+
checkDirectories?: boolean;
|
|
16357
16564
|
} | {
|
|
16358
16565
|
cases?: {
|
|
16359
16566
|
camelCase?: boolean;
|
|
@@ -16363,6 +16570,7 @@ type UnicornFilenameCase = [] | [({
|
|
|
16363
16570
|
};
|
|
16364
16571
|
ignore?: unknown[];
|
|
16365
16572
|
multipleFileExtensions?: boolean;
|
|
16573
|
+
checkDirectories?: boolean;
|
|
16366
16574
|
})]; // ----- unicorn/import-style -----
|
|
16367
16575
|
type UnicornImportStyle = [] | [{
|
|
16368
16576
|
checkImport?: boolean;
|
|
@@ -16386,6 +16594,9 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
16386
16594
|
functions?: string[];
|
|
16387
16595
|
selectors?: string[];
|
|
16388
16596
|
comments?: string[];
|
|
16597
|
+
}]; // ----- unicorn/no-array-callback-reference -----
|
|
16598
|
+
type UnicornNoArrayCallbackReference = [] | [{
|
|
16599
|
+
ignore?: string[];
|
|
16389
16600
|
}]; // ----- unicorn/no-array-reduce -----
|
|
16390
16601
|
type UnicornNoArrayReduce = [] | [{
|
|
16391
16602
|
allowSimpleOperations?: boolean;
|
|
@@ -16395,6 +16606,9 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
16395
16606
|
}]; // ----- unicorn/no-array-sort -----
|
|
16396
16607
|
type UnicornNoArraySort = [] | [{
|
|
16397
16608
|
allowExpressionStatement?: boolean;
|
|
16609
|
+
}]; // ----- unicorn/no-empty-file -----
|
|
16610
|
+
type UnicornNoEmptyFile = [] | [{
|
|
16611
|
+
allowComments?: boolean;
|
|
16398
16612
|
}]; // ----- unicorn/no-instanceof-builtins -----
|
|
16399
16613
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
16400
16614
|
useErrorIsError?: boolean;
|
|
@@ -16408,13 +16622,14 @@ type UnicornNoKeywordPrefix = [] | [{
|
|
|
16408
16622
|
onlyCamelCase?: boolean;
|
|
16409
16623
|
}]; // ----- unicorn/no-null -----
|
|
16410
16624
|
type UnicornNoNull = [] | [{
|
|
16625
|
+
checkArguments?: boolean;
|
|
16411
16626
|
checkStrictEquality?: boolean;
|
|
16412
16627
|
}]; // ----- unicorn/no-typeof-undefined -----
|
|
16413
16628
|
type UnicornNoTypeofUndefined = [] | [{
|
|
16414
16629
|
checkGlobalVariables?: boolean;
|
|
16415
16630
|
}]; // ----- unicorn/no-unnecessary-polyfills -----
|
|
16416
16631
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
16417
|
-
targets
|
|
16632
|
+
targets?: (string | unknown[] | {
|
|
16418
16633
|
[k: string]: unknown | undefined;
|
|
16419
16634
|
});
|
|
16420
16635
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
@@ -16445,6 +16660,7 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
16445
16660
|
onlyIfContainsSeparator?: boolean;
|
|
16446
16661
|
minimumDigits?: number;
|
|
16447
16662
|
groupLength?: number;
|
|
16663
|
+
fractionGroupLength?: number;
|
|
16448
16664
|
};
|
|
16449
16665
|
onlyIfContainsSeparator?: boolean;
|
|
16450
16666
|
}]; // ----- unicorn/prefer-add-event-listener -----
|
|
@@ -16462,7 +16678,10 @@ type UnicornPreferAt = [] | [{
|
|
|
16462
16678
|
checkAllIndexAccess?: boolean;
|
|
16463
16679
|
}]; // ----- unicorn/prefer-export-from -----
|
|
16464
16680
|
type UnicornPreferExportFrom = [] | [{
|
|
16465
|
-
|
|
16681
|
+
checkUsedVariables?: boolean;
|
|
16682
|
+
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
16683
|
+
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
16684
|
+
minimumComparisons?: number;
|
|
16466
16685
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
16467
16686
|
type UnicornPreferNumberProperties = [] | [{
|
|
16468
16687
|
checkInfinity?: boolean;
|
|
@@ -16470,9 +16689,22 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
16470
16689
|
}]; // ----- unicorn/prefer-object-from-entries -----
|
|
16471
16690
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
16472
16691
|
functions?: unknown[];
|
|
16692
|
+
}]; // ----- unicorn/prefer-query-selector -----
|
|
16693
|
+
type UnicornPreferQuerySelector = [] | [{
|
|
16694
|
+
allowWithVariables?: boolean;
|
|
16695
|
+
}]; // ----- unicorn/prefer-queue-microtask -----
|
|
16696
|
+
type UnicornPreferQueueMicrotask = [] | [{
|
|
16697
|
+
checkSetImmediate?: boolean;
|
|
16698
|
+
checkSetTimeout?: boolean;
|
|
16699
|
+
}]; // ----- unicorn/prefer-set-has -----
|
|
16700
|
+
type UnicornPreferSetHas = [] | [{
|
|
16701
|
+
minimumItems?: number;
|
|
16473
16702
|
}]; // ----- unicorn/prefer-single-call -----
|
|
16474
16703
|
type UnicornPreferSingleCall = [] | [{
|
|
16475
16704
|
ignore?: unknown[];
|
|
16705
|
+
}]; // ----- unicorn/prefer-string-repeat -----
|
|
16706
|
+
type UnicornPreferStringRepeat = [] | [{
|
|
16707
|
+
minimumRepetitions?: number;
|
|
16476
16708
|
}]; // ----- unicorn/prefer-structured-clone -----
|
|
16477
16709
|
type UnicornPreferStructuredClone = [] | [{
|
|
16478
16710
|
functions?: unknown[];
|
|
@@ -16505,15 +16737,20 @@ interface _UnicornPreventAbbreviations_BooleanObject {
|
|
|
16505
16737
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
16506
16738
|
[k: string]: boolean | undefined;
|
|
16507
16739
|
} // ----- unicorn/relative-url-style -----
|
|
16508
|
-
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/
|
|
16740
|
+
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
16741
|
+
type UnicornRequireCssEscape = [] | [{
|
|
16742
|
+
checkAllSelectors?: boolean;
|
|
16743
|
+
}]; // ----- unicorn/string-content -----
|
|
16509
16744
|
type UnicornStringContent = [] | [{
|
|
16510
16745
|
patterns?: {
|
|
16511
16746
|
[k: string]: (string | {
|
|
16512
16747
|
suggest: string;
|
|
16513
16748
|
fix?: boolean;
|
|
16749
|
+
caseSensitive?: boolean;
|
|
16514
16750
|
message?: string;
|
|
16515
16751
|
}) | undefined;
|
|
16516
16752
|
};
|
|
16753
|
+
selectors?: string[];
|
|
16517
16754
|
}]; // ----- unicorn/switch-case-braces -----
|
|
16518
16755
|
type UnicornSwitchCaseBraces = [] | [("always" | "avoid")]; // ----- unicorn/template-indent -----
|
|
16519
16756
|
type UnicornTemplateIndent = [] | [{
|
|
@@ -16525,6 +16762,9 @@ type UnicornTemplateIndent = [] | [{
|
|
|
16525
16762
|
}]; // ----- unicorn/text-encoding-identifier-case -----
|
|
16526
16763
|
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
16527
16764
|
withDash?: boolean;
|
|
16765
|
+
}]; // ----- unicorn/try-complexity -----
|
|
16766
|
+
type UnicornTryComplexity = [] | [{
|
|
16767
|
+
max?: number;
|
|
16528
16768
|
}]; // ----- unocss/enforce-class-compile -----
|
|
16529
16769
|
type UnocssEnforceClassCompile = [] | [{
|
|
16530
16770
|
prefix?: string;
|