@bfra.me/eslint-config 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +920 -3
- package/lib/index.js +128 -8
- package/package.json +7 -6
- package/src/config.d.ts +2 -0
- package/src/configs/index.ts +1 -0
- package/src/configs/javascript.ts +19 -3
- package/src/configs/markdown.ts +1 -1
- package/src/configs/unicorn.ts +88 -0
- package/src/define-config.ts +9 -2
- package/src/globs.ts +2 -0
- package/src/options.ts +14 -0
- package/src/plugins.ts +1 -0
- package/src/rules.d.ts +898 -0
package/lib/index.d.ts
CHANGED
|
@@ -3606,6 +3606,706 @@ interface Rules {
|
|
|
3606
3606
|
* @see https://eslint.org/docs/latest/rules/unicode-bom
|
|
3607
3607
|
*/
|
|
3608
3608
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
3609
|
+
/**
|
|
3610
|
+
* Improve regexes by making them shorter, consistent, and safer.
|
|
3611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/better-regex.md
|
|
3612
|
+
*/
|
|
3613
|
+
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
3614
|
+
/**
|
|
3615
|
+
* Enforce a specific parameter name in catch clauses.
|
|
3616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/catch-error-name.md
|
|
3617
|
+
*/
|
|
3618
|
+
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
3619
|
+
/**
|
|
3620
|
+
* Use destructured variables over properties.
|
|
3621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/consistent-destructuring.md
|
|
3622
|
+
*/
|
|
3623
|
+
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
3624
|
+
/**
|
|
3625
|
+
* Prefer consistent types when spreading a ternary in an array literal.
|
|
3626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/consistent-empty-array-spread.md
|
|
3627
|
+
*/
|
|
3628
|
+
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
3629
|
+
/**
|
|
3630
|
+
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
3631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/consistent-existence-index-check.md
|
|
3632
|
+
*/
|
|
3633
|
+
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
3634
|
+
/**
|
|
3635
|
+
* Move function definitions to the highest possible scope.
|
|
3636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/consistent-function-scoping.md
|
|
3637
|
+
*/
|
|
3638
|
+
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
3639
|
+
/**
|
|
3640
|
+
* Enforce correct `Error` subclassing.
|
|
3641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/custom-error-definition.md
|
|
3642
|
+
*/
|
|
3643
|
+
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
3644
|
+
/**
|
|
3645
|
+
* Enforce no spaces between braces.
|
|
3646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/empty-brace-spaces.md
|
|
3647
|
+
*/
|
|
3648
|
+
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
3649
|
+
/**
|
|
3650
|
+
* Enforce passing a `message` value when creating a built-in error.
|
|
3651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/error-message.md
|
|
3652
|
+
*/
|
|
3653
|
+
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
3654
|
+
/**
|
|
3655
|
+
* Require escape sequences to use uppercase values.
|
|
3656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/escape-case.md
|
|
3657
|
+
*/
|
|
3658
|
+
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
3659
|
+
/**
|
|
3660
|
+
* Add expiration conditions to TODO comments.
|
|
3661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/expiring-todo-comments.md
|
|
3662
|
+
*/
|
|
3663
|
+
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
3664
|
+
/**
|
|
3665
|
+
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
3666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/explicit-length-check.md
|
|
3667
|
+
*/
|
|
3668
|
+
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
3669
|
+
/**
|
|
3670
|
+
* Enforce a case style for filenames.
|
|
3671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/filename-case.md
|
|
3672
|
+
*/
|
|
3673
|
+
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
3674
|
+
/**
|
|
3675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#import-index
|
|
3676
|
+
* @deprecated
|
|
3677
|
+
*/
|
|
3678
|
+
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
3679
|
+
/**
|
|
3680
|
+
* Enforce specific import styles per module.
|
|
3681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/import-style.md
|
|
3682
|
+
*/
|
|
3683
|
+
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
3684
|
+
/**
|
|
3685
|
+
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
3686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/new-for-builtins.md
|
|
3687
|
+
*/
|
|
3688
|
+
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
3689
|
+
/**
|
|
3690
|
+
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
3691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-abusive-eslint-disable.md
|
|
3692
|
+
*/
|
|
3693
|
+
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
3694
|
+
/**
|
|
3695
|
+
* Disallow anonymous functions and classes as the default export.
|
|
3696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-anonymous-default-export.md
|
|
3697
|
+
*/
|
|
3698
|
+
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
3699
|
+
/**
|
|
3700
|
+
* Prevent passing a function reference directly to iterator methods.
|
|
3701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-array-callback-reference.md
|
|
3702
|
+
*/
|
|
3703
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
3704
|
+
/**
|
|
3705
|
+
* Prefer `for…of` over the `forEach` method.
|
|
3706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-array-for-each.md
|
|
3707
|
+
*/
|
|
3708
|
+
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
3709
|
+
/**
|
|
3710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-array-instanceof
|
|
3711
|
+
* @deprecated
|
|
3712
|
+
*/
|
|
3713
|
+
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
3714
|
+
/**
|
|
3715
|
+
* Disallow using the `this` argument in array methods.
|
|
3716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-array-method-this-argument.md
|
|
3717
|
+
*/
|
|
3718
|
+
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
3719
|
+
/**
|
|
3720
|
+
* Enforce combining multiple `Array#push()` into one call.
|
|
3721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-array-push-push.md
|
|
3722
|
+
*/
|
|
3723
|
+
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
3724
|
+
/**
|
|
3725
|
+
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
3726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-array-reduce.md
|
|
3727
|
+
*/
|
|
3728
|
+
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
3729
|
+
/**
|
|
3730
|
+
* Disallow member access from await expression.
|
|
3731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-await-expression-member.md
|
|
3732
|
+
*/
|
|
3733
|
+
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
3734
|
+
/**
|
|
3735
|
+
* Disallow using `await` in `Promise` method parameters.
|
|
3736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-await-in-promise-methods.md
|
|
3737
|
+
*/
|
|
3738
|
+
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3739
|
+
/**
|
|
3740
|
+
* Do not use leading/trailing space between `console.log` parameters.
|
|
3741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-console-spaces.md
|
|
3742
|
+
*/
|
|
3743
|
+
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
3744
|
+
/**
|
|
3745
|
+
* Do not use `document.cookie` directly.
|
|
3746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-document-cookie.md
|
|
3747
|
+
*/
|
|
3748
|
+
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
3749
|
+
/**
|
|
3750
|
+
* Disallow empty files.
|
|
3751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-empty-file.md
|
|
3752
|
+
*/
|
|
3753
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
3754
|
+
/**
|
|
3755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
3756
|
+
* @deprecated
|
|
3757
|
+
*/
|
|
3758
|
+
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
3759
|
+
/**
|
|
3760
|
+
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
3761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-for-loop.md
|
|
3762
|
+
*/
|
|
3763
|
+
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
3764
|
+
/**
|
|
3765
|
+
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
3766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-hex-escape.md
|
|
3767
|
+
*/
|
|
3768
|
+
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
3769
|
+
/**
|
|
3770
|
+
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
3771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-instanceof-array.md
|
|
3772
|
+
*/
|
|
3773
|
+
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
3774
|
+
/**
|
|
3775
|
+
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
3776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-invalid-fetch-options.md
|
|
3777
|
+
*/
|
|
3778
|
+
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
3779
|
+
/**
|
|
3780
|
+
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
3781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-invalid-remove-event-listener.md
|
|
3782
|
+
*/
|
|
3783
|
+
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
3784
|
+
/**
|
|
3785
|
+
* Disallow identifiers starting with `new` or `class`.
|
|
3786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-keyword-prefix.md
|
|
3787
|
+
*/
|
|
3788
|
+
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
3789
|
+
/**
|
|
3790
|
+
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
3791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-length-as-slice-end.md
|
|
3792
|
+
*/
|
|
3793
|
+
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
3794
|
+
/**
|
|
3795
|
+
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
3796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-lonely-if.md
|
|
3797
|
+
*/
|
|
3798
|
+
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
3799
|
+
/**
|
|
3800
|
+
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
3801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-magic-array-flat-depth.md
|
|
3802
|
+
*/
|
|
3803
|
+
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
3804
|
+
/**
|
|
3805
|
+
* Disallow negated conditions.
|
|
3806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-negated-condition.md
|
|
3807
|
+
*/
|
|
3808
|
+
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
3809
|
+
/**
|
|
3810
|
+
* Disallow negated expression in equality check.
|
|
3811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-negation-in-equality-check.md
|
|
3812
|
+
*/
|
|
3813
|
+
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
3814
|
+
/**
|
|
3815
|
+
* Disallow nested ternary expressions.
|
|
3816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-nested-ternary.md
|
|
3817
|
+
*/
|
|
3818
|
+
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
3819
|
+
/**
|
|
3820
|
+
* Disallow `new Array()`.
|
|
3821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-new-array.md
|
|
3822
|
+
*/
|
|
3823
|
+
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
3824
|
+
/**
|
|
3825
|
+
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
3826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-new-buffer.md
|
|
3827
|
+
*/
|
|
3828
|
+
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
3829
|
+
/**
|
|
3830
|
+
* Disallow the use of the `null` literal.
|
|
3831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-null.md
|
|
3832
|
+
*/
|
|
3833
|
+
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
3834
|
+
/**
|
|
3835
|
+
* Disallow the use of objects as default parameters.
|
|
3836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-object-as-default-parameter.md
|
|
3837
|
+
*/
|
|
3838
|
+
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
3839
|
+
/**
|
|
3840
|
+
* Disallow `process.exit()`.
|
|
3841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-process-exit.md
|
|
3842
|
+
*/
|
|
3843
|
+
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
3844
|
+
/**
|
|
3845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-reduce
|
|
3846
|
+
* @deprecated
|
|
3847
|
+
*/
|
|
3848
|
+
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
3849
|
+
/**
|
|
3850
|
+
* Disallow passing single-element arrays to `Promise` methods.
|
|
3851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-single-promise-in-promise-methods.md
|
|
3852
|
+
*/
|
|
3853
|
+
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3854
|
+
/**
|
|
3855
|
+
* Disallow classes that only have static members.
|
|
3856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-static-only-class.md
|
|
3857
|
+
*/
|
|
3858
|
+
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
3859
|
+
/**
|
|
3860
|
+
* Disallow `then` property.
|
|
3861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-thenable.md
|
|
3862
|
+
*/
|
|
3863
|
+
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
3864
|
+
/**
|
|
3865
|
+
* Disallow assigning `this` to a variable.
|
|
3866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-this-assignment.md
|
|
3867
|
+
*/
|
|
3868
|
+
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
3869
|
+
/**
|
|
3870
|
+
* Disallow comparing `undefined` using `typeof`.
|
|
3871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-typeof-undefined.md
|
|
3872
|
+
*/
|
|
3873
|
+
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
3874
|
+
/**
|
|
3875
|
+
* Disallow awaiting non-promise values.
|
|
3876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-unnecessary-await.md
|
|
3877
|
+
*/
|
|
3878
|
+
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
3879
|
+
/**
|
|
3880
|
+
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
3881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-unnecessary-polyfills.md
|
|
3882
|
+
*/
|
|
3883
|
+
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
3884
|
+
/**
|
|
3885
|
+
* Disallow unreadable array destructuring.
|
|
3886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-unreadable-array-destructuring.md
|
|
3887
|
+
*/
|
|
3888
|
+
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
3889
|
+
/**
|
|
3890
|
+
* Disallow unreadable IIFEs.
|
|
3891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-unreadable-iife.md
|
|
3892
|
+
*/
|
|
3893
|
+
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
3894
|
+
/**
|
|
3895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-unsafe-regex
|
|
3896
|
+
* @deprecated
|
|
3897
|
+
*/
|
|
3898
|
+
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
3899
|
+
/**
|
|
3900
|
+
* Disallow unused object properties.
|
|
3901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-unused-properties.md
|
|
3902
|
+
*/
|
|
3903
|
+
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
3904
|
+
/**
|
|
3905
|
+
* Disallow useless fallback when spreading in object literals.
|
|
3906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-useless-fallback-in-spread.md
|
|
3907
|
+
*/
|
|
3908
|
+
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
3909
|
+
/**
|
|
3910
|
+
* Disallow useless array length check.
|
|
3911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-useless-length-check.md
|
|
3912
|
+
*/
|
|
3913
|
+
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
3914
|
+
/**
|
|
3915
|
+
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
3916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-useless-promise-resolve-reject.md
|
|
3917
|
+
*/
|
|
3918
|
+
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
3919
|
+
/**
|
|
3920
|
+
* Disallow unnecessary spread.
|
|
3921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-useless-spread.md
|
|
3922
|
+
*/
|
|
3923
|
+
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
3924
|
+
/**
|
|
3925
|
+
* Disallow useless case in switch statements.
|
|
3926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-useless-switch-case.md
|
|
3927
|
+
*/
|
|
3928
|
+
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
3929
|
+
/**
|
|
3930
|
+
* Disallow useless `undefined`.
|
|
3931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-useless-undefined.md
|
|
3932
|
+
*/
|
|
3933
|
+
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
3934
|
+
/**
|
|
3935
|
+
* Disallow number literals with zero fractions or dangling dots.
|
|
3936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/no-zero-fractions.md
|
|
3937
|
+
*/
|
|
3938
|
+
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
3939
|
+
/**
|
|
3940
|
+
* Enforce proper case for numeric literals.
|
|
3941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/number-literal-case.md
|
|
3942
|
+
*/
|
|
3943
|
+
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
3944
|
+
/**
|
|
3945
|
+
* Enforce the style of numeric separators by correctly grouping digits.
|
|
3946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/numeric-separators-style.md
|
|
3947
|
+
*/
|
|
3948
|
+
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
3949
|
+
/**
|
|
3950
|
+
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
3951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-add-event-listener.md
|
|
3952
|
+
*/
|
|
3953
|
+
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
3954
|
+
/**
|
|
3955
|
+
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
3956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-array-find.md
|
|
3957
|
+
*/
|
|
3958
|
+
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
3959
|
+
/**
|
|
3960
|
+
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
3961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-array-flat.md
|
|
3962
|
+
*/
|
|
3963
|
+
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
3964
|
+
/**
|
|
3965
|
+
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
3966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-array-flat-map.md
|
|
3967
|
+
*/
|
|
3968
|
+
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
3969
|
+
/**
|
|
3970
|
+
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
3971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-array-index-of.md
|
|
3972
|
+
*/
|
|
3973
|
+
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
3974
|
+
/**
|
|
3975
|
+
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
3976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-array-some.md
|
|
3977
|
+
*/
|
|
3978
|
+
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
3979
|
+
/**
|
|
3980
|
+
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
3981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-at.md
|
|
3982
|
+
*/
|
|
3983
|
+
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
3984
|
+
/**
|
|
3985
|
+
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
3986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-blob-reading-methods.md
|
|
3987
|
+
*/
|
|
3988
|
+
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
3989
|
+
/**
|
|
3990
|
+
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
3991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-code-point.md
|
|
3992
|
+
*/
|
|
3993
|
+
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
3994
|
+
/**
|
|
3995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-dataset
|
|
3996
|
+
* @deprecated
|
|
3997
|
+
*/
|
|
3998
|
+
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
3999
|
+
/**
|
|
4000
|
+
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
4001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-date-now.md
|
|
4002
|
+
*/
|
|
4003
|
+
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
4004
|
+
/**
|
|
4005
|
+
* Prefer default parameters over reassignment.
|
|
4006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-default-parameters.md
|
|
4007
|
+
*/
|
|
4008
|
+
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
4009
|
+
/**
|
|
4010
|
+
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
4011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-dom-node-append.md
|
|
4012
|
+
*/
|
|
4013
|
+
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
4014
|
+
/**
|
|
4015
|
+
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
4016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-dom-node-dataset.md
|
|
4017
|
+
*/
|
|
4018
|
+
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
4019
|
+
/**
|
|
4020
|
+
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-dom-node-remove.md
|
|
4022
|
+
*/
|
|
4023
|
+
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
4024
|
+
/**
|
|
4025
|
+
* Prefer `.textContent` over `.innerText`.
|
|
4026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-dom-node-text-content.md
|
|
4027
|
+
*/
|
|
4028
|
+
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
4029
|
+
/**
|
|
4030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-event-key
|
|
4031
|
+
* @deprecated
|
|
4032
|
+
*/
|
|
4033
|
+
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
4034
|
+
/**
|
|
4035
|
+
* Prefer `EventTarget` over `EventEmitter`.
|
|
4036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-event-target.md
|
|
4037
|
+
*/
|
|
4038
|
+
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
4039
|
+
/**
|
|
4040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
4041
|
+
* @deprecated
|
|
4042
|
+
*/
|
|
4043
|
+
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
4044
|
+
/**
|
|
4045
|
+
* Prefer `export…from` when re-exporting.
|
|
4046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-export-from.md
|
|
4047
|
+
*/
|
|
4048
|
+
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
4049
|
+
/**
|
|
4050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-flat-map
|
|
4051
|
+
* @deprecated
|
|
4052
|
+
*/
|
|
4053
|
+
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
4054
|
+
/**
|
|
4055
|
+
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-global-this.md
|
|
4057
|
+
*/
|
|
4058
|
+
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
4059
|
+
/**
|
|
4060
|
+
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-includes.md
|
|
4062
|
+
*/
|
|
4063
|
+
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
4064
|
+
/**
|
|
4065
|
+
* Prefer reading a JSON file as a buffer.
|
|
4066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-json-parse-buffer.md
|
|
4067
|
+
*/
|
|
4068
|
+
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
4069
|
+
/**
|
|
4070
|
+
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
4071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-keyboard-event-key.md
|
|
4072
|
+
*/
|
|
4073
|
+
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
4074
|
+
/**
|
|
4075
|
+
* Prefer using a logical operator over a ternary.
|
|
4076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4077
|
+
*/
|
|
4078
|
+
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
4079
|
+
/**
|
|
4080
|
+
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-math-min-max.md
|
|
4082
|
+
*/
|
|
4083
|
+
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
4084
|
+
/**
|
|
4085
|
+
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
4086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-math-trunc.md
|
|
4087
|
+
*/
|
|
4088
|
+
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
4089
|
+
/**
|
|
4090
|
+
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
4091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-modern-dom-apis.md
|
|
4092
|
+
*/
|
|
4093
|
+
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
4094
|
+
/**
|
|
4095
|
+
* Prefer modern `Math` APIs over legacy patterns.
|
|
4096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-modern-math-apis.md
|
|
4097
|
+
*/
|
|
4098
|
+
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
4099
|
+
/**
|
|
4100
|
+
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-module.md
|
|
4102
|
+
*/
|
|
4103
|
+
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
4104
|
+
/**
|
|
4105
|
+
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-native-coercion-functions.md
|
|
4107
|
+
*/
|
|
4108
|
+
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
4109
|
+
/**
|
|
4110
|
+
* Prefer negative index over `.length - index` when possible.
|
|
4111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-negative-index.md
|
|
4112
|
+
*/
|
|
4113
|
+
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
4114
|
+
/**
|
|
4115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-append
|
|
4116
|
+
* @deprecated
|
|
4117
|
+
*/
|
|
4118
|
+
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
4119
|
+
/**
|
|
4120
|
+
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-node-protocol.md
|
|
4122
|
+
*/
|
|
4123
|
+
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
4124
|
+
/**
|
|
4125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-remove
|
|
4126
|
+
* @deprecated
|
|
4127
|
+
*/
|
|
4128
|
+
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
4129
|
+
/**
|
|
4130
|
+
* Prefer `Number` static properties over global ones.
|
|
4131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-number-properties.md
|
|
4132
|
+
*/
|
|
4133
|
+
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
4134
|
+
/**
|
|
4135
|
+
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-object-from-entries.md
|
|
4137
|
+
*/
|
|
4138
|
+
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
4139
|
+
/**
|
|
4140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-object-has-own
|
|
4141
|
+
* @deprecated
|
|
4142
|
+
*/
|
|
4143
|
+
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
4144
|
+
/**
|
|
4145
|
+
* Prefer omitting the `catch` binding parameter.
|
|
4146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-optional-catch-binding.md
|
|
4147
|
+
*/
|
|
4148
|
+
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
4149
|
+
/**
|
|
4150
|
+
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-prototype-methods.md
|
|
4152
|
+
*/
|
|
4153
|
+
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
4154
|
+
/**
|
|
4155
|
+
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-query-selector.md
|
|
4157
|
+
*/
|
|
4158
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
4159
|
+
/**
|
|
4160
|
+
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-reflect-apply.md
|
|
4162
|
+
*/
|
|
4163
|
+
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
4164
|
+
/**
|
|
4165
|
+
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-regexp-test.md
|
|
4167
|
+
*/
|
|
4168
|
+
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
4169
|
+
/**
|
|
4170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-replace-all
|
|
4171
|
+
* @deprecated
|
|
4172
|
+
*/
|
|
4173
|
+
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
4174
|
+
/**
|
|
4175
|
+
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-set-has.md
|
|
4177
|
+
*/
|
|
4178
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
4179
|
+
/**
|
|
4180
|
+
* Prefer using `Set#size` instead of `Array#length`.
|
|
4181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-set-size.md
|
|
4182
|
+
*/
|
|
4183
|
+
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
4184
|
+
/**
|
|
4185
|
+
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-spread.md
|
|
4187
|
+
*/
|
|
4188
|
+
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
4189
|
+
/**
|
|
4190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
4191
|
+
* @deprecated
|
|
4192
|
+
*/
|
|
4193
|
+
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4194
|
+
/**
|
|
4195
|
+
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-string-raw.md
|
|
4197
|
+
*/
|
|
4198
|
+
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
4199
|
+
/**
|
|
4200
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-string-replace-all.md
|
|
4202
|
+
*/
|
|
4203
|
+
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
4204
|
+
/**
|
|
4205
|
+
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-string-slice.md
|
|
4207
|
+
*/
|
|
4208
|
+
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
4209
|
+
/**
|
|
4210
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-string-starts-ends-with.md
|
|
4212
|
+
*/
|
|
4213
|
+
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4214
|
+
/**
|
|
4215
|
+
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-string-trim-start-end.md
|
|
4217
|
+
*/
|
|
4218
|
+
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4219
|
+
/**
|
|
4220
|
+
* Prefer using `structuredClone` to create a deep clone.
|
|
4221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-structured-clone.md
|
|
4222
|
+
*/
|
|
4223
|
+
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
4224
|
+
/**
|
|
4225
|
+
* Prefer `switch` over multiple `else-if`.
|
|
4226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-switch.md
|
|
4227
|
+
*/
|
|
4228
|
+
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
4229
|
+
/**
|
|
4230
|
+
* Prefer ternary expressions over simple `if-else` statements.
|
|
4231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-ternary.md
|
|
4232
|
+
*/
|
|
4233
|
+
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
4234
|
+
/**
|
|
4235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-text-content
|
|
4236
|
+
* @deprecated
|
|
4237
|
+
*/
|
|
4238
|
+
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
4239
|
+
/**
|
|
4240
|
+
* Prefer top-level await over top-level promises and async function calls.
|
|
4241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-top-level-await.md
|
|
4242
|
+
*/
|
|
4243
|
+
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
4244
|
+
/**
|
|
4245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-trim-start-end
|
|
4246
|
+
* @deprecated
|
|
4247
|
+
*/
|
|
4248
|
+
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4249
|
+
/**
|
|
4250
|
+
* Enforce throwing `TypeError` in type checking conditions.
|
|
4251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prefer-type-error.md
|
|
4252
|
+
*/
|
|
4253
|
+
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
4254
|
+
/**
|
|
4255
|
+
* Prevent abbreviations.
|
|
4256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/prevent-abbreviations.md
|
|
4257
|
+
*/
|
|
4258
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
4259
|
+
/**
|
|
4260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#regex-shorthand
|
|
4261
|
+
* @deprecated
|
|
4262
|
+
*/
|
|
4263
|
+
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
4264
|
+
/**
|
|
4265
|
+
* Enforce consistent relative URL style.
|
|
4266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/relative-url-style.md
|
|
4267
|
+
*/
|
|
4268
|
+
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
4269
|
+
/**
|
|
4270
|
+
* Enforce using the separator argument with `Array#join()`.
|
|
4271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/require-array-join-separator.md
|
|
4272
|
+
*/
|
|
4273
|
+
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
4274
|
+
/**
|
|
4275
|
+
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4277
|
+
*/
|
|
4278
|
+
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
4279
|
+
/**
|
|
4280
|
+
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/require-post-message-target-origin.md
|
|
4282
|
+
*/
|
|
4283
|
+
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
4284
|
+
/**
|
|
4285
|
+
* Enforce better string content.
|
|
4286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/string-content.md
|
|
4287
|
+
*/
|
|
4288
|
+
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
4289
|
+
/**
|
|
4290
|
+
* Enforce consistent brace style for `case` clauses.
|
|
4291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/switch-case-braces.md
|
|
4292
|
+
*/
|
|
4293
|
+
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
4294
|
+
/**
|
|
4295
|
+
* Fix whitespace-insensitive template indentation.
|
|
4296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/template-indent.md
|
|
4297
|
+
*/
|
|
4298
|
+
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
4299
|
+
/**
|
|
4300
|
+
* Enforce consistent case for text encoding identifiers.
|
|
4301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/text-encoding-identifier-case.md
|
|
4302
|
+
*/
|
|
4303
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
4304
|
+
/**
|
|
4305
|
+
* Require `new` when creating an error.
|
|
4306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/rules/throw-new-error.md
|
|
4307
|
+
*/
|
|
4308
|
+
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
3609
4309
|
/**
|
|
3610
4310
|
* Disallow unused variables
|
|
3611
4311
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
@@ -8490,6 +9190,204 @@ type TomlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
8490
9190
|
type TomlTableBracketSpacing = []|[("always" | "never")]
|
|
8491
9191
|
// ----- unicode-bom -----
|
|
8492
9192
|
type UnicodeBom = []|[("always" | "never")]
|
|
9193
|
+
// ----- unicorn/better-regex -----
|
|
9194
|
+
type UnicornBetterRegex = []|[{
|
|
9195
|
+
sortCharacterClasses?: boolean
|
|
9196
|
+
}]
|
|
9197
|
+
// ----- unicorn/catch-error-name -----
|
|
9198
|
+
type UnicornCatchErrorName = []|[{
|
|
9199
|
+
name?: string
|
|
9200
|
+
ignore?: unknown[]
|
|
9201
|
+
}]
|
|
9202
|
+
// ----- unicorn/consistent-function-scoping -----
|
|
9203
|
+
type UnicornConsistentFunctionScoping = []|[{
|
|
9204
|
+
checkArrowFunctions?: boolean
|
|
9205
|
+
}]
|
|
9206
|
+
// ----- unicorn/expiring-todo-comments -----
|
|
9207
|
+
type UnicornExpiringTodoComments = []|[{
|
|
9208
|
+
terms?: string[]
|
|
9209
|
+
ignore?: unknown[]
|
|
9210
|
+
ignoreDatesOnPullRequests?: boolean
|
|
9211
|
+
allowWarningComments?: boolean
|
|
9212
|
+
date?: string
|
|
9213
|
+
}]
|
|
9214
|
+
// ----- unicorn/explicit-length-check -----
|
|
9215
|
+
type UnicornExplicitLengthCheck = []|[{
|
|
9216
|
+
"non-zero"?: ("greater-than" | "not-equal")
|
|
9217
|
+
}]
|
|
9218
|
+
// ----- unicorn/filename-case -----
|
|
9219
|
+
type UnicornFilenameCase = []|[({
|
|
9220
|
+
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
|
|
9221
|
+
ignore?: unknown[]
|
|
9222
|
+
multipleFileExtensions?: boolean
|
|
9223
|
+
} | {
|
|
9224
|
+
cases?: {
|
|
9225
|
+
camelCase?: boolean
|
|
9226
|
+
snakeCase?: boolean
|
|
9227
|
+
kebabCase?: boolean
|
|
9228
|
+
pascalCase?: boolean
|
|
9229
|
+
}
|
|
9230
|
+
ignore?: unknown[]
|
|
9231
|
+
multipleFileExtensions?: boolean
|
|
9232
|
+
})]
|
|
9233
|
+
// ----- unicorn/import-style -----
|
|
9234
|
+
type UnicornImportStyle = []|[{
|
|
9235
|
+
checkImport?: boolean
|
|
9236
|
+
checkDynamicImport?: boolean
|
|
9237
|
+
checkExportFrom?: boolean
|
|
9238
|
+
checkRequire?: boolean
|
|
9239
|
+
extendDefaultStyles?: boolean
|
|
9240
|
+
styles?: _UnicornImportStyle_ModuleStyles
|
|
9241
|
+
}]
|
|
9242
|
+
type _UnicornImportStyleStyles = (false | _UnicornImportStyle_BooleanObject) | undefined
|
|
9243
|
+
interface _UnicornImportStyle_ModuleStyles {
|
|
9244
|
+
[k: string]: _UnicornImportStyleStyles | undefined
|
|
9245
|
+
}
|
|
9246
|
+
interface _UnicornImportStyle_BooleanObject {
|
|
9247
|
+
[k: string]: boolean | undefined
|
|
9248
|
+
}
|
|
9249
|
+
// ----- unicorn/no-array-push-push -----
|
|
9250
|
+
type UnicornNoArrayPushPush = []|[{
|
|
9251
|
+
ignore?: unknown[]
|
|
9252
|
+
}]
|
|
9253
|
+
// ----- unicorn/no-array-reduce -----
|
|
9254
|
+
type UnicornNoArrayReduce = []|[{
|
|
9255
|
+
allowSimpleOperations?: boolean
|
|
9256
|
+
}]
|
|
9257
|
+
// ----- unicorn/no-keyword-prefix -----
|
|
9258
|
+
type UnicornNoKeywordPrefix = []|[{
|
|
9259
|
+
|
|
9260
|
+
disallowedPrefixes?: []|[string]
|
|
9261
|
+
checkProperties?: boolean
|
|
9262
|
+
onlyCamelCase?: boolean
|
|
9263
|
+
}]
|
|
9264
|
+
// ----- unicorn/no-null -----
|
|
9265
|
+
type UnicornNoNull = []|[{
|
|
9266
|
+
checkStrictEquality?: boolean
|
|
9267
|
+
}]
|
|
9268
|
+
// ----- unicorn/no-typeof-undefined -----
|
|
9269
|
+
type UnicornNoTypeofUndefined = []|[{
|
|
9270
|
+
checkGlobalVariables?: boolean
|
|
9271
|
+
}]
|
|
9272
|
+
// ----- unicorn/no-unnecessary-polyfills -----
|
|
9273
|
+
type UnicornNoUnnecessaryPolyfills = []|[{
|
|
9274
|
+
targets: (string | unknown[] | {
|
|
9275
|
+
[k: string]: unknown | undefined
|
|
9276
|
+
})
|
|
9277
|
+
}]
|
|
9278
|
+
// ----- unicorn/no-useless-undefined -----
|
|
9279
|
+
type UnicornNoUselessUndefined = []|[{
|
|
9280
|
+
checkArguments?: boolean
|
|
9281
|
+
checkArrowFunctionBody?: boolean
|
|
9282
|
+
}]
|
|
9283
|
+
// ----- unicorn/numeric-separators-style -----
|
|
9284
|
+
type UnicornNumericSeparatorsStyle = []|[{
|
|
9285
|
+
binary?: {
|
|
9286
|
+
onlyIfContainsSeparator?: boolean
|
|
9287
|
+
minimumDigits?: number
|
|
9288
|
+
groupLength?: number
|
|
9289
|
+
}
|
|
9290
|
+
octal?: {
|
|
9291
|
+
onlyIfContainsSeparator?: boolean
|
|
9292
|
+
minimumDigits?: number
|
|
9293
|
+
groupLength?: number
|
|
9294
|
+
}
|
|
9295
|
+
hexadecimal?: {
|
|
9296
|
+
onlyIfContainsSeparator?: boolean
|
|
9297
|
+
minimumDigits?: number
|
|
9298
|
+
groupLength?: number
|
|
9299
|
+
}
|
|
9300
|
+
number?: {
|
|
9301
|
+
onlyIfContainsSeparator?: boolean
|
|
9302
|
+
minimumDigits?: number
|
|
9303
|
+
groupLength?: number
|
|
9304
|
+
}
|
|
9305
|
+
onlyIfContainsSeparator?: boolean
|
|
9306
|
+
}]
|
|
9307
|
+
// ----- unicorn/prefer-add-event-listener -----
|
|
9308
|
+
type UnicornPreferAddEventListener = []|[{
|
|
9309
|
+
excludedPackages?: string[]
|
|
9310
|
+
}]
|
|
9311
|
+
// ----- unicorn/prefer-array-find -----
|
|
9312
|
+
type UnicornPreferArrayFind = []|[{
|
|
9313
|
+
checkFromLast?: boolean
|
|
9314
|
+
}]
|
|
9315
|
+
// ----- unicorn/prefer-array-flat -----
|
|
9316
|
+
type UnicornPreferArrayFlat = []|[{
|
|
9317
|
+
functions?: unknown[]
|
|
9318
|
+
}]
|
|
9319
|
+
// ----- unicorn/prefer-at -----
|
|
9320
|
+
type UnicornPreferAt = []|[{
|
|
9321
|
+
getLastElementFunctions?: unknown[]
|
|
9322
|
+
checkAllIndexAccess?: boolean
|
|
9323
|
+
}]
|
|
9324
|
+
// ----- unicorn/prefer-export-from -----
|
|
9325
|
+
type UnicornPreferExportFrom = []|[{
|
|
9326
|
+
ignoreUsedVariables?: boolean
|
|
9327
|
+
}]
|
|
9328
|
+
// ----- unicorn/prefer-number-properties -----
|
|
9329
|
+
type UnicornPreferNumberProperties = []|[{
|
|
9330
|
+
checkInfinity?: boolean
|
|
9331
|
+
checkNaN?: boolean
|
|
9332
|
+
}]
|
|
9333
|
+
// ----- unicorn/prefer-object-from-entries -----
|
|
9334
|
+
type UnicornPreferObjectFromEntries = []|[{
|
|
9335
|
+
functions?: unknown[]
|
|
9336
|
+
}]
|
|
9337
|
+
// ----- unicorn/prefer-structured-clone -----
|
|
9338
|
+
type UnicornPreferStructuredClone = []|[{
|
|
9339
|
+
functions?: unknown[]
|
|
9340
|
+
}]
|
|
9341
|
+
// ----- unicorn/prefer-switch -----
|
|
9342
|
+
type UnicornPreferSwitch = []|[{
|
|
9343
|
+
minimumCases?: number
|
|
9344
|
+
emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
|
|
9345
|
+
}]
|
|
9346
|
+
// ----- unicorn/prefer-ternary -----
|
|
9347
|
+
type UnicornPreferTernary = []|[("always" | "only-single-line")]
|
|
9348
|
+
// ----- unicorn/prevent-abbreviations -----
|
|
9349
|
+
type UnicornPreventAbbreviations = []|[{
|
|
9350
|
+
checkProperties?: boolean
|
|
9351
|
+
checkVariables?: boolean
|
|
9352
|
+
checkDefaultAndNamespaceImports?: (boolean | string)
|
|
9353
|
+
checkShorthandImports?: (boolean | string)
|
|
9354
|
+
checkShorthandProperties?: boolean
|
|
9355
|
+
checkFilenames?: boolean
|
|
9356
|
+
extendDefaultReplacements?: boolean
|
|
9357
|
+
replacements?: _UnicornPreventAbbreviations_Abbreviations
|
|
9358
|
+
extendDefaultAllowList?: boolean
|
|
9359
|
+
allowList?: _UnicornPreventAbbreviations_BooleanObject
|
|
9360
|
+
ignore?: unknown[]
|
|
9361
|
+
}]
|
|
9362
|
+
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
|
|
9363
|
+
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
9364
|
+
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined
|
|
9365
|
+
}
|
|
9366
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
9367
|
+
[k: string]: boolean | undefined
|
|
9368
|
+
}
|
|
9369
|
+
// ----- unicorn/relative-url-style -----
|
|
9370
|
+
type UnicornRelativeUrlStyle = []|[("never" | "always")]
|
|
9371
|
+
// ----- unicorn/string-content -----
|
|
9372
|
+
type UnicornStringContent = []|[{
|
|
9373
|
+
patterns?: {
|
|
9374
|
+
[k: string]: (string | {
|
|
9375
|
+
suggest: string
|
|
9376
|
+
fix?: boolean
|
|
9377
|
+
message?: string
|
|
9378
|
+
}) | undefined
|
|
9379
|
+
}
|
|
9380
|
+
}]
|
|
9381
|
+
// ----- unicorn/switch-case-braces -----
|
|
9382
|
+
type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
|
|
9383
|
+
// ----- unicorn/template-indent -----
|
|
9384
|
+
type UnicornTemplateIndent = []|[{
|
|
9385
|
+
indent?: (string | number)
|
|
9386
|
+
tags?: string[]
|
|
9387
|
+
functions?: string[]
|
|
9388
|
+
selectors?: string[]
|
|
9389
|
+
comments?: string[]
|
|
9390
|
+
}]
|
|
8493
9391
|
// ----- unused-imports/no-unused-imports -----
|
|
8494
9392
|
type UnusedImportsNoUnusedImports = []|[(("all" | "local") | {
|
|
8495
9393
|
|
|
@@ -8898,12 +9796,14 @@ type ConfigNames =
|
|
|
8898
9796
|
| '@bfra.me/ignores'
|
|
8899
9797
|
| '@bfra.me/javascript/options'
|
|
8900
9798
|
| '@bfra.me/javascript/rules'
|
|
9799
|
+
| '@bfra.me/jsx'
|
|
8901
9800
|
| '@bfra.me/eslint-comments/rules'
|
|
8902
9801
|
| '@bfra.me/jsdoc'
|
|
8903
9802
|
| '@bfra.me/imports'
|
|
8904
9803
|
| '@bfra.me/command'
|
|
8905
9804
|
| '@bfra.me/prettier'
|
|
8906
9805
|
| '@bfra.me/perfectionist'
|
|
9806
|
+
| '@bfra.me/unicorn'
|
|
8907
9807
|
| '@bfra.me/typescript/plugins'
|
|
8908
9808
|
| '@bfra.me/typescript/parser'
|
|
8909
9809
|
| '@bfra.me/typescript/type-aware-parser'
|
|
@@ -9776,6 +10676,12 @@ type Options = Flatten<{
|
|
|
9776
10676
|
* Options to override the behavior of linting JSON, JSON5 and JSONC files.
|
|
9777
10677
|
*/
|
|
9778
10678
|
jsonc?: boolean | OptionsOverrides;
|
|
10679
|
+
/**
|
|
10680
|
+
* Options to override the behavior of linting JSX files.
|
|
10681
|
+
*
|
|
10682
|
+
* @default true
|
|
10683
|
+
*/
|
|
10684
|
+
jsx?: boolean;
|
|
9779
10685
|
/**
|
|
9780
10686
|
* Options to override the behavior of linting Markdown files.
|
|
9781
10687
|
*/
|
|
@@ -9804,6 +10710,12 @@ type Options = Flatten<{
|
|
|
9804
10710
|
* @default auto-detect based on the dependencies
|
|
9805
10711
|
*/
|
|
9806
10712
|
typescript?: OptionsTypeScript | boolean;
|
|
10713
|
+
/**
|
|
10714
|
+
* Enable or override unicorn rules.
|
|
10715
|
+
*
|
|
10716
|
+
* @default true
|
|
10717
|
+
*/
|
|
10718
|
+
unicorn?: boolean | OptionsOverrides;
|
|
9807
10719
|
/**
|
|
9808
10720
|
* Enable support for vitest.
|
|
9809
10721
|
*
|
|
@@ -9820,9 +10732,10 @@ type Options = Flatten<{
|
|
|
9820
10732
|
|
|
9821
10733
|
/**
|
|
9822
10734
|
* Represents the options for configuring the JavaScript ESLint configuration.
|
|
9823
|
-
* This type is a combination of the {@link OptionsIsInEditor} and {@link OptionsOverrides} types.
|
|
9824
10735
|
*/
|
|
9825
|
-
type JavaScriptOptions = Flatten<OptionsIsInEditor & OptionsOverrides
|
|
10736
|
+
type JavaScriptOptions = Flatten<OptionsIsInEditor & OptionsOverrides & {
|
|
10737
|
+
jsx?: boolean;
|
|
10738
|
+
}>;
|
|
9826
10739
|
/**
|
|
9827
10740
|
* Configures the JavaScript ESLint configuration with the specified options.
|
|
9828
10741
|
*
|
|
@@ -9923,6 +10836,9 @@ type TypeScriptOptions = Flatten<OptionsFiles & OptionsOverrides & OptionsTypeSc
|
|
|
9923
10836
|
*/
|
|
9924
10837
|
declare function typescript(options?: TypeScriptOptions): Promise<Config$1[]>;
|
|
9925
10838
|
|
|
10839
|
+
type UnicornOptions = OptionsOverrides;
|
|
10840
|
+
declare function unicorn(options?: UnicornOptions): Promise<Config$1[]>;
|
|
10841
|
+
|
|
9926
10842
|
/**
|
|
9927
10843
|
* Represents the options for the Vitest ESLint configuration.
|
|
9928
10844
|
* This type is a flattened union of the {@link OptionsFiles}, {@link OptionsIsInEditor}, and {@link OptionsOverrides} types.
|
|
@@ -9987,6 +10903,7 @@ declare const isInEditor: boolean;
|
|
|
9987
10903
|
|
|
9988
10904
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
9989
10905
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
10906
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
9990
10907
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
9991
10908
|
declare const GLOB_TSX = "**/*.tsx";
|
|
9992
10909
|
declare const GLOB_JSON = "**/*.json";
|
|
@@ -10002,4 +10919,4 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
10002
10919
|
|
|
10003
10920
|
declare const config: ConfigComposer;
|
|
10004
10921
|
|
|
10005
|
-
export { type AwaitableFlatConfig, type Config$1 as Config, type ConfigComposer, type ConfigNames, type Flatten, GLOB_EXCLUDE, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SRC, GLOB_SRC_EXT, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, type JavaScriptOptions, type JsoncOptions, type MarkdownOptions, type Options, type OptionsFiles, type OptionsIsInEditor, type OptionsOverrides, type OptionsPerfectionist, type OptionsPrettier, type OptionsTypeScript, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type PerfectionistOptions, type PrettierOptions, type RegexpOptions, type Rules, type TomlOptions, type TypeScriptOptions, type VitestOptions, type YamlOptions, command, composeConfig, config, config as default, defineConfig, epilogue, eslintComments, ignores, imports, isInEditor, isInGitLifecycle, javascript, jsdoc, jsonc, markdown, perfectionist, prettier, regexp, toml, typescript, vitest, yaml };
|
|
10922
|
+
export { type AwaitableFlatConfig, type Config$1 as Config, type ConfigComposer, type ConfigNames, type Flatten, GLOB_EXCLUDE, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SRC, GLOB_SRC_EXT, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, type JavaScriptOptions, type JsoncOptions, type MarkdownOptions, type Options, type OptionsFiles, type OptionsIsInEditor, type OptionsOverrides, type OptionsPerfectionist, type OptionsPrettier, type OptionsTypeScript, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type PerfectionistOptions, type PrettierOptions, type RegexpOptions, type Rules, type TomlOptions, type TypeScriptOptions, type UnicornOptions, type VitestOptions, type YamlOptions, command, composeConfig, config, config as default, defineConfig, epilogue, eslintComments, ignores, imports, isInEditor, isInGitLifecycle, javascript, jsdoc, jsonc, markdown, perfectionist, prettier, regexp, toml, typescript, unicorn, vitest, yaml };
|