@anolilab/eslint-config 16.2.24 → 16.2.26
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +362 -143
- package/dist/index.d.mts +362 -143
- package/dist/index.d.ts +362 -143
- package/dist/index.mjs +11 -11
- package/package.json +16 -12
package/dist/index.d.mts
CHANGED
|
@@ -1811,7 +1811,7 @@ interface RuleOptions {
|
|
|
1811
1811
|
* Reports invalid alignment of JSDoc block asterisks.
|
|
1812
1812
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
|
|
1813
1813
|
*/
|
|
1814
|
-
'jsdoc/check-alignment'?: Linter.RuleEntry<
|
|
1814
|
+
'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>
|
|
1815
1815
|
/**
|
|
1816
1816
|
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
|
|
1817
1817
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
|
|
@@ -2082,6 +2082,11 @@ interface RuleOptions {
|
|
|
2082
2082
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
2083
2083
|
*/
|
|
2084
2084
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>
|
|
2085
|
+
/**
|
|
2086
|
+
* Formats JSDoc type values.
|
|
2087
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
2088
|
+
*/
|
|
2089
|
+
'jsdoc/type-formatting'?: Linter.RuleEntry<JsdocTypeFormatting>
|
|
2085
2090
|
/**
|
|
2086
2091
|
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
|
|
2087
2092
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
@@ -2935,6 +2940,11 @@ interface RuleOptions {
|
|
|
2935
2940
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
|
|
2936
2941
|
*/
|
|
2937
2942
|
'playwright/expect-expect'?: Linter.RuleEntry<PlaywrightExpectExpect>
|
|
2943
|
+
/**
|
|
2944
|
+
* Enforces a maximum number assertion calls in a test body
|
|
2945
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
|
|
2946
|
+
*/
|
|
2947
|
+
'playwright/max-expects'?: Linter.RuleEntry<PlaywrightMaxExpects>
|
|
2938
2948
|
/**
|
|
2939
2949
|
* Enforces a maximum depth to nested describe calls
|
|
2940
2950
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
|
|
@@ -2942,13 +2952,29 @@ interface RuleOptions {
|
|
|
2942
2952
|
'playwright/max-nested-describe'?: Linter.RuleEntry<PlaywrightMaxNestedDescribe>
|
|
2943
2953
|
/**
|
|
2944
2954
|
* Identify false positives when async Playwright APIs are not properly awaited.
|
|
2955
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
|
|
2945
2956
|
*/
|
|
2946
2957
|
'playwright/missing-playwright-await'?: Linter.RuleEntry<PlaywrightMissingPlaywrightAwait>
|
|
2958
|
+
/**
|
|
2959
|
+
* Disallow commented out tests
|
|
2960
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
|
|
2961
|
+
*/
|
|
2962
|
+
'playwright/no-commented-out-tests'?: Linter.RuleEntry<[]>
|
|
2963
|
+
/**
|
|
2964
|
+
* Disallow calling `expect` conditionally
|
|
2965
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
|
|
2966
|
+
*/
|
|
2967
|
+
'playwright/no-conditional-expect'?: Linter.RuleEntry<[]>
|
|
2947
2968
|
/**
|
|
2948
2969
|
* Disallow conditional logic in tests
|
|
2949
2970
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
|
|
2950
2971
|
*/
|
|
2951
2972
|
'playwright/no-conditional-in-test'?: Linter.RuleEntry<[]>
|
|
2973
|
+
/**
|
|
2974
|
+
* Disallow duplicate setup and teardown hooks
|
|
2975
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
|
|
2976
|
+
*/
|
|
2977
|
+
'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>
|
|
2952
2978
|
/**
|
|
2953
2979
|
* The use of ElementHandle is discouraged, use Locator instead
|
|
2954
2980
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
|
|
@@ -2969,6 +2995,16 @@ interface RuleOptions {
|
|
|
2969
2995
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
|
|
2970
2996
|
*/
|
|
2971
2997
|
'playwright/no-force-option'?: Linter.RuleEntry<[]>
|
|
2998
|
+
/**
|
|
2999
|
+
* Disallows the usage of getByTitle()
|
|
3000
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
|
|
3001
|
+
*/
|
|
3002
|
+
'playwright/no-get-by-title'?: Linter.RuleEntry<[]>
|
|
3003
|
+
/**
|
|
3004
|
+
* Disallow setup and teardown hooks
|
|
3005
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
|
|
3006
|
+
*/
|
|
3007
|
+
'playwright/no-hooks'?: Linter.RuleEntry<PlaywrightNoHooks>
|
|
2972
3008
|
/**
|
|
2973
3009
|
* Disallow nested `test.step()` methods
|
|
2974
3010
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
|
|
@@ -2976,6 +3012,7 @@ interface RuleOptions {
|
|
|
2976
3012
|
'playwright/no-nested-step'?: Linter.RuleEntry<[]>
|
|
2977
3013
|
/**
|
|
2978
3014
|
* Prevent usage of the networkidle option
|
|
3015
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
|
|
2979
3016
|
*/
|
|
2980
3017
|
'playwright/no-networkidle'?: Linter.RuleEntry<[]>
|
|
2981
3018
|
/**
|
|
@@ -2985,13 +3022,14 @@ interface RuleOptions {
|
|
|
2985
3022
|
'playwright/no-nth-methods'?: Linter.RuleEntry<[]>
|
|
2986
3023
|
/**
|
|
2987
3024
|
* Prevent usage of page.pause()
|
|
3025
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
|
|
2988
3026
|
*/
|
|
2989
3027
|
'playwright/no-page-pause'?: Linter.RuleEntry<[]>
|
|
2990
3028
|
/**
|
|
2991
3029
|
* Disallows the usage of raw locators
|
|
2992
3030
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
|
|
2993
3031
|
*/
|
|
2994
|
-
'playwright/no-raw-locators'?: Linter.RuleEntry<
|
|
3032
|
+
'playwright/no-raw-locators'?: Linter.RuleEntry<PlaywrightNoRawLocators>
|
|
2995
3033
|
/**
|
|
2996
3034
|
* Disallow specific matchers & modifiers
|
|
2997
3035
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
|
|
@@ -3002,8 +3040,24 @@ interface RuleOptions {
|
|
|
3002
3040
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
|
|
3003
3041
|
*/
|
|
3004
3042
|
'playwright/no-skipped-test'?: Linter.RuleEntry<PlaywrightNoSkippedTest>
|
|
3043
|
+
/**
|
|
3044
|
+
* Prevent usage of the `.slow()` slow test annotation.
|
|
3045
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
|
|
3046
|
+
*/
|
|
3047
|
+
'playwright/no-slowed-test'?: Linter.RuleEntry<PlaywrightNoSlowedTest>
|
|
3048
|
+
/**
|
|
3049
|
+
* Disallow using `expect` outside of `test` blocks
|
|
3050
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
|
|
3051
|
+
*/
|
|
3052
|
+
'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>
|
|
3053
|
+
/**
|
|
3054
|
+
* Prevent unsafe variable references in page.evaluate() and page.addInitScript()
|
|
3055
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
|
|
3056
|
+
*/
|
|
3057
|
+
'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>
|
|
3005
3058
|
/**
|
|
3006
3059
|
* Disallow unnecessary awaits for Playwright methods
|
|
3060
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
|
|
3007
3061
|
*/
|
|
3008
3062
|
'playwright/no-useless-await'?: Linter.RuleEntry<[]>
|
|
3009
3063
|
/**
|
|
@@ -3011,16 +3065,56 @@ interface RuleOptions {
|
|
|
3011
3065
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
|
|
3012
3066
|
*/
|
|
3013
3067
|
'playwright/no-useless-not'?: Linter.RuleEntry<[]>
|
|
3068
|
+
/**
|
|
3069
|
+
* Prevent usage of page.waitForNavigation()
|
|
3070
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
|
|
3071
|
+
*/
|
|
3072
|
+
'playwright/no-wait-for-navigation'?: Linter.RuleEntry<[]>
|
|
3073
|
+
/**
|
|
3074
|
+
* Prevent usage of page.waitForSelector()
|
|
3075
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
|
|
3076
|
+
*/
|
|
3077
|
+
'playwright/no-wait-for-selector'?: Linter.RuleEntry<[]>
|
|
3014
3078
|
/**
|
|
3015
3079
|
* Prevent usage of page.waitForTimeout()
|
|
3016
3080
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
|
|
3017
3081
|
*/
|
|
3018
3082
|
'playwright/no-wait-for-timeout'?: Linter.RuleEntry<[]>
|
|
3083
|
+
/**
|
|
3084
|
+
* Suggest using the built-in comparison matchers
|
|
3085
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
|
|
3086
|
+
*/
|
|
3087
|
+
'playwright/prefer-comparison-matcher'?: Linter.RuleEntry<[]>
|
|
3088
|
+
/**
|
|
3089
|
+
* Suggest using the built-in equality matchers
|
|
3090
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
|
|
3091
|
+
*/
|
|
3092
|
+
'playwright/prefer-equality-matcher'?: Linter.RuleEntry<[]>
|
|
3093
|
+
/**
|
|
3094
|
+
* Prefer having hooks in a consistent order
|
|
3095
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
|
|
3096
|
+
*/
|
|
3097
|
+
'playwright/prefer-hooks-in-order'?: Linter.RuleEntry<[]>
|
|
3098
|
+
/**
|
|
3099
|
+
* Suggest having hooks before any test cases
|
|
3100
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
|
|
3101
|
+
*/
|
|
3102
|
+
'playwright/prefer-hooks-on-top'?: Linter.RuleEntry<[]>
|
|
3103
|
+
/**
|
|
3104
|
+
* Suggest locators over page methods
|
|
3105
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
|
|
3106
|
+
*/
|
|
3107
|
+
'playwright/prefer-locator'?: Linter.RuleEntry<[]>
|
|
3019
3108
|
/**
|
|
3020
3109
|
* Enforce lowercase test names
|
|
3021
3110
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
|
|
3022
3111
|
*/
|
|
3023
3112
|
'playwright/prefer-lowercase-title'?: Linter.RuleEntry<PlaywrightPreferLowercaseTitle>
|
|
3113
|
+
/**
|
|
3114
|
+
* Prefer native locator functions
|
|
3115
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
|
|
3116
|
+
*/
|
|
3117
|
+
'playwright/prefer-native-locators'?: Linter.RuleEntry<PlaywrightPreferNativeLocators>
|
|
3024
3118
|
/**
|
|
3025
3119
|
* Suggest using `toStrictEqual()`
|
|
3026
3120
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
|
|
@@ -3051,21 +3145,50 @@ interface RuleOptions {
|
|
|
3051
3145
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
|
|
3052
3146
|
*/
|
|
3053
3147
|
'playwright/prefer-web-first-assertions'?: Linter.RuleEntry<[]>
|
|
3148
|
+
/**
|
|
3149
|
+
* Require setup and teardown code to be within a hook
|
|
3150
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
|
|
3151
|
+
*/
|
|
3152
|
+
'playwright/require-hook'?: Linter.RuleEntry<PlaywrightRequireHook>
|
|
3054
3153
|
/**
|
|
3055
3154
|
* Require all assertions to use `expect.soft`
|
|
3056
3155
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
|
|
3057
3156
|
*/
|
|
3058
3157
|
'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>
|
|
3158
|
+
/**
|
|
3159
|
+
* Require a message for `toThrow()`
|
|
3160
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
|
|
3161
|
+
*/
|
|
3162
|
+
'playwright/require-to-throw-message'?: Linter.RuleEntry<[]>
|
|
3059
3163
|
/**
|
|
3060
3164
|
* Require test cases and hooks to be inside a `test.describe` block
|
|
3061
3165
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
|
|
3062
3166
|
*/
|
|
3063
3167
|
'playwright/require-top-level-describe'?: Linter.RuleEntry<PlaywrightRequireTopLevelDescribe>
|
|
3168
|
+
/**
|
|
3169
|
+
* Enforce valid `describe()` callback
|
|
3170
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
|
|
3171
|
+
*/
|
|
3172
|
+
'playwright/valid-describe-callback'?: Linter.RuleEntry<[]>
|
|
3064
3173
|
/**
|
|
3065
3174
|
* Enforce valid `expect()` usage
|
|
3066
3175
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
|
|
3067
3176
|
*/
|
|
3068
3177
|
'playwright/valid-expect'?: Linter.RuleEntry<PlaywrightValidExpect>
|
|
3178
|
+
/**
|
|
3179
|
+
* Require promises that have expectations in their chain to be valid
|
|
3180
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
|
|
3181
|
+
*/
|
|
3182
|
+
'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>
|
|
3183
|
+
/**
|
|
3184
|
+
* Enforce valid tag format in Playwright test blocks
|
|
3185
|
+
*/
|
|
3186
|
+
'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>
|
|
3187
|
+
/**
|
|
3188
|
+
* Enforce valid titles
|
|
3189
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
|
|
3190
|
+
*/
|
|
3191
|
+
'playwright/valid-title'?: Linter.RuleEntry<PlaywrightValidTitle>
|
|
3069
3192
|
/**
|
|
3070
3193
|
* Require returning inside each `then()` to create readable and reusable Promise chains.
|
|
3071
3194
|
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md
|
|
@@ -3678,6 +3801,11 @@ interface RuleOptions {
|
|
|
3678
3801
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3679
3802
|
*/
|
|
3680
3803
|
'react-x/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3804
|
+
/**
|
|
3805
|
+
* Disallow adjusting state in an effect when a prop changes.
|
|
3806
|
+
* @see https://react.dev/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
|
|
3807
|
+
*/
|
|
3808
|
+
'react-you-might-not-need-an-effect/no-adjust-state-on-prop-change'?: Linter.RuleEntry<[]>
|
|
3681
3809
|
/**
|
|
3682
3810
|
* Disallow chaining state changes in an effect.
|
|
3683
3811
|
* @see https://react.dev/learn/you-might-not-need-an-effect#chains-of-computations
|
|
@@ -3689,7 +3817,7 @@ interface RuleOptions {
|
|
|
3689
3817
|
*/
|
|
3690
3818
|
'react-you-might-not-need-an-effect/no-derived-state'?: Linter.RuleEntry<[]>
|
|
3691
3819
|
/**
|
|
3692
|
-
* Disallow empty
|
|
3820
|
+
* Disallow empty effects.
|
|
3693
3821
|
*/
|
|
3694
3822
|
'react-you-might-not-need-an-effect/no-empty-effect'?: Linter.RuleEntry<[]>
|
|
3695
3823
|
/**
|
|
@@ -3719,7 +3847,7 @@ interface RuleOptions {
|
|
|
3719
3847
|
* Disallow resetting all state in an effect when a prop changes.
|
|
3720
3848
|
* @see https://react.dev/learn/you-might-not-need-an-effect#resetting-all-state-when-a-prop-changes
|
|
3721
3849
|
*/
|
|
3722
|
-
'react-you-might-not-need-an-effect/no-reset-all-state-
|
|
3850
|
+
'react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change'?: Linter.RuleEntry<[]>
|
|
3723
3851
|
/**
|
|
3724
3852
|
* Enforces consistent naming for boolean props
|
|
3725
3853
|
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
|
|
@@ -6383,690 +6511,710 @@ interface RuleOptions {
|
|
|
6383
6511
|
'tsdoc/syntax'?: Linter.RuleEntry<[]>
|
|
6384
6512
|
/**
|
|
6385
6513
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
|
|
6387
6515
|
*/
|
|
6388
6516
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
6389
6517
|
/**
|
|
6390
6518
|
* Enforce a specific parameter name in catch clauses.
|
|
6391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
|
|
6392
6520
|
*/
|
|
6393
6521
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
6394
6522
|
/**
|
|
6395
6523
|
* Enforce consistent assertion style with `node:assert`.
|
|
6396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
|
|
6397
6525
|
*/
|
|
6398
6526
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
6399
6527
|
/**
|
|
6400
6528
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
|
|
6402
6530
|
*/
|
|
6403
6531
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
6404
6532
|
/**
|
|
6405
6533
|
* Use destructured variables over properties.
|
|
6406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
|
|
6407
6535
|
*/
|
|
6408
6536
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
6409
6537
|
/**
|
|
6410
6538
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
|
|
6412
6540
|
*/
|
|
6413
6541
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
6414
6542
|
/**
|
|
6415
6543
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
|
|
6417
6545
|
*/
|
|
6418
6546
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
6419
6547
|
/**
|
|
6420
6548
|
* Move function definitions to the highest possible scope.
|
|
6421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
|
|
6422
6550
|
*/
|
|
6423
6551
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
6424
6552
|
/**
|
|
6425
6553
|
* Enforce correct `Error` subclassing.
|
|
6426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
|
|
6427
6555
|
*/
|
|
6428
6556
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
6429
6557
|
/**
|
|
6430
6558
|
* Enforce no spaces between braces.
|
|
6431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
|
|
6432
6560
|
*/
|
|
6433
6561
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
6434
6562
|
/**
|
|
6435
6563
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
|
|
6437
6565
|
*/
|
|
6438
6566
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
6439
6567
|
/**
|
|
6440
6568
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
|
|
6442
6570
|
*/
|
|
6443
6571
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
6444
6572
|
/**
|
|
6445
6573
|
* Add expiration conditions to TODO comments.
|
|
6446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
|
|
6447
6575
|
*/
|
|
6448
6576
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
6449
6577
|
/**
|
|
6450
6578
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
|
|
6452
6580
|
*/
|
|
6453
6581
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
6454
6582
|
/**
|
|
6455
6583
|
* Enforce a case style for filenames.
|
|
6456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
|
|
6457
6585
|
*/
|
|
6458
6586
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
6459
6587
|
/**
|
|
6460
6588
|
* Enforce specific import styles per module.
|
|
6461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
|
|
6462
6590
|
*/
|
|
6463
6591
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
6464
6592
|
/**
|
|
6465
6593
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
|
|
6467
6595
|
*/
|
|
6468
6596
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
6469
6597
|
/**
|
|
6470
6598
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
|
|
6472
6600
|
*/
|
|
6473
6601
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
6474
6602
|
/**
|
|
6475
6603
|
* Disallow recursive access to `this` within getters and setters.
|
|
6476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
|
|
6477
6605
|
*/
|
|
6478
6606
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
6479
6607
|
/**
|
|
6480
6608
|
* Disallow anonymous functions and classes as the default export.
|
|
6481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
|
|
6482
6610
|
*/
|
|
6483
6611
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
6484
6612
|
/**
|
|
6485
6613
|
* Prevent passing a function reference directly to iterator methods.
|
|
6486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
|
|
6487
6615
|
*/
|
|
6488
6616
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
6489
6617
|
/**
|
|
6490
6618
|
* Prefer `for…of` over the `forEach` method.
|
|
6491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
|
|
6492
6620
|
*/
|
|
6493
6621
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
6494
6622
|
/**
|
|
6495
6623
|
* Disallow using the `this` argument in array methods.
|
|
6496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
|
|
6497
6625
|
*/
|
|
6498
6626
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
6499
6627
|
/**
|
|
6500
6628
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
|
|
6502
6630
|
* @deprecated
|
|
6503
6631
|
*/
|
|
6504
6632
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
6505
6633
|
/**
|
|
6506
6634
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
|
|
6508
6636
|
*/
|
|
6509
6637
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
6510
6638
|
/**
|
|
6511
6639
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
|
|
6513
6641
|
*/
|
|
6514
6642
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
6643
|
+
/**
|
|
6644
|
+
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
|
|
6646
|
+
*/
|
|
6647
|
+
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
6515
6648
|
/**
|
|
6516
6649
|
* Disallow member access from await expression.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
|
|
6518
6651
|
*/
|
|
6519
6652
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
6520
6653
|
/**
|
|
6521
6654
|
* Disallow using `await` in `Promise` method parameters.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
|
|
6523
6656
|
*/
|
|
6524
6657
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6525
6658
|
/**
|
|
6526
6659
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
|
|
6528
6661
|
*/
|
|
6529
6662
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
6530
6663
|
/**
|
|
6531
6664
|
* Do not use `document.cookie` directly.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
|
|
6533
6666
|
*/
|
|
6534
6667
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
6535
6668
|
/**
|
|
6536
6669
|
* Disallow empty files.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
|
|
6538
6671
|
*/
|
|
6539
6672
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
6540
6673
|
/**
|
|
6541
6674
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
|
|
6543
6676
|
*/
|
|
6544
6677
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
6545
6678
|
/**
|
|
6546
6679
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
|
|
6548
6681
|
*/
|
|
6549
6682
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
6550
6683
|
/**
|
|
6551
6684
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
|
|
6553
6686
|
* @deprecated
|
|
6554
6687
|
*/
|
|
6555
6688
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
6556
6689
|
/**
|
|
6557
6690
|
* Disallow `instanceof` with built-in objects
|
|
6558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
|
|
6559
6692
|
*/
|
|
6560
6693
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
6561
6694
|
/**
|
|
6562
6695
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
|
|
6564
6697
|
*/
|
|
6565
6698
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
6566
6699
|
/**
|
|
6567
6700
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
|
|
6569
6702
|
*/
|
|
6570
6703
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
6571
6704
|
/**
|
|
6572
6705
|
* Disallow identifiers starting with `new` or `class`.
|
|
6573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
|
|
6574
6707
|
*/
|
|
6575
6708
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
6576
6709
|
/**
|
|
6577
6710
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6579
6712
|
* @deprecated
|
|
6580
6713
|
*/
|
|
6581
6714
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
6582
6715
|
/**
|
|
6583
6716
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
|
|
6585
6718
|
*/
|
|
6586
6719
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
6587
6720
|
/**
|
|
6588
6721
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
|
|
6590
6723
|
*/
|
|
6591
6724
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6592
6725
|
/**
|
|
6593
6726
|
* Disallow named usage of default import and export.
|
|
6594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
|
|
6595
6728
|
*/
|
|
6596
6729
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
6597
6730
|
/**
|
|
6598
6731
|
* Disallow negated conditions.
|
|
6599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
|
|
6600
6733
|
*/
|
|
6601
6734
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
6602
6735
|
/**
|
|
6603
6736
|
* Disallow negated expression in equality check.
|
|
6604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
|
|
6605
6738
|
*/
|
|
6606
6739
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
6607
6740
|
/**
|
|
6608
6741
|
* Disallow nested ternary expressions.
|
|
6609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
|
|
6610
6743
|
*/
|
|
6611
6744
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
6612
6745
|
/**
|
|
6613
6746
|
* Disallow `new Array()`.
|
|
6614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
|
|
6615
6748
|
*/
|
|
6616
6749
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
6617
6750
|
/**
|
|
6618
6751
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
|
|
6620
6753
|
*/
|
|
6621
6754
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
6622
6755
|
/**
|
|
6623
6756
|
* Disallow the use of the `null` literal.
|
|
6624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
|
|
6625
6758
|
*/
|
|
6626
6759
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
6627
6760
|
/**
|
|
6628
6761
|
* Disallow the use of objects as default parameters.
|
|
6629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
|
|
6630
6763
|
*/
|
|
6631
6764
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
6632
6765
|
/**
|
|
6633
6766
|
* Disallow `process.exit()`.
|
|
6634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
|
|
6635
6768
|
*/
|
|
6636
6769
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
6637
6770
|
/**
|
|
6638
6771
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
|
|
6640
6773
|
*/
|
|
6641
6774
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6642
6775
|
/**
|
|
6643
6776
|
* Disallow classes that only have static members.
|
|
6644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
|
|
6645
6778
|
*/
|
|
6646
6779
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
6647
6780
|
/**
|
|
6648
6781
|
* Disallow `then` property.
|
|
6649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
|
|
6650
6783
|
*/
|
|
6651
6784
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
6652
6785
|
/**
|
|
6653
6786
|
* Disallow assigning `this` to a variable.
|
|
6654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
|
|
6655
6788
|
*/
|
|
6656
6789
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
6657
6790
|
/**
|
|
6658
6791
|
* Disallow comparing `undefined` using `typeof`.
|
|
6659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
|
|
6660
6793
|
*/
|
|
6661
6794
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
6662
6795
|
/**
|
|
6663
6796
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6665
6798
|
*/
|
|
6666
6799
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6667
6800
|
/**
|
|
6668
6801
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
|
|
6670
6803
|
*/
|
|
6671
6804
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
6672
6805
|
/**
|
|
6673
6806
|
* Disallow awaiting non-promise values.
|
|
6674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
|
|
6675
6808
|
*/
|
|
6676
6809
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
6677
6810
|
/**
|
|
6678
6811
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
|
|
6680
6813
|
*/
|
|
6681
6814
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
6682
6815
|
/**
|
|
6683
6816
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
|
|
6685
6818
|
*/
|
|
6686
6819
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
6687
6820
|
/**
|
|
6688
6821
|
* Disallow unreadable array destructuring.
|
|
6689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
|
|
6690
6823
|
*/
|
|
6691
6824
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
6692
6825
|
/**
|
|
6693
6826
|
* Disallow unreadable IIFEs.
|
|
6694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
|
|
6695
6828
|
*/
|
|
6696
6829
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
6697
6830
|
/**
|
|
6698
6831
|
* Disallow unused object properties.
|
|
6699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
|
|
6700
6833
|
*/
|
|
6701
6834
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
6702
6835
|
/**
|
|
6703
6836
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6705
6838
|
*/
|
|
6706
6839
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
6707
6840
|
/**
|
|
6708
6841
|
* Disallow useless fallback when spreading in object literals.
|
|
6709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
|
|
6710
6843
|
*/
|
|
6711
6844
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
6712
6845
|
/**
|
|
6713
6846
|
* Disallow useless array length check.
|
|
6714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
|
|
6715
6848
|
*/
|
|
6716
6849
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
6717
6850
|
/**
|
|
6718
6851
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
|
|
6720
6853
|
*/
|
|
6721
6854
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
6722
6855
|
/**
|
|
6723
6856
|
* Disallow unnecessary spread.
|
|
6724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
|
|
6725
6858
|
*/
|
|
6726
6859
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
6727
6860
|
/**
|
|
6728
6861
|
* Disallow useless case in switch statements.
|
|
6729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
|
|
6730
6863
|
*/
|
|
6731
6864
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
6732
6865
|
/**
|
|
6733
6866
|
* Disallow useless `undefined`.
|
|
6734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
|
|
6735
6868
|
*/
|
|
6736
6869
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
6737
6870
|
/**
|
|
6738
6871
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
|
|
6740
6873
|
*/
|
|
6741
6874
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
6742
6875
|
/**
|
|
6743
6876
|
* Enforce proper case for numeric literals.
|
|
6744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
|
|
6745
6878
|
*/
|
|
6746
6879
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
6747
6880
|
/**
|
|
6748
6881
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
|
|
6750
6883
|
*/
|
|
6751
6884
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
6752
6885
|
/**
|
|
6753
6886
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
|
|
6755
6888
|
*/
|
|
6756
6889
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
6757
6890
|
/**
|
|
6758
6891
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
|
|
6760
6893
|
*/
|
|
6761
6894
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
6762
6895
|
/**
|
|
6763
6896
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
|
|
6765
6898
|
*/
|
|
6766
6899
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
6767
6900
|
/**
|
|
6768
6901
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
|
|
6770
6903
|
*/
|
|
6771
6904
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
6772
6905
|
/**
|
|
6773
6906
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
|
|
6775
6908
|
*/
|
|
6776
6909
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
6777
6910
|
/**
|
|
6778
6911
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
|
|
6780
6913
|
*/
|
|
6781
6914
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
6782
6915
|
/**
|
|
6783
6916
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
|
|
6785
6918
|
*/
|
|
6786
6919
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
6920
|
+
/**
|
|
6921
|
+
* Prefer `BigInt` literals over the constructor.
|
|
6922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
|
|
6923
|
+
*/
|
|
6924
|
+
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
6787
6925
|
/**
|
|
6788
6926
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
|
|
6790
6928
|
*/
|
|
6791
6929
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
6792
6930
|
/**
|
|
6793
6931
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
|
|
6795
6933
|
*/
|
|
6796
6934
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
6935
|
+
/**
|
|
6936
|
+
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
|
|
6938
|
+
*/
|
|
6939
|
+
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
6797
6940
|
/**
|
|
6798
6941
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
|
|
6800
6943
|
*/
|
|
6801
6944
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
6802
6945
|
/**
|
|
6803
6946
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
|
|
6805
6948
|
*/
|
|
6806
6949
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
6807
6950
|
/**
|
|
6808
6951
|
* Prefer default parameters over reassignment.
|
|
6809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
|
|
6810
6953
|
*/
|
|
6811
6954
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
6812
6955
|
/**
|
|
6813
6956
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
|
|
6815
6958
|
*/
|
|
6816
6959
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
6817
6960
|
/**
|
|
6818
6961
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
|
|
6820
6963
|
*/
|
|
6821
6964
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
6822
6965
|
/**
|
|
6823
6966
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
|
|
6825
6968
|
*/
|
|
6826
6969
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
6827
6970
|
/**
|
|
6828
6971
|
* Prefer `.textContent` over `.innerText`.
|
|
6829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
|
|
6830
6973
|
*/
|
|
6831
6974
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
6832
6975
|
/**
|
|
6833
6976
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
|
|
6835
6978
|
*/
|
|
6836
6979
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
6837
6980
|
/**
|
|
6838
6981
|
* Prefer `export…from` when re-exporting.
|
|
6839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
|
|
6840
6983
|
*/
|
|
6841
6984
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
6842
6985
|
/**
|
|
6843
6986
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
|
|
6845
6988
|
*/
|
|
6846
6989
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
6847
6990
|
/**
|
|
6848
6991
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
|
|
6850
6993
|
*/
|
|
6851
6994
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
6852
6995
|
/**
|
|
6853
6996
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
|
|
6855
6998
|
*/
|
|
6856
6999
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
6857
7000
|
/**
|
|
6858
7001
|
* Prefer reading a JSON file as a buffer.
|
|
6859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
|
|
6860
7003
|
*/
|
|
6861
7004
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
6862
7005
|
/**
|
|
6863
7006
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
|
|
6865
7008
|
*/
|
|
6866
7009
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
6867
7010
|
/**
|
|
6868
7011
|
* Prefer using a logical operator over a ternary.
|
|
6869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6870
7013
|
*/
|
|
6871
7014
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
6872
7015
|
/**
|
|
6873
7016
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
|
|
6875
7018
|
*/
|
|
6876
7019
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
6877
7020
|
/**
|
|
6878
7021
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
|
|
6880
7023
|
*/
|
|
6881
7024
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
6882
7025
|
/**
|
|
6883
7026
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
|
|
6885
7028
|
*/
|
|
6886
7029
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
6887
7030
|
/**
|
|
6888
7031
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
|
|
6890
7033
|
*/
|
|
6891
7034
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
6892
7035
|
/**
|
|
6893
7036
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
|
|
6895
7038
|
*/
|
|
6896
7039
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
6897
7040
|
/**
|
|
6898
7041
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
|
|
6900
7043
|
*/
|
|
6901
7044
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
6902
7045
|
/**
|
|
6903
7046
|
* Prefer negative index over `.length - index` when possible.
|
|
6904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
|
|
6905
7048
|
*/
|
|
6906
7049
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
6907
7050
|
/**
|
|
6908
7051
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
|
|
6910
7053
|
*/
|
|
6911
7054
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
6912
7055
|
/**
|
|
6913
7056
|
* Prefer `Number` static properties over global ones.
|
|
6914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
|
|
6915
7058
|
*/
|
|
6916
7059
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
6917
7060
|
/**
|
|
6918
7061
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
|
|
6920
7063
|
*/
|
|
6921
7064
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
6922
7065
|
/**
|
|
6923
7066
|
* Prefer omitting the `catch` binding parameter.
|
|
6924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
|
|
6925
7068
|
*/
|
|
6926
7069
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
6927
7070
|
/**
|
|
6928
7071
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
|
|
6930
7073
|
*/
|
|
6931
7074
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
6932
7075
|
/**
|
|
6933
7076
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
|
|
6935
7078
|
*/
|
|
6936
7079
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
6937
7080
|
/**
|
|
6938
7081
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
|
|
6940
7083
|
*/
|
|
6941
7084
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
6942
7085
|
/**
|
|
6943
7086
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
|
|
6945
7088
|
*/
|
|
6946
7089
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
6947
7090
|
/**
|
|
6948
7091
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
|
|
6950
7093
|
*/
|
|
6951
7094
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
6952
7095
|
/**
|
|
6953
7096
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
|
|
6955
7098
|
*/
|
|
6956
7099
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
6957
7100
|
/**
|
|
6958
7101
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
|
|
6960
7103
|
*/
|
|
6961
7104
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
6962
7105
|
/**
|
|
6963
7106
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
|
|
6965
7108
|
*/
|
|
6966
7109
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
6967
7110
|
/**
|
|
6968
7111
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
|
|
6970
7113
|
*/
|
|
6971
7114
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
6972
7115
|
/**
|
|
6973
7116
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
|
|
6975
7118
|
*/
|
|
6976
7119
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
6977
7120
|
/**
|
|
6978
7121
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
|
|
6980
7123
|
*/
|
|
6981
7124
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
6982
7125
|
/**
|
|
6983
7126
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
|
|
6985
7128
|
*/
|
|
6986
7129
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
6987
7130
|
/**
|
|
6988
7131
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
|
|
6990
7133
|
*/
|
|
6991
7134
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
6992
7135
|
/**
|
|
6993
7136
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
|
|
6995
7138
|
*/
|
|
6996
7139
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
6997
7140
|
/**
|
|
6998
7141
|
* Prefer `switch` over multiple `else-if`.
|
|
6999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
|
|
7000
7143
|
*/
|
|
7001
7144
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
7002
7145
|
/**
|
|
7003
7146
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
|
|
7005
7148
|
*/
|
|
7006
7149
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
7007
7150
|
/**
|
|
7008
7151
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
|
|
7010
7153
|
*/
|
|
7011
7154
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
7012
7155
|
/**
|
|
7013
7156
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
|
|
7015
7158
|
*/
|
|
7016
7159
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
7017
7160
|
/**
|
|
7018
7161
|
* Prevent abbreviations.
|
|
7019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
|
|
7020
7163
|
*/
|
|
7021
7164
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
7022
7165
|
/**
|
|
7023
7166
|
* Enforce consistent relative URL style.
|
|
7024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
|
|
7025
7168
|
*/
|
|
7026
7169
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
7027
7170
|
/**
|
|
7028
7171
|
* Enforce using the separator argument with `Array#join()`.
|
|
7029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
|
|
7030
7173
|
*/
|
|
7031
7174
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
7175
|
+
/**
|
|
7176
|
+
* Require non-empty module attributes for imports and exports
|
|
7177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
|
|
7178
|
+
*/
|
|
7179
|
+
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
7032
7180
|
/**
|
|
7033
7181
|
* Require non-empty specifier list in import and export statements.
|
|
7034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
|
|
7035
7183
|
*/
|
|
7036
7184
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
7037
7185
|
/**
|
|
7038
7186
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7040
7188
|
*/
|
|
7041
7189
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
7042
7190
|
/**
|
|
7043
7191
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
|
|
7045
7193
|
*/
|
|
7046
7194
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
7047
7195
|
/**
|
|
7048
7196
|
* Enforce better string content.
|
|
7049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
|
|
7050
7198
|
*/
|
|
7051
7199
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
7052
7200
|
/**
|
|
7053
7201
|
* Enforce consistent brace style for `case` clauses.
|
|
7054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
|
|
7055
7203
|
*/
|
|
7056
7204
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
7057
7205
|
/**
|
|
7058
7206
|
* Fix whitespace-insensitive template indentation.
|
|
7059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
|
|
7060
7208
|
*/
|
|
7061
7209
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
7062
7210
|
/**
|
|
7063
7211
|
* Enforce consistent case for text encoding identifiers.
|
|
7064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
|
|
7065
7213
|
*/
|
|
7066
7214
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
7067
7215
|
/**
|
|
7068
7216
|
* Require `new` when creating an error.
|
|
7069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
|
|
7070
7218
|
*/
|
|
7071
7219
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
7072
7220
|
/**
|
|
@@ -10574,6 +10722,10 @@ type ImportPreferDefaultExport = []|[{
|
|
|
10574
10722
|
type ImportPreferNamespaceImport = []|[{
|
|
10575
10723
|
patterns?: string[]
|
|
10576
10724
|
}]
|
|
10725
|
+
// ----- jsdoc/check-alignment -----
|
|
10726
|
+
type JsdocCheckAlignment = []|[{
|
|
10727
|
+
innerIndent?: number
|
|
10728
|
+
}]
|
|
10577
10729
|
// ----- jsdoc/check-examples -----
|
|
10578
10730
|
type JsdocCheckExamples = []|[{
|
|
10579
10731
|
allowInlineConfig?: boolean
|
|
@@ -10863,6 +11015,7 @@ type JsdocRequireJsdoc = []|[{
|
|
|
10863
11015
|
enableFixer?: boolean
|
|
10864
11016
|
exemptEmptyConstructors?: boolean
|
|
10865
11017
|
exemptEmptyFunctions?: boolean
|
|
11018
|
+
exemptOverloadedImplementations?: boolean
|
|
10866
11019
|
fixerMessage?: string
|
|
10867
11020
|
minLineCount?: number
|
|
10868
11021
|
publicOnly?: (boolean | {
|
|
@@ -10879,6 +11032,7 @@ type JsdocRequireJsdoc = []|[{
|
|
|
10879
11032
|
FunctionExpression?: boolean
|
|
10880
11033
|
MethodDefinition?: boolean
|
|
10881
11034
|
}
|
|
11035
|
+
skipInterveningOverloadedDeclarations?: boolean
|
|
10882
11036
|
}]
|
|
10883
11037
|
// ----- jsdoc/require-param -----
|
|
10884
11038
|
type JsdocRequireParam = []|[{
|
|
@@ -11031,6 +11185,21 @@ type JsdocTextEscaping = []|[{
|
|
|
11031
11185
|
escapeHTML?: boolean
|
|
11032
11186
|
escapeMarkdown?: boolean
|
|
11033
11187
|
}]
|
|
11188
|
+
// ----- jsdoc/type-formatting -----
|
|
11189
|
+
type JsdocTypeFormatting = []|[{
|
|
11190
|
+
arrayBrackets?: ("angle" | "square")
|
|
11191
|
+
enableFixer?: boolean
|
|
11192
|
+
genericDot?: boolean
|
|
11193
|
+
objectFieldIndent?: string
|
|
11194
|
+
objectFieldQuote?: ("double" | "single" | null)
|
|
11195
|
+
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak")
|
|
11196
|
+
objectFieldSeparatorTrailingPunctuation?: boolean
|
|
11197
|
+
propertyQuotes?: ("double" | "single" | null)
|
|
11198
|
+
separatorForSingleObjectField?: boolean
|
|
11199
|
+
stringQuotes?: ("double" | "single")
|
|
11200
|
+
typeBracketSpacing?: string
|
|
11201
|
+
unionSpacing?: string
|
|
11202
|
+
}]
|
|
11034
11203
|
// ----- jsdoc/valid-types -----
|
|
11035
11204
|
type JsdocValidTypes = []|[{
|
|
11036
11205
|
allowEmptyNamepaths?: boolean
|
|
@@ -14771,7 +14940,11 @@ type PerfectionistSortVariableDeclarations = []|[{
|
|
|
14771
14940
|
}]
|
|
14772
14941
|
// ----- playwright/expect-expect -----
|
|
14773
14942
|
type PlaywrightExpectExpect = []|[{
|
|
14774
|
-
|
|
14943
|
+
assertFunctionNames?: []|[string]
|
|
14944
|
+
}]
|
|
14945
|
+
// ----- playwright/max-expects -----
|
|
14946
|
+
type PlaywrightMaxExpects = []|[{
|
|
14947
|
+
max?: number
|
|
14775
14948
|
}]
|
|
14776
14949
|
// ----- playwright/max-nested-describe -----
|
|
14777
14950
|
type PlaywrightMaxNestedDescribe = []|[{
|
|
@@ -14781,6 +14954,14 @@ type PlaywrightMaxNestedDescribe = []|[{
|
|
|
14781
14954
|
type PlaywrightMissingPlaywrightAwait = []|[{
|
|
14782
14955
|
customMatchers?: string[]
|
|
14783
14956
|
}]
|
|
14957
|
+
// ----- playwright/no-hooks -----
|
|
14958
|
+
type PlaywrightNoHooks = []|[{
|
|
14959
|
+
allow?: unknown[]
|
|
14960
|
+
}]
|
|
14961
|
+
// ----- playwright/no-raw-locators -----
|
|
14962
|
+
type PlaywrightNoRawLocators = []|[{
|
|
14963
|
+
allowed?: string[]
|
|
14964
|
+
}]
|
|
14784
14965
|
// ----- playwright/no-restricted-matchers -----
|
|
14785
14966
|
type PlaywrightNoRestrictedMatchers = []|[{
|
|
14786
14967
|
[k: string]: (string | null) | undefined
|
|
@@ -14789,12 +14970,24 @@ type PlaywrightNoRestrictedMatchers = []|[{
|
|
|
14789
14970
|
type PlaywrightNoSkippedTest = []|[{
|
|
14790
14971
|
allowConditional?: boolean
|
|
14791
14972
|
}]
|
|
14973
|
+
// ----- playwright/no-slowed-test -----
|
|
14974
|
+
type PlaywrightNoSlowedTest = []|[{
|
|
14975
|
+
allowConditional?: boolean
|
|
14976
|
+
}]
|
|
14792
14977
|
// ----- playwright/prefer-lowercase-title -----
|
|
14793
14978
|
type PlaywrightPreferLowercaseTitle = []|[{
|
|
14794
14979
|
allowedPrefixes?: string[]
|
|
14795
14980
|
ignore?: ("test.describe" | "test")[]
|
|
14796
14981
|
ignoreTopLevelDescribe?: boolean
|
|
14797
14982
|
}]
|
|
14983
|
+
// ----- playwright/prefer-native-locators -----
|
|
14984
|
+
type PlaywrightPreferNativeLocators = []|[{
|
|
14985
|
+
testIdAttribute?: string
|
|
14986
|
+
}]
|
|
14987
|
+
// ----- playwright/require-hook -----
|
|
14988
|
+
type PlaywrightRequireHook = []|[{
|
|
14989
|
+
allowedFunctionCalls?: string[]
|
|
14990
|
+
}]
|
|
14798
14991
|
// ----- playwright/require-top-level-describe -----
|
|
14799
14992
|
type PlaywrightRequireTopLevelDescribe = []|[{
|
|
14800
14993
|
maxTopLevelDescribes?: number
|
|
@@ -14804,6 +14997,26 @@ type PlaywrightValidExpect = []|[{
|
|
|
14804
14997
|
maxArgs?: number
|
|
14805
14998
|
minArgs?: number
|
|
14806
14999
|
}]
|
|
15000
|
+
// ----- playwright/valid-test-tags -----
|
|
15001
|
+
type PlaywrightValidTestTags = []|[{
|
|
15002
|
+
allowedTags?: (string | {
|
|
15003
|
+
source?: string
|
|
15004
|
+
})[]
|
|
15005
|
+
disallowedTags?: (string | {
|
|
15006
|
+
source?: string
|
|
15007
|
+
})[]
|
|
15008
|
+
}]
|
|
15009
|
+
// ----- playwright/valid-title -----
|
|
15010
|
+
type PlaywrightValidTitle = []|[{
|
|
15011
|
+
disallowedWords?: string[]
|
|
15012
|
+
ignoreSpaces?: boolean
|
|
15013
|
+
ignoreTypeOfDescribeName?: boolean
|
|
15014
|
+
ignoreTypeOfStepName?: boolean
|
|
15015
|
+
ignoreTypeOfTestName?: boolean
|
|
15016
|
+
[k: string]: (string | [string]|[string, string] | {
|
|
15017
|
+
[k: string]: (string | [string]|[string, string]) | undefined
|
|
15018
|
+
})
|
|
15019
|
+
}]
|
|
14807
15020
|
// ----- promise/always-return -----
|
|
14808
15021
|
type PromiseAlwaysReturn = []|[{
|
|
14809
15022
|
ignoreLastCallback?: boolean
|
|
@@ -15941,6 +16154,10 @@ type UnicornNoArrayReduce = []|[{
|
|
|
15941
16154
|
type UnicornNoArrayReverse = []|[{
|
|
15942
16155
|
allowExpressionStatement?: boolean
|
|
15943
16156
|
}]
|
|
16157
|
+
// ----- unicorn/no-array-sort -----
|
|
16158
|
+
type UnicornNoArraySort = []|[{
|
|
16159
|
+
allowExpressionStatement?: boolean
|
|
16160
|
+
}]
|
|
15944
16161
|
// ----- unicorn/no-instanceof-builtins -----
|
|
15945
16162
|
type UnicornNoInstanceofBuiltins = []|[{
|
|
15946
16163
|
useErrorIsError?: boolean
|
|
@@ -16514,7 +16731,9 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16514
16731
|
sonarjs?: OptionsFiles & OptionsOverrides;
|
|
16515
16732
|
storybook?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16516
16733
|
stylistic?: boolean | (OptionsFiles & OptionsOverrides & StylisticConfig);
|
|
16517
|
-
tailwindcss?: boolean | (OptionsFiles & OptionsOverrides
|
|
16734
|
+
tailwindcss?: boolean | "v3" | "v4" | (OptionsFiles & OptionsOverrides & {
|
|
16735
|
+
version?: "v3" | "v4";
|
|
16736
|
+
});
|
|
16518
16737
|
tanstackQuery?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16519
16738
|
tanstackRouter?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16520
16739
|
testingLibrary?: boolean | (OptionsFiles & OptionsOverrides & OptionsPackageJson);
|