@lichthagel/eslint-config 1.0.19 → 1.0.21
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.cjs +0 -1
- package/dist/index.d.cts +211 -212
- package/dist/index.d.ts +211 -212
- package/dist/index.js +0 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -403,7 +403,7 @@ interface RuleOptions {
|
|
|
403
403
|
'@stylistic/semi'?: Linter.RuleEntry<StylisticSemi>
|
|
404
404
|
/**
|
|
405
405
|
* Enforce consistent spacing before and after semicolons
|
|
406
|
-
* @see https://eslint.style/rules/
|
|
406
|
+
* @see https://eslint.style/rules/ts/semi-spacing
|
|
407
407
|
*/
|
|
408
408
|
'@stylistic/semi-spacing'?: Linter.RuleEntry<StylisticSemiSpacing>
|
|
409
409
|
/**
|
|
@@ -698,7 +698,7 @@ interface RuleOptions {
|
|
|
698
698
|
*/
|
|
699
699
|
'@typescript-eslint/no-for-in-array'?: Linter.RuleEntry<[]>
|
|
700
700
|
/**
|
|
701
|
-
* Disallow the use of `eval()`-like
|
|
701
|
+
* Disallow the use of `eval()`-like functions
|
|
702
702
|
* @see https://typescript-eslint.io/rules/no-implied-eval
|
|
703
703
|
*/
|
|
704
704
|
'@typescript-eslint/no-implied-eval'?: Linter.RuleEntry<[]>
|
|
@@ -3043,6 +3043,11 @@ interface RuleOptions {
|
|
|
3043
3043
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/
|
|
3044
3044
|
*/
|
|
3045
3045
|
'svelte/comment-directive'?: Linter.RuleEntry<SvelteCommentDirective>
|
|
3046
|
+
/**
|
|
3047
|
+
* enforce a consistent style for CSS selectors
|
|
3048
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/
|
|
3049
|
+
*/
|
|
3050
|
+
'svelte/consistent-selector-style'?: Linter.RuleEntry<SvelteConsistentSelectorStyle>
|
|
3046
3051
|
/**
|
|
3047
3052
|
* derived store should use same variable names between values and callback
|
|
3048
3053
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/
|
|
@@ -3141,6 +3146,7 @@ interface RuleOptions {
|
|
|
3141
3146
|
/**
|
|
3142
3147
|
* disallow dynamic slot name
|
|
3143
3148
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/
|
|
3149
|
+
* @deprecated
|
|
3144
3150
|
*/
|
|
3145
3151
|
'svelte/no-dynamic-slot-name'?: Linter.RuleEntry<[]>
|
|
3146
3152
|
/**
|
|
@@ -3156,6 +3162,7 @@ interface RuleOptions {
|
|
|
3156
3162
|
/**
|
|
3157
3163
|
* disallow using goto() without the base path
|
|
3158
3164
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/
|
|
3165
|
+
* @deprecated
|
|
3159
3166
|
*/
|
|
3160
3167
|
'svelte/no-goto-without-base'?: Linter.RuleEntry<[]>
|
|
3161
3168
|
/**
|
|
@@ -3183,6 +3190,11 @@ interface RuleOptions {
|
|
|
3183
3190
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
|
|
3184
3191
|
*/
|
|
3185
3192
|
'svelte/no-inspect'?: Linter.RuleEntry<[]>
|
|
3193
|
+
/**
|
|
3194
|
+
* disallow using navigation (links, goto, pushState, replaceState) without the base path
|
|
3195
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
|
|
3196
|
+
*/
|
|
3197
|
+
'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>
|
|
3186
3198
|
/**
|
|
3187
3199
|
* disallow use of not function in event handler
|
|
3188
3200
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
|
|
@@ -3193,6 +3205,11 @@ interface RuleOptions {
|
|
|
3193
3205
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/
|
|
3194
3206
|
*/
|
|
3195
3207
|
'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>
|
|
3208
|
+
/**
|
|
3209
|
+
* Checks for invalid raw HTML elements
|
|
3210
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
|
|
3211
|
+
*/
|
|
3212
|
+
'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>
|
|
3196
3213
|
/**
|
|
3197
3214
|
* it's not necessary to define functions in reactive statements
|
|
3198
3215
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/
|
|
@@ -3258,6 +3275,11 @@ interface RuleOptions {
|
|
|
3258
3275
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/
|
|
3259
3276
|
*/
|
|
3260
3277
|
'svelte/no-unused-svelte-ignore'?: Linter.RuleEntry<[]>
|
|
3278
|
+
/**
|
|
3279
|
+
* disallow explicit children snippet where it's not needed
|
|
3280
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/
|
|
3281
|
+
*/
|
|
3282
|
+
'svelte/no-useless-children-snippet'?: Linter.RuleEntry<[]>
|
|
3261
3283
|
/**
|
|
3262
3284
|
* disallow unnecessary mustache interpolations
|
|
3263
3285
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
@@ -3268,6 +3290,11 @@ interface RuleOptions {
|
|
|
3268
3290
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
|
|
3269
3291
|
*/
|
|
3270
3292
|
'svelte/prefer-class-directive'?: Linter.RuleEntry<SveltePreferClassDirective>
|
|
3293
|
+
/**
|
|
3294
|
+
* Require `const` declarations for variables that are never reassigned after declared
|
|
3295
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
|
|
3296
|
+
*/
|
|
3297
|
+
'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>
|
|
3271
3298
|
/**
|
|
3272
3299
|
* destructure values from object stores for better change tracking & fewer redraws
|
|
3273
3300
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
|
|
@@ -3348,6 +3375,11 @@ interface RuleOptions {
|
|
|
3348
3375
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
|
|
3349
3376
|
*/
|
|
3350
3377
|
'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>
|
|
3378
|
+
/**
|
|
3379
|
+
* require valid style element parsing
|
|
3380
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/
|
|
3381
|
+
*/
|
|
3382
|
+
'svelte/valid-style-parse'?: Linter.RuleEntry<[]>
|
|
3351
3383
|
/**
|
|
3352
3384
|
* Enforce spacing around colons of switch statements
|
|
3353
3385
|
* @see https://eslint.org/docs/latest/rules/switch-colon-spacing
|
|
@@ -3418,702 +3450,642 @@ interface RuleOptions {
|
|
|
3418
3450
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
3419
3451
|
/**
|
|
3420
3452
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
3421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/better-regex.md
|
|
3422
3454
|
*/
|
|
3423
3455
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
3424
3456
|
/**
|
|
3425
3457
|
* Enforce a specific parameter name in catch clauses.
|
|
3426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/catch-error-name.md
|
|
3427
3459
|
*/
|
|
3428
3460
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
3461
|
+
/**
|
|
3462
|
+
* Enforce consistent assertion style with `node:assert`.
|
|
3463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-assert.md
|
|
3464
|
+
*/
|
|
3465
|
+
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
3466
|
+
/**
|
|
3467
|
+
* Prefer passing `Date` directly to the constructor when cloning.
|
|
3468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-date-clone.md
|
|
3469
|
+
*/
|
|
3470
|
+
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
3429
3471
|
/**
|
|
3430
3472
|
* Use destructured variables over properties.
|
|
3431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-destructuring.md
|
|
3432
3474
|
*/
|
|
3433
3475
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
3434
3476
|
/**
|
|
3435
3477
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
3436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-empty-array-spread.md
|
|
3437
3479
|
*/
|
|
3438
3480
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
3439
3481
|
/**
|
|
3440
3482
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
3441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-existence-index-check.md
|
|
3442
3484
|
*/
|
|
3443
3485
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
3444
3486
|
/**
|
|
3445
3487
|
* Move function definitions to the highest possible scope.
|
|
3446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-function-scoping.md
|
|
3447
3489
|
*/
|
|
3448
3490
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
3449
3491
|
/**
|
|
3450
3492
|
* Enforce correct `Error` subclassing.
|
|
3451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/custom-error-definition.md
|
|
3452
3494
|
*/
|
|
3453
3495
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
3454
3496
|
/**
|
|
3455
3497
|
* Enforce no spaces between braces.
|
|
3456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/empty-brace-spaces.md
|
|
3457
3499
|
*/
|
|
3458
3500
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
3459
3501
|
/**
|
|
3460
3502
|
* Enforce passing a `message` value when creating a built-in error.
|
|
3461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/error-message.md
|
|
3462
3504
|
*/
|
|
3463
3505
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
3464
3506
|
/**
|
|
3465
3507
|
* Require escape sequences to use uppercase values.
|
|
3466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/escape-case.md
|
|
3467
3509
|
*/
|
|
3468
3510
|
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
3469
3511
|
/**
|
|
3470
3512
|
* Add expiration conditions to TODO comments.
|
|
3471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/expiring-todo-comments.md
|
|
3472
3514
|
*/
|
|
3473
3515
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
3474
3516
|
/**
|
|
3475
3517
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
3476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/explicit-length-check.md
|
|
3477
3519
|
*/
|
|
3478
3520
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
3479
3521
|
/**
|
|
3480
3522
|
* Enforce a case style for filenames.
|
|
3481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/filename-case.md
|
|
3482
3524
|
*/
|
|
3483
3525
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
3484
|
-
/**
|
|
3485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#import-index
|
|
3486
|
-
* @deprecated
|
|
3487
|
-
*/
|
|
3488
|
-
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
3489
3526
|
/**
|
|
3490
3527
|
* Enforce specific import styles per module.
|
|
3491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/import-style.md
|
|
3492
3529
|
*/
|
|
3493
3530
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
3494
3531
|
/**
|
|
3495
3532
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
3496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/new-for-builtins.md
|
|
3497
3534
|
*/
|
|
3498
3535
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
3499
3536
|
/**
|
|
3500
3537
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
3501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
3502
3539
|
*/
|
|
3503
3540
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
3541
|
+
/**
|
|
3542
|
+
* Disallow recursive access to `this` within getters and setters.
|
|
3543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-accessor-recursion.md
|
|
3544
|
+
*/
|
|
3545
|
+
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
3504
3546
|
/**
|
|
3505
3547
|
* Disallow anonymous functions and classes as the default export.
|
|
3506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-anonymous-default-export.md
|
|
3507
3549
|
*/
|
|
3508
3550
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
3509
3551
|
/**
|
|
3510
3552
|
* Prevent passing a function reference directly to iterator methods.
|
|
3511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-callback-reference.md
|
|
3512
3554
|
*/
|
|
3513
3555
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
3514
3556
|
/**
|
|
3515
3557
|
* Prefer `for…of` over the `forEach` method.
|
|
3516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-for-each.md
|
|
3517
3559
|
*/
|
|
3518
3560
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
3519
|
-
/**
|
|
3520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-array-instanceof
|
|
3521
|
-
* @deprecated
|
|
3522
|
-
*/
|
|
3523
|
-
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
3524
3561
|
/**
|
|
3525
3562
|
* Disallow using the `this` argument in array methods.
|
|
3526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-method-this-argument.md
|
|
3527
3564
|
*/
|
|
3528
3565
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
3529
3566
|
/**
|
|
3530
3567
|
* Enforce combining multiple `Array#push()` into one call.
|
|
3531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-push-push.md
|
|
3532
3569
|
*/
|
|
3533
3570
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
3534
3571
|
/**
|
|
3535
3572
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
3536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-reduce.md
|
|
3537
3574
|
*/
|
|
3538
3575
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
3539
3576
|
/**
|
|
3540
3577
|
* Disallow member access from await expression.
|
|
3541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-expression-member.md
|
|
3542
3579
|
*/
|
|
3543
3580
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
3544
3581
|
/**
|
|
3545
3582
|
* Disallow using `await` in `Promise` method parameters.
|
|
3546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-in-promise-methods.md
|
|
3547
3584
|
*/
|
|
3548
3585
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3549
3586
|
/**
|
|
3550
3587
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
3551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-console-spaces.md
|
|
3552
3589
|
*/
|
|
3553
3590
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
3554
3591
|
/**
|
|
3555
3592
|
* Do not use `document.cookie` directly.
|
|
3556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-document-cookie.md
|
|
3557
3594
|
*/
|
|
3558
3595
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
3559
3596
|
/**
|
|
3560
3597
|
* Disallow empty files.
|
|
3561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-empty-file.md
|
|
3562
3599
|
*/
|
|
3563
3600
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
3564
|
-
/**
|
|
3565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
3566
|
-
* @deprecated
|
|
3567
|
-
*/
|
|
3568
|
-
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
3569
3601
|
/**
|
|
3570
3602
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
3571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-for-loop.md
|
|
3572
3604
|
*/
|
|
3573
3605
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
3574
3606
|
/**
|
|
3575
3607
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
3576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-hex-escape.md
|
|
3577
3609
|
*/
|
|
3578
3610
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
3579
3611
|
/**
|
|
3580
|
-
*
|
|
3581
|
-
* @
|
|
3612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
3613
|
+
* @deprecated
|
|
3582
3614
|
*/
|
|
3583
3615
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
3616
|
+
/**
|
|
3617
|
+
* Disallow `instanceof` with built-in objects
|
|
3618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-instanceof-builtins.md
|
|
3619
|
+
*/
|
|
3620
|
+
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
3584
3621
|
/**
|
|
3585
3622
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
3586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-fetch-options.md
|
|
3587
3624
|
*/
|
|
3588
3625
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
3589
3626
|
/**
|
|
3590
3627
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
3591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
3592
3629
|
*/
|
|
3593
3630
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
3594
3631
|
/**
|
|
3595
3632
|
* Disallow identifiers starting with `new` or `class`.
|
|
3596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-keyword-prefix.md
|
|
3597
3634
|
*/
|
|
3598
3635
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
3599
3636
|
/**
|
|
3600
3637
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
3601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-length-as-slice-end.md
|
|
3602
3639
|
*/
|
|
3603
3640
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
3604
3641
|
/**
|
|
3605
3642
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
3606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-lonely-if.md
|
|
3607
3644
|
*/
|
|
3608
3645
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
3609
3646
|
/**
|
|
3610
3647
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
3611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
3612
3649
|
*/
|
|
3613
3650
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
3651
|
+
/**
|
|
3652
|
+
* Disallow named usage of default import and export.
|
|
3653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-named-default.md
|
|
3654
|
+
*/
|
|
3655
|
+
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
3614
3656
|
/**
|
|
3615
3657
|
* Disallow negated conditions.
|
|
3616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negated-condition.md
|
|
3617
3659
|
*/
|
|
3618
3660
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
3619
3661
|
/**
|
|
3620
3662
|
* Disallow negated expression in equality check.
|
|
3621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negation-in-equality-check.md
|
|
3622
3664
|
*/
|
|
3623
3665
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
3624
3666
|
/**
|
|
3625
3667
|
* Disallow nested ternary expressions.
|
|
3626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-nested-ternary.md
|
|
3627
3669
|
*/
|
|
3628
3670
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
3629
3671
|
/**
|
|
3630
3672
|
* Disallow `new Array()`.
|
|
3631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-array.md
|
|
3632
3674
|
*/
|
|
3633
3675
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
3634
3676
|
/**
|
|
3635
3677
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
3636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-buffer.md
|
|
3637
3679
|
*/
|
|
3638
3680
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
3639
3681
|
/**
|
|
3640
3682
|
* Disallow the use of the `null` literal.
|
|
3641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-null.md
|
|
3642
3684
|
*/
|
|
3643
3685
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
3644
3686
|
/**
|
|
3645
3687
|
* Disallow the use of objects as default parameters.
|
|
3646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-object-as-default-parameter.md
|
|
3647
3689
|
*/
|
|
3648
3690
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
3649
3691
|
/**
|
|
3650
3692
|
* Disallow `process.exit()`.
|
|
3651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-process-exit.md
|
|
3652
3694
|
*/
|
|
3653
3695
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
3654
|
-
/**
|
|
3655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-reduce
|
|
3656
|
-
* @deprecated
|
|
3657
|
-
*/
|
|
3658
|
-
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
3659
3696
|
/**
|
|
3660
3697
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
3661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
3662
3699
|
*/
|
|
3663
3700
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3664
3701
|
/**
|
|
3665
3702
|
* Disallow classes that only have static members.
|
|
3666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-static-only-class.md
|
|
3667
3704
|
*/
|
|
3668
3705
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
3669
3706
|
/**
|
|
3670
3707
|
* Disallow `then` property.
|
|
3671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-thenable.md
|
|
3672
3709
|
*/
|
|
3673
3710
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
3674
3711
|
/**
|
|
3675
3712
|
* Disallow assigning `this` to a variable.
|
|
3676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-this-assignment.md
|
|
3677
3714
|
*/
|
|
3678
3715
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
3679
3716
|
/**
|
|
3680
3717
|
* Disallow comparing `undefined` using `typeof`.
|
|
3681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-typeof-undefined.md
|
|
3682
3719
|
*/
|
|
3683
3720
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
3684
3721
|
/**
|
|
3685
3722
|
* Disallow awaiting non-promise values.
|
|
3686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-await.md
|
|
3687
3724
|
*/
|
|
3688
3725
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
3689
3726
|
/**
|
|
3690
3727
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
3691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
3692
3729
|
*/
|
|
3693
3730
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
3694
3731
|
/**
|
|
3695
3732
|
* Disallow unreadable array destructuring.
|
|
3696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
3697
3734
|
*/
|
|
3698
3735
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
3699
3736
|
/**
|
|
3700
3737
|
* Disallow unreadable IIFEs.
|
|
3701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-iife.md
|
|
3702
3739
|
*/
|
|
3703
3740
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
3704
|
-
/**
|
|
3705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-unsafe-regex
|
|
3706
|
-
* @deprecated
|
|
3707
|
-
*/
|
|
3708
|
-
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
3709
3741
|
/**
|
|
3710
3742
|
* Disallow unused object properties.
|
|
3711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unused-properties.md
|
|
3712
3744
|
*/
|
|
3713
3745
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
3714
3746
|
/**
|
|
3715
3747
|
* Disallow useless fallback when spreading in object literals.
|
|
3716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
3717
3749
|
*/
|
|
3718
3750
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
3719
3751
|
/**
|
|
3720
3752
|
* Disallow useless array length check.
|
|
3721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-length-check.md
|
|
3722
3754
|
*/
|
|
3723
3755
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
3724
3756
|
/**
|
|
3725
3757
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
3726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
3727
3759
|
*/
|
|
3728
3760
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
3729
3761
|
/**
|
|
3730
3762
|
* Disallow unnecessary spread.
|
|
3731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-spread.md
|
|
3732
3764
|
*/
|
|
3733
3765
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
3734
3766
|
/**
|
|
3735
3767
|
* Disallow useless case in switch statements.
|
|
3736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-switch-case.md
|
|
3737
3769
|
*/
|
|
3738
3770
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
3739
3771
|
/**
|
|
3740
3772
|
* Disallow useless `undefined`.
|
|
3741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-undefined.md
|
|
3742
3774
|
*/
|
|
3743
3775
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
3744
3776
|
/**
|
|
3745
3777
|
* Disallow number literals with zero fractions or dangling dots.
|
|
3746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-zero-fractions.md
|
|
3747
3779
|
*/
|
|
3748
3780
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
3749
3781
|
/**
|
|
3750
3782
|
* Enforce proper case for numeric literals.
|
|
3751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/number-literal-case.md
|
|
3752
3784
|
*/
|
|
3753
3785
|
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
3754
3786
|
/**
|
|
3755
3787
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
3756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/numeric-separators-style.md
|
|
3757
3789
|
*/
|
|
3758
3790
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
3759
3791
|
/**
|
|
3760
3792
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
3761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-add-event-listener.md
|
|
3762
3794
|
*/
|
|
3763
3795
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
3764
3796
|
/**
|
|
3765
3797
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
3766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-find.md
|
|
3767
3799
|
*/
|
|
3768
3800
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
3769
3801
|
/**
|
|
3770
3802
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
3771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat.md
|
|
3772
3804
|
*/
|
|
3773
3805
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
3774
3806
|
/**
|
|
3775
3807
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
3776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat-map.md
|
|
3777
3809
|
*/
|
|
3778
3810
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
3779
3811
|
/**
|
|
3780
3812
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
3781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-index-of.md
|
|
3782
3814
|
*/
|
|
3783
3815
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
3784
3816
|
/**
|
|
3785
3817
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
3786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-some.md
|
|
3787
3819
|
*/
|
|
3788
3820
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
3789
3821
|
/**
|
|
3790
3822
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
3791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-at.md
|
|
3792
3824
|
*/
|
|
3793
3825
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
3794
3826
|
/**
|
|
3795
3827
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
3796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
3797
3829
|
*/
|
|
3798
3830
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
3799
3831
|
/**
|
|
3800
3832
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
3801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-code-point.md
|
|
3802
3834
|
*/
|
|
3803
3835
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
3804
|
-
/**
|
|
3805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-dataset
|
|
3806
|
-
* @deprecated
|
|
3807
|
-
*/
|
|
3808
|
-
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
3809
3836
|
/**
|
|
3810
3837
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
3811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-date-now.md
|
|
3812
3839
|
*/
|
|
3813
3840
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
3814
3841
|
/**
|
|
3815
3842
|
* Prefer default parameters over reassignment.
|
|
3816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-default-parameters.md
|
|
3817
3844
|
*/
|
|
3818
3845
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
3819
3846
|
/**
|
|
3820
3847
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
3821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-append.md
|
|
3822
3849
|
*/
|
|
3823
3850
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
3824
3851
|
/**
|
|
3825
3852
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
3826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
3827
3854
|
*/
|
|
3828
3855
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
3829
3856
|
/**
|
|
3830
3857
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
3831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-remove.md
|
|
3832
3859
|
*/
|
|
3833
3860
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
3834
3861
|
/**
|
|
3835
3862
|
* Prefer `.textContent` over `.innerText`.
|
|
3836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
3837
3864
|
*/
|
|
3838
3865
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
3839
|
-
/**
|
|
3840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-event-key
|
|
3841
|
-
* @deprecated
|
|
3842
|
-
*/
|
|
3843
|
-
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
3844
3866
|
/**
|
|
3845
3867
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
3846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-event-target.md
|
|
3847
3869
|
*/
|
|
3848
3870
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
3849
|
-
/**
|
|
3850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
3851
|
-
* @deprecated
|
|
3852
|
-
*/
|
|
3853
|
-
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
3854
3871
|
/**
|
|
3855
3872
|
* Prefer `export…from` when re-exporting.
|
|
3856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-export-from.md
|
|
3857
3874
|
*/
|
|
3858
3875
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
3859
|
-
/**
|
|
3860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-flat-map
|
|
3861
|
-
* @deprecated
|
|
3862
|
-
*/
|
|
3863
|
-
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
3864
3876
|
/**
|
|
3865
3877
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
3866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-global-this.md
|
|
3867
3879
|
*/
|
|
3868
3880
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
3869
3881
|
/**
|
|
3870
3882
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
3871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-includes.md
|
|
3872
3884
|
*/
|
|
3873
3885
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
3874
3886
|
/**
|
|
3875
3887
|
* Prefer reading a JSON file as a buffer.
|
|
3876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
3877
3889
|
*/
|
|
3878
3890
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
3879
3891
|
/**
|
|
3880
3892
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
3881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
3882
3894
|
*/
|
|
3883
3895
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
3884
3896
|
/**
|
|
3885
3897
|
* Prefer using a logical operator over a ternary.
|
|
3886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
3887
3899
|
*/
|
|
3888
3900
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
3889
3901
|
/**
|
|
3890
3902
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
3891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-min-max.md
|
|
3892
3904
|
*/
|
|
3893
3905
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
3894
3906
|
/**
|
|
3895
3907
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
3896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-trunc.md
|
|
3897
3909
|
*/
|
|
3898
3910
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
3899
3911
|
/**
|
|
3900
3912
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
3901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
3902
3914
|
*/
|
|
3903
3915
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
3904
3916
|
/**
|
|
3905
3917
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
3906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-math-apis.md
|
|
3907
3919
|
*/
|
|
3908
3920
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
3909
3921
|
/**
|
|
3910
3922
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
3911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-module.md
|
|
3912
3924
|
*/
|
|
3913
3925
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
3914
3926
|
/**
|
|
3915
3927
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
3916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
3917
3929
|
*/
|
|
3918
3930
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
3919
3931
|
/**
|
|
3920
3932
|
* Prefer negative index over `.length - index` when possible.
|
|
3921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-negative-index.md
|
|
3922
3934
|
*/
|
|
3923
3935
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
3924
|
-
/**
|
|
3925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-append
|
|
3926
|
-
* @deprecated
|
|
3927
|
-
*/
|
|
3928
|
-
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
3929
3936
|
/**
|
|
3930
3937
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
3931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-node-protocol.md
|
|
3932
3939
|
*/
|
|
3933
3940
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
3934
|
-
/**
|
|
3935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-remove
|
|
3936
|
-
* @deprecated
|
|
3937
|
-
*/
|
|
3938
|
-
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
3939
3941
|
/**
|
|
3940
3942
|
* Prefer `Number` static properties over global ones.
|
|
3941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-number-properties.md
|
|
3942
3944
|
*/
|
|
3943
3945
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
3944
3946
|
/**
|
|
3945
3947
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
3946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-object-from-entries.md
|
|
3947
3949
|
*/
|
|
3948
3950
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
3949
|
-
/**
|
|
3950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-object-has-own
|
|
3951
|
-
* @deprecated
|
|
3952
|
-
*/
|
|
3953
|
-
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
3954
3951
|
/**
|
|
3955
3952
|
* Prefer omitting the `catch` binding parameter.
|
|
3956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
3957
3954
|
*/
|
|
3958
3955
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
3959
3956
|
/**
|
|
3960
3957
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
3961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-prototype-methods.md
|
|
3962
3959
|
*/
|
|
3963
3960
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
3964
3961
|
/**
|
|
3965
3962
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
3966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-query-selector.md
|
|
3967
3964
|
*/
|
|
3968
3965
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
3969
3966
|
/**
|
|
3970
3967
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
3971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-reflect-apply.md
|
|
3972
3969
|
*/
|
|
3973
3970
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
3974
3971
|
/**
|
|
3975
3972
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
3976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-regexp-test.md
|
|
3977
3974
|
*/
|
|
3978
3975
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
3979
|
-
/**
|
|
3980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-replace-all
|
|
3981
|
-
* @deprecated
|
|
3982
|
-
*/
|
|
3983
|
-
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
3984
3976
|
/**
|
|
3985
3977
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
3986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-has.md
|
|
3987
3979
|
*/
|
|
3988
3980
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
3989
3981
|
/**
|
|
3990
3982
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
3991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-size.md
|
|
3992
3984
|
*/
|
|
3993
3985
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
3994
3986
|
/**
|
|
3995
3987
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
3996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-spread.md
|
|
3997
3989
|
*/
|
|
3998
3990
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
3999
|
-
/**
|
|
4000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
4001
|
-
* @deprecated
|
|
4002
|
-
*/
|
|
4003
|
-
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4004
3991
|
/**
|
|
4005
3992
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-raw.md
|
|
4007
3994
|
*/
|
|
4008
3995
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
4009
3996
|
/**
|
|
4010
3997
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-replace-all.md
|
|
4012
3999
|
*/
|
|
4013
4000
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
4014
4001
|
/**
|
|
4015
4002
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-slice.md
|
|
4017
4004
|
*/
|
|
4018
4005
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
4019
4006
|
/**
|
|
4020
4007
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4022
4009
|
*/
|
|
4023
4010
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4024
4011
|
/**
|
|
4025
4012
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4027
4014
|
*/
|
|
4028
4015
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4029
4016
|
/**
|
|
4030
4017
|
* Prefer using `structuredClone` to create a deep clone.
|
|
4031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-structured-clone.md
|
|
4032
4019
|
*/
|
|
4033
4020
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
4034
4021
|
/**
|
|
4035
4022
|
* Prefer `switch` over multiple `else-if`.
|
|
4036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-switch.md
|
|
4037
4024
|
*/
|
|
4038
4025
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
4039
4026
|
/**
|
|
4040
4027
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
4041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-ternary.md
|
|
4042
4029
|
*/
|
|
4043
4030
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
4044
|
-
/**
|
|
4045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-text-content
|
|
4046
|
-
* @deprecated
|
|
4047
|
-
*/
|
|
4048
|
-
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
4049
4031
|
/**
|
|
4050
4032
|
* Prefer top-level await over top-level promises and async function calls.
|
|
4051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-top-level-await.md
|
|
4052
4034
|
*/
|
|
4053
4035
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
4054
|
-
/**
|
|
4055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-trim-start-end
|
|
4056
|
-
* @deprecated
|
|
4057
|
-
*/
|
|
4058
|
-
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4059
4036
|
/**
|
|
4060
4037
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
4061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-type-error.md
|
|
4062
4039
|
*/
|
|
4063
4040
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
4064
4041
|
/**
|
|
4065
4042
|
* Prevent abbreviations.
|
|
4066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prevent-abbreviations.md
|
|
4067
4044
|
*/
|
|
4068
4045
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
4069
|
-
/**
|
|
4070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#regex-shorthand
|
|
4071
|
-
* @deprecated
|
|
4072
|
-
*/
|
|
4073
|
-
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
4074
4046
|
/**
|
|
4075
4047
|
* Enforce consistent relative URL style.
|
|
4076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/relative-url-style.md
|
|
4077
4049
|
*/
|
|
4078
4050
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
4079
4051
|
/**
|
|
4080
4052
|
* Enforce using the separator argument with `Array#join()`.
|
|
4081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-array-join-separator.md
|
|
4082
4054
|
*/
|
|
4083
4055
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
4084
4056
|
/**
|
|
4085
4057
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4087
4059
|
*/
|
|
4088
4060
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
4089
4061
|
/**
|
|
4090
4062
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-post-message-target-origin.md
|
|
4092
4064
|
*/
|
|
4093
4065
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
4094
4066
|
/**
|
|
4095
4067
|
* Enforce better string content.
|
|
4096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/string-content.md
|
|
4097
4069
|
*/
|
|
4098
4070
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
4099
4071
|
/**
|
|
4100
4072
|
* Enforce consistent brace style for `case` clauses.
|
|
4101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/switch-case-braces.md
|
|
4102
4074
|
*/
|
|
4103
4075
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
4104
4076
|
/**
|
|
4105
4077
|
* Fix whitespace-insensitive template indentation.
|
|
4106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/template-indent.md
|
|
4107
4079
|
*/
|
|
4108
4080
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
4109
4081
|
/**
|
|
4110
4082
|
* Enforce consistent case for text encoding identifiers.
|
|
4111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/text-encoding-identifier-case.md
|
|
4112
4084
|
*/
|
|
4113
4085
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
4114
4086
|
/**
|
|
4115
4087
|
* Require `new` when creating an error.
|
|
4116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/throw-new-error.md
|
|
4117
4089
|
*/
|
|
4118
4090
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
4119
4091
|
/**
|
|
@@ -5242,6 +5214,7 @@ type StylisticSpaceInParens = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
5242
5214
|
// ----- @stylistic/space-infix-ops -----
|
|
5243
5215
|
type StylisticSpaceInfixOps = []|[{
|
|
5244
5216
|
int32Hint?: boolean
|
|
5217
|
+
ignoreTypes?: boolean
|
|
5245
5218
|
}]
|
|
5246
5219
|
// ----- @stylistic/space-unary-ops -----
|
|
5247
5220
|
type StylisticSpaceUnaryOps = []|[{
|
|
@@ -9926,6 +9899,12 @@ type SvelteButtonHasType = []|[{
|
|
|
9926
9899
|
type SvelteCommentDirective = []|[{
|
|
9927
9900
|
reportUnusedDisableDirectives?: boolean
|
|
9928
9901
|
}]
|
|
9902
|
+
// ----- svelte/consistent-selector-style -----
|
|
9903
|
+
type SvelteConsistentSelectorStyle = []|[{
|
|
9904
|
+
checkGlobal?: boolean
|
|
9905
|
+
|
|
9906
|
+
style?: []|[("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")]
|
|
9907
|
+
}]
|
|
9929
9908
|
// ----- svelte/first-attribute-linebreak -----
|
|
9930
9909
|
type SvelteFirstAttributeLinebreak = []|[{
|
|
9931
9910
|
multiline?: ("below" | "beside")
|
|
@@ -9958,7 +9937,8 @@ type SvelteHtmlQuotes = []|[{
|
|
|
9958
9937
|
type SvelteHtmlSelfClosing = []|[({
|
|
9959
9938
|
void?: ("never" | "always" | "ignore")
|
|
9960
9939
|
normal?: ("never" | "always" | "ignore")
|
|
9961
|
-
|
|
9940
|
+
svg?: ("never" | "always" | "ignore")
|
|
9941
|
+
math?: ("never" | "always" | "ignore")
|
|
9962
9942
|
component?: ("never" | "always" | "ignore")
|
|
9963
9943
|
svelte?: ("never" | "always" | "ignore")
|
|
9964
9944
|
} | ("all" | "html" | "none"))]
|
|
@@ -9997,6 +9977,13 @@ type SvelteNoInlineStyles = []|[{
|
|
|
9997
9977
|
type SvelteNoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
|
|
9998
9978
|
blockScopedFunctions?: ("allow" | "disallow")
|
|
9999
9979
|
}]
|
|
9980
|
+
// ----- svelte/no-navigation-without-base -----
|
|
9981
|
+
type SvelteNoNavigationWithoutBase = []|[{
|
|
9982
|
+
ignoreGoto?: boolean
|
|
9983
|
+
ignoreLinks?: boolean
|
|
9984
|
+
ignorePushState?: boolean
|
|
9985
|
+
ignoreReplaceState?: boolean
|
|
9986
|
+
}]
|
|
10000
9987
|
// ----- svelte/no-reactive-reassign -----
|
|
10001
9988
|
type SvelteNoReactiveReassign = []|[{
|
|
10002
9989
|
props?: boolean
|
|
@@ -10040,6 +10027,11 @@ type SvelteNoUselessMustaches = []|[{
|
|
|
10040
10027
|
type SveltePreferClassDirective = []|[{
|
|
10041
10028
|
prefer?: ("always" | "empty")
|
|
10042
10029
|
}]
|
|
10030
|
+
// ----- svelte/prefer-const -----
|
|
10031
|
+
type SveltePreferConst = []|[{
|
|
10032
|
+
destructuring?: ("any" | "all")
|
|
10033
|
+
ignoreReadBeforeAssign?: boolean
|
|
10034
|
+
}]
|
|
10043
10035
|
// ----- svelte/shorthand-attribute -----
|
|
10044
10036
|
type SvelteShorthandAttribute = []|[{
|
|
10045
10037
|
prefer?: ("always" | "never")
|
|
@@ -10221,6 +10213,13 @@ type UnicornNoArrayPushPush = []|[{
|
|
|
10221
10213
|
type UnicornNoArrayReduce = []|[{
|
|
10222
10214
|
allowSimpleOperations?: boolean
|
|
10223
10215
|
}]
|
|
10216
|
+
// ----- unicorn/no-instanceof-builtins -----
|
|
10217
|
+
type UnicornNoInstanceofBuiltins = []|[{
|
|
10218
|
+
useErrorIsError?: boolean
|
|
10219
|
+
strategy?: ("loose" | "strict")
|
|
10220
|
+
include?: string[]
|
|
10221
|
+
exclude?: string[]
|
|
10222
|
+
}]
|
|
10224
10223
|
// ----- unicorn/no-keyword-prefix -----
|
|
10225
10224
|
type UnicornNoKeywordPrefix = []|[{
|
|
10226
10225
|
|