@vinicunca/eslint-config 3.1.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +208 -220
- package/package.json +19 -17
package/dist/index.d.ts
CHANGED
|
@@ -2836,8 +2836,8 @@ interface RuleOptions {
|
|
|
2836
2836
|
*/
|
|
2837
2837
|
'radix'?: Linter.RuleEntry<Radix>
|
|
2838
2838
|
/**
|
|
2839
|
-
* disallow
|
|
2840
|
-
* @see https://eslint-react.xyz/docs/rules/dom-no-
|
|
2839
|
+
* disallow void elements (AKA self-closing elements) from having children
|
|
2840
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2841
2841
|
*/
|
|
2842
2842
|
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
|
|
2843
2843
|
/**
|
|
@@ -2896,10 +2896,20 @@ interface RuleOptions {
|
|
|
2896
2896
|
*/
|
|
2897
2897
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
2898
2898
|
/**
|
|
2899
|
-
*
|
|
2900
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
2899
|
+
* disallow void elements (AKA self-closing elements) from having children
|
|
2900
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2901
|
+
*/
|
|
2902
|
+
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
|
|
2903
|
+
/**
|
|
2904
|
+
* enforce custom Hooks to use at least one other hook inside
|
|
2905
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-useless-custom-hooks
|
|
2901
2906
|
*/
|
|
2902
2907
|
'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
|
|
2908
|
+
/**
|
|
2909
|
+
* disallow unnecessary usage of 'useCallback'
|
|
2910
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
2911
|
+
*/
|
|
2912
|
+
'react-hooks-extra/ensure-use-callback-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
2903
2913
|
/**
|
|
2904
2914
|
* disallow unnecessary usage of 'useMemo'
|
|
2905
2915
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
@@ -2916,8 +2926,8 @@ interface RuleOptions {
|
|
|
2916
2926
|
*/
|
|
2917
2927
|
'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
|
|
2918
2928
|
/**
|
|
2919
|
-
* enforce custom
|
|
2920
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
2929
|
+
* enforce custom Hooks to use at least one other hook inside
|
|
2930
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-useless-custom-hooks
|
|
2921
2931
|
*/
|
|
2922
2932
|
'react-hooks-extra/no-redundant-custom-hook'?: Linter.RuleEntry<[]>
|
|
2923
2933
|
/**
|
|
@@ -2930,6 +2940,11 @@ interface RuleOptions {
|
|
|
2930
2940
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
2931
2941
|
*/
|
|
2932
2942
|
'react-hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>
|
|
2943
|
+
/**
|
|
2944
|
+
* enforce custom Hooks to use at least one other hook inside
|
|
2945
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-useless-custom-hooks
|
|
2946
|
+
*/
|
|
2947
|
+
'react-hooks-extra/no-useless-custom-hooks'?: Linter.RuleEntry<[]>
|
|
2933
2948
|
/**
|
|
2934
2949
|
* disallow function calls in 'useState' that aren't wrapped in an initializer function
|
|
2935
2950
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
@@ -2983,12 +2998,12 @@ interface RuleOptions {
|
|
|
2983
2998
|
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
2984
2999
|
/**
|
|
2985
3000
|
* disallow duplicate props
|
|
2986
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3001
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-jsx-props
|
|
2987
3002
|
*/
|
|
2988
3003
|
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>
|
|
2989
3004
|
/**
|
|
2990
|
-
*
|
|
2991
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-
|
|
3005
|
+
* helpes `eslint/no-unused-vars` to correctly mark JSX variables as used.
|
|
3006
|
+
* @see https://eslint-react.xyz/docs/rules/use-jsx-vars
|
|
2992
3007
|
*/
|
|
2993
3008
|
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>
|
|
2994
3009
|
/**
|
|
@@ -3071,6 +3086,11 @@ interface RuleOptions {
|
|
|
3071
3086
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
3072
3087
|
*/
|
|
3073
3088
|
'react/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
3089
|
+
/**
|
|
3090
|
+
* disallow the use of '<Context.Provider>'
|
|
3091
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
3092
|
+
*/
|
|
3093
|
+
'react/no-context-provider'?: Linter.RuleEntry<[]>
|
|
3074
3094
|
/**
|
|
3075
3095
|
* disallow using 'createRef' in function components
|
|
3076
3096
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
@@ -3086,11 +3106,21 @@ interface RuleOptions {
|
|
|
3086
3106
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
3087
3107
|
*/
|
|
3088
3108
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
3109
|
+
/**
|
|
3110
|
+
* disallow duplicate props
|
|
3111
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-jsx-props
|
|
3112
|
+
*/
|
|
3113
|
+
'react/no-duplicate-jsx-props'?: Linter.RuleEntry<[]>
|
|
3089
3114
|
/**
|
|
3090
3115
|
* disallow duplicate keys when rendering list
|
|
3091
3116
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
3092
3117
|
*/
|
|
3093
3118
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
3119
|
+
/**
|
|
3120
|
+
* disallow the use of 'forwardRef'
|
|
3121
|
+
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
3122
|
+
*/
|
|
3123
|
+
'react/no-forward-ref'?: Linter.RuleEntry<[]>
|
|
3094
3124
|
/**
|
|
3095
3125
|
* disallow implicit 'key' props
|
|
3096
3126
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
@@ -3181,6 +3211,11 @@ interface RuleOptions {
|
|
|
3181
3211
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3182
3212
|
*/
|
|
3183
3213
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
3214
|
+
/**
|
|
3215
|
+
* disallow the use of 'useContext'
|
|
3216
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
3217
|
+
*/
|
|
3218
|
+
'react/no-use-context'?: Linter.RuleEntry<[]>
|
|
3184
3219
|
/**
|
|
3185
3220
|
* disallow unnecessary fragments
|
|
3186
3221
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
@@ -3211,6 +3246,11 @@ interface RuleOptions {
|
|
|
3211
3246
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
3212
3247
|
*/
|
|
3213
3248
|
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
3249
|
+
/**
|
|
3250
|
+
* helpes `eslint/no-unused-vars` to correctly mark JSX variables as used.
|
|
3251
|
+
* @see https://eslint-react.xyz/docs/rules/use-jsx-vars
|
|
3252
|
+
*/
|
|
3253
|
+
'react/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3214
3254
|
/**
|
|
3215
3255
|
* disallow confusing quantifiers
|
|
3216
3256
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -5577,7 +5617,7 @@ interface RuleOptions {
|
|
|
5577
5617
|
'style/semi'?: Linter.RuleEntry<StyleSemi>
|
|
5578
5618
|
/**
|
|
5579
5619
|
* Enforce consistent spacing before and after semicolons
|
|
5580
|
-
* @see https://eslint.style/rules/
|
|
5620
|
+
* @see https://eslint.style/rules/ts/semi-spacing
|
|
5581
5621
|
*/
|
|
5582
5622
|
'style/semi-spacing'?: Linter.RuleEntry<StyleSemiSpacing>
|
|
5583
5623
|
/**
|
|
@@ -6658,7 +6698,7 @@ interface RuleOptions {
|
|
|
6658
6698
|
*/
|
|
6659
6699
|
'ts/no-for-in-array'?: Linter.RuleEntry<[]>
|
|
6660
6700
|
/**
|
|
6661
|
-
* Disallow the use of `eval()`-like
|
|
6701
|
+
* Disallow the use of `eval()`-like functions
|
|
6662
6702
|
* @see https://typescript-eslint.io/rules/no-implied-eval
|
|
6663
6703
|
*/
|
|
6664
6704
|
'ts/no-implied-eval'?: Linter.RuleEntry<[]>
|
|
@@ -7109,702 +7149,642 @@ interface RuleOptions {
|
|
|
7109
7149
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
7110
7150
|
/**
|
|
7111
7151
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
7112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/better-regex.md
|
|
7113
7153
|
*/
|
|
7114
7154
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
7115
7155
|
/**
|
|
7116
7156
|
* Enforce a specific parameter name in catch clauses.
|
|
7117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/catch-error-name.md
|
|
7118
7158
|
*/
|
|
7119
7159
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
7160
|
+
/**
|
|
7161
|
+
* Enforce consistent assertion style with `node:assert`.
|
|
7162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-assert.md
|
|
7163
|
+
*/
|
|
7164
|
+
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
7165
|
+
/**
|
|
7166
|
+
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-date-clone.md
|
|
7168
|
+
*/
|
|
7169
|
+
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
7120
7170
|
/**
|
|
7121
7171
|
* Use destructured variables over properties.
|
|
7122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-destructuring.md
|
|
7123
7173
|
*/
|
|
7124
7174
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
7125
7175
|
/**
|
|
7126
7176
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7128
7178
|
*/
|
|
7129
7179
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
7130
7180
|
/**
|
|
7131
7181
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-existence-index-check.md
|
|
7133
7183
|
*/
|
|
7134
7184
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
7135
7185
|
/**
|
|
7136
7186
|
* Move function definitions to the highest possible scope.
|
|
7137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-function-scoping.md
|
|
7138
7188
|
*/
|
|
7139
7189
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
7140
7190
|
/**
|
|
7141
7191
|
* Enforce correct `Error` subclassing.
|
|
7142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/custom-error-definition.md
|
|
7143
7193
|
*/
|
|
7144
7194
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
7145
7195
|
/**
|
|
7146
7196
|
* Enforce no spaces between braces.
|
|
7147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/empty-brace-spaces.md
|
|
7148
7198
|
*/
|
|
7149
7199
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
7150
7200
|
/**
|
|
7151
7201
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/error-message.md
|
|
7153
7203
|
*/
|
|
7154
7204
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
7155
7205
|
/**
|
|
7156
7206
|
* Require escape sequences to use uppercase values.
|
|
7157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/escape-case.md
|
|
7158
7208
|
*/
|
|
7159
7209
|
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
7160
7210
|
/**
|
|
7161
7211
|
* Add expiration conditions to TODO comments.
|
|
7162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/expiring-todo-comments.md
|
|
7163
7213
|
*/
|
|
7164
7214
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
7165
7215
|
/**
|
|
7166
7216
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/explicit-length-check.md
|
|
7168
7218
|
*/
|
|
7169
7219
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
7170
7220
|
/**
|
|
7171
7221
|
* Enforce a case style for filenames.
|
|
7172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/filename-case.md
|
|
7173
7223
|
*/
|
|
7174
7224
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
7175
|
-
/**
|
|
7176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#import-index
|
|
7177
|
-
* @deprecated
|
|
7178
|
-
*/
|
|
7179
|
-
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
7180
7225
|
/**
|
|
7181
7226
|
* Enforce specific import styles per module.
|
|
7182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/import-style.md
|
|
7183
7228
|
*/
|
|
7184
7229
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
7185
7230
|
/**
|
|
7186
7231
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
7187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/new-for-builtins.md
|
|
7188
7233
|
*/
|
|
7189
7234
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
7190
7235
|
/**
|
|
7191
7236
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7193
7238
|
*/
|
|
7194
7239
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
7240
|
+
/**
|
|
7241
|
+
* Disallow recursive access to `this` within getters and setters.
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-accessor-recursion.md
|
|
7243
|
+
*/
|
|
7244
|
+
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
7195
7245
|
/**
|
|
7196
7246
|
* Disallow anonymous functions and classes as the default export.
|
|
7197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-anonymous-default-export.md
|
|
7198
7248
|
*/
|
|
7199
7249
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
7200
7250
|
/**
|
|
7201
7251
|
* Prevent passing a function reference directly to iterator methods.
|
|
7202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-callback-reference.md
|
|
7203
7253
|
*/
|
|
7204
7254
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
7205
7255
|
/**
|
|
7206
7256
|
* Prefer `for…of` over the `forEach` method.
|
|
7207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-for-each.md
|
|
7208
7258
|
*/
|
|
7209
7259
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
7210
|
-
/**
|
|
7211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-array-instanceof
|
|
7212
|
-
* @deprecated
|
|
7213
|
-
*/
|
|
7214
|
-
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
7215
7260
|
/**
|
|
7216
7261
|
* Disallow using the `this` argument in array methods.
|
|
7217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-method-this-argument.md
|
|
7218
7263
|
*/
|
|
7219
7264
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
7220
7265
|
/**
|
|
7221
7266
|
* Enforce combining multiple `Array#push()` into one call.
|
|
7222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-push-push.md
|
|
7223
7268
|
*/
|
|
7224
7269
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
7225
7270
|
/**
|
|
7226
7271
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-reduce.md
|
|
7228
7273
|
*/
|
|
7229
7274
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
7230
7275
|
/**
|
|
7231
7276
|
* Disallow member access from await expression.
|
|
7232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-expression-member.md
|
|
7233
7278
|
*/
|
|
7234
7279
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
7235
7280
|
/**
|
|
7236
7281
|
* Disallow using `await` in `Promise` method parameters.
|
|
7237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7238
7283
|
*/
|
|
7239
7284
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
7240
7285
|
/**
|
|
7241
7286
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-console-spaces.md
|
|
7243
7288
|
*/
|
|
7244
7289
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
7245
7290
|
/**
|
|
7246
7291
|
* Do not use `document.cookie` directly.
|
|
7247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-document-cookie.md
|
|
7248
7293
|
*/
|
|
7249
7294
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
7250
7295
|
/**
|
|
7251
7296
|
* Disallow empty files.
|
|
7252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-empty-file.md
|
|
7253
7298
|
*/
|
|
7254
7299
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
7255
|
-
/**
|
|
7256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
7257
|
-
* @deprecated
|
|
7258
|
-
*/
|
|
7259
|
-
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
7260
7300
|
/**
|
|
7261
7301
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-for-loop.md
|
|
7263
7303
|
*/
|
|
7264
7304
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
7265
7305
|
/**
|
|
7266
7306
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
7267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-hex-escape.md
|
|
7268
7308
|
*/
|
|
7269
7309
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
7270
7310
|
/**
|
|
7271
|
-
*
|
|
7272
|
-
* @
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
7312
|
+
* @deprecated
|
|
7273
7313
|
*/
|
|
7274
7314
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
7315
|
+
/**
|
|
7316
|
+
* Disallow `instanceof` with built-in objects
|
|
7317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-instanceof-builtins.md
|
|
7318
|
+
*/
|
|
7319
|
+
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
7275
7320
|
/**
|
|
7276
7321
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7278
7323
|
*/
|
|
7279
7324
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
7280
7325
|
/**
|
|
7281
7326
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7283
7328
|
*/
|
|
7284
7329
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
7285
7330
|
/**
|
|
7286
7331
|
* Disallow identifiers starting with `new` or `class`.
|
|
7287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-keyword-prefix.md
|
|
7288
7333
|
*/
|
|
7289
7334
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
7290
7335
|
/**
|
|
7291
7336
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-length-as-slice-end.md
|
|
7293
7338
|
*/
|
|
7294
7339
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
7295
7340
|
/**
|
|
7296
7341
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-lonely-if.md
|
|
7298
7343
|
*/
|
|
7299
7344
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
7300
7345
|
/**
|
|
7301
7346
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7303
7348
|
*/
|
|
7304
7349
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
7350
|
+
/**
|
|
7351
|
+
* Disallow named usage of default import and export.
|
|
7352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-named-default.md
|
|
7353
|
+
*/
|
|
7354
|
+
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
7305
7355
|
/**
|
|
7306
7356
|
* Disallow negated conditions.
|
|
7307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negated-condition.md
|
|
7308
7358
|
*/
|
|
7309
7359
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
7310
7360
|
/**
|
|
7311
7361
|
* Disallow negated expression in equality check.
|
|
7312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7313
7363
|
*/
|
|
7314
7364
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
7315
7365
|
/**
|
|
7316
7366
|
* Disallow nested ternary expressions.
|
|
7317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-nested-ternary.md
|
|
7318
7368
|
*/
|
|
7319
7369
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
7320
7370
|
/**
|
|
7321
7371
|
* Disallow `new Array()`.
|
|
7322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-array.md
|
|
7323
7373
|
*/
|
|
7324
7374
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
7325
7375
|
/**
|
|
7326
7376
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-buffer.md
|
|
7328
7378
|
*/
|
|
7329
7379
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
7330
7380
|
/**
|
|
7331
7381
|
* Disallow the use of the `null` literal.
|
|
7332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-null.md
|
|
7333
7383
|
*/
|
|
7334
7384
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
7335
7385
|
/**
|
|
7336
7386
|
* Disallow the use of objects as default parameters.
|
|
7337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7338
7388
|
*/
|
|
7339
7389
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
7340
7390
|
/**
|
|
7341
7391
|
* Disallow `process.exit()`.
|
|
7342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-process-exit.md
|
|
7343
7393
|
*/
|
|
7344
7394
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
7345
|
-
/**
|
|
7346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-reduce
|
|
7347
|
-
* @deprecated
|
|
7348
|
-
*/
|
|
7349
|
-
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
7350
7395
|
/**
|
|
7351
7396
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7353
7398
|
*/
|
|
7354
7399
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
7355
7400
|
/**
|
|
7356
7401
|
* Disallow classes that only have static members.
|
|
7357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-static-only-class.md
|
|
7358
7403
|
*/
|
|
7359
7404
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
7360
7405
|
/**
|
|
7361
7406
|
* Disallow `then` property.
|
|
7362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-thenable.md
|
|
7363
7408
|
*/
|
|
7364
7409
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
7365
7410
|
/**
|
|
7366
7411
|
* Disallow assigning `this` to a variable.
|
|
7367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-this-assignment.md
|
|
7368
7413
|
*/
|
|
7369
7414
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
7370
7415
|
/**
|
|
7371
7416
|
* Disallow comparing `undefined` using `typeof`.
|
|
7372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-typeof-undefined.md
|
|
7373
7418
|
*/
|
|
7374
7419
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
7375
7420
|
/**
|
|
7376
7421
|
* Disallow awaiting non-promise values.
|
|
7377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-await.md
|
|
7378
7423
|
*/
|
|
7379
7424
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
7380
7425
|
/**
|
|
7381
7426
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7383
7428
|
*/
|
|
7384
7429
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
7385
7430
|
/**
|
|
7386
7431
|
* Disallow unreadable array destructuring.
|
|
7387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7388
7433
|
*/
|
|
7389
7434
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
7390
7435
|
/**
|
|
7391
7436
|
* Disallow unreadable IIFEs.
|
|
7392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-iife.md
|
|
7393
7438
|
*/
|
|
7394
7439
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
7395
|
-
/**
|
|
7396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-unsafe-regex
|
|
7397
|
-
* @deprecated
|
|
7398
|
-
*/
|
|
7399
|
-
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
7400
7440
|
/**
|
|
7401
7441
|
* Disallow unused object properties.
|
|
7402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unused-properties.md
|
|
7403
7443
|
*/
|
|
7404
7444
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
7405
7445
|
/**
|
|
7406
7446
|
* Disallow useless fallback when spreading in object literals.
|
|
7407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7408
7448
|
*/
|
|
7409
7449
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
7410
7450
|
/**
|
|
7411
7451
|
* Disallow useless array length check.
|
|
7412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-length-check.md
|
|
7413
7453
|
*/
|
|
7414
7454
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
7415
7455
|
/**
|
|
7416
7456
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7418
7458
|
*/
|
|
7419
7459
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
7420
7460
|
/**
|
|
7421
7461
|
* Disallow unnecessary spread.
|
|
7422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-spread.md
|
|
7423
7463
|
*/
|
|
7424
7464
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
7425
7465
|
/**
|
|
7426
7466
|
* Disallow useless case in switch statements.
|
|
7427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-switch-case.md
|
|
7428
7468
|
*/
|
|
7429
7469
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
7430
7470
|
/**
|
|
7431
7471
|
* Disallow useless `undefined`.
|
|
7432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-undefined.md
|
|
7433
7473
|
*/
|
|
7434
7474
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
7435
7475
|
/**
|
|
7436
7476
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-zero-fractions.md
|
|
7438
7478
|
*/
|
|
7439
7479
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
7440
7480
|
/**
|
|
7441
7481
|
* Enforce proper case for numeric literals.
|
|
7442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/number-literal-case.md
|
|
7443
7483
|
*/
|
|
7444
7484
|
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
7445
7485
|
/**
|
|
7446
7486
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/numeric-separators-style.md
|
|
7448
7488
|
*/
|
|
7449
7489
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
7450
7490
|
/**
|
|
7451
7491
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-add-event-listener.md
|
|
7453
7493
|
*/
|
|
7454
7494
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
7455
7495
|
/**
|
|
7456
7496
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-find.md
|
|
7458
7498
|
*/
|
|
7459
7499
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
7460
7500
|
/**
|
|
7461
7501
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat.md
|
|
7463
7503
|
*/
|
|
7464
7504
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
7465
7505
|
/**
|
|
7466
7506
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat-map.md
|
|
7468
7508
|
*/
|
|
7469
7509
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
7470
7510
|
/**
|
|
7471
7511
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-index-of.md
|
|
7473
7513
|
*/
|
|
7474
7514
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
7475
7515
|
/**
|
|
7476
7516
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-some.md
|
|
7478
7518
|
*/
|
|
7479
7519
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
7480
7520
|
/**
|
|
7481
7521
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-at.md
|
|
7483
7523
|
*/
|
|
7484
7524
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
7485
7525
|
/**
|
|
7486
7526
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7488
7528
|
*/
|
|
7489
7529
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
7490
7530
|
/**
|
|
7491
7531
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-code-point.md
|
|
7493
7533
|
*/
|
|
7494
7534
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
7495
|
-
/**
|
|
7496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-dataset
|
|
7497
|
-
* @deprecated
|
|
7498
|
-
*/
|
|
7499
|
-
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
7500
7535
|
/**
|
|
7501
7536
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-date-now.md
|
|
7503
7538
|
*/
|
|
7504
7539
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
7505
7540
|
/**
|
|
7506
7541
|
* Prefer default parameters over reassignment.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-default-parameters.md
|
|
7508
7543
|
*/
|
|
7509
7544
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
7510
7545
|
/**
|
|
7511
7546
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-append.md
|
|
7513
7548
|
*/
|
|
7514
7549
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
7515
7550
|
/**
|
|
7516
7551
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
7518
7553
|
*/
|
|
7519
7554
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
7520
7555
|
/**
|
|
7521
7556
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7523
7558
|
*/
|
|
7524
7559
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
7525
7560
|
/**
|
|
7526
7561
|
* Prefer `.textContent` over `.innerText`.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7528
7563
|
*/
|
|
7529
7564
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
7530
|
-
/**
|
|
7531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-event-key
|
|
7532
|
-
* @deprecated
|
|
7533
|
-
*/
|
|
7534
|
-
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
7535
7565
|
/**
|
|
7536
7566
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-event-target.md
|
|
7538
7568
|
*/
|
|
7539
7569
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
7540
|
-
/**
|
|
7541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
7542
|
-
* @deprecated
|
|
7543
|
-
*/
|
|
7544
|
-
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
7545
7570
|
/**
|
|
7546
7571
|
* Prefer `export…from` when re-exporting.
|
|
7547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-export-from.md
|
|
7548
7573
|
*/
|
|
7549
7574
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
7550
|
-
/**
|
|
7551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-flat-map
|
|
7552
|
-
* @deprecated
|
|
7553
|
-
*/
|
|
7554
|
-
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
7555
7575
|
/**
|
|
7556
7576
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-global-this.md
|
|
7558
7578
|
*/
|
|
7559
7579
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
7560
7580
|
/**
|
|
7561
7581
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-includes.md
|
|
7563
7583
|
*/
|
|
7564
7584
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
7565
7585
|
/**
|
|
7566
7586
|
* Prefer reading a JSON file as a buffer.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
7568
7588
|
*/
|
|
7569
7589
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
7570
7590
|
/**
|
|
7571
7591
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7573
7593
|
*/
|
|
7574
7594
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
7575
7595
|
/**
|
|
7576
7596
|
* Prefer using a logical operator over a ternary.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7578
7598
|
*/
|
|
7579
7599
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
7580
7600
|
/**
|
|
7581
7601
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-min-max.md
|
|
7583
7603
|
*/
|
|
7584
7604
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
7585
7605
|
/**
|
|
7586
7606
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-trunc.md
|
|
7588
7608
|
*/
|
|
7589
7609
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
7590
7610
|
/**
|
|
7591
7611
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7593
7613
|
*/
|
|
7594
7614
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
7595
7615
|
/**
|
|
7596
7616
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7598
7618
|
*/
|
|
7599
7619
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
7600
7620
|
/**
|
|
7601
7621
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-module.md
|
|
7603
7623
|
*/
|
|
7604
7624
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
7605
7625
|
/**
|
|
7606
7626
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7608
7628
|
*/
|
|
7609
7629
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
7610
7630
|
/**
|
|
7611
7631
|
* Prefer negative index over `.length - index` when possible.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-negative-index.md
|
|
7613
7633
|
*/
|
|
7614
7634
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
7615
|
-
/**
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-append
|
|
7617
|
-
* @deprecated
|
|
7618
|
-
*/
|
|
7619
|
-
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
7620
7635
|
/**
|
|
7621
7636
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-node-protocol.md
|
|
7623
7638
|
*/
|
|
7624
7639
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
7625
|
-
/**
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-remove
|
|
7627
|
-
* @deprecated
|
|
7628
|
-
*/
|
|
7629
|
-
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
7630
7640
|
/**
|
|
7631
7641
|
* Prefer `Number` static properties over global ones.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-number-properties.md
|
|
7633
7643
|
*/
|
|
7634
7644
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
7635
7645
|
/**
|
|
7636
7646
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-object-from-entries.md
|
|
7638
7648
|
*/
|
|
7639
7649
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
7640
|
-
/**
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-object-has-own
|
|
7642
|
-
* @deprecated
|
|
7643
|
-
*/
|
|
7644
|
-
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
7645
7650
|
/**
|
|
7646
7651
|
* Prefer omitting the `catch` binding parameter.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7648
7653
|
*/
|
|
7649
7654
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
7650
7655
|
/**
|
|
7651
7656
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-prototype-methods.md
|
|
7653
7658
|
*/
|
|
7654
7659
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
7655
7660
|
/**
|
|
7656
7661
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-query-selector.md
|
|
7658
7663
|
*/
|
|
7659
7664
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
7660
7665
|
/**
|
|
7661
7666
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-reflect-apply.md
|
|
7663
7668
|
*/
|
|
7664
7669
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
7665
7670
|
/**
|
|
7666
7671
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-regexp-test.md
|
|
7668
7673
|
*/
|
|
7669
7674
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
7670
|
-
/**
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-replace-all
|
|
7672
|
-
* @deprecated
|
|
7673
|
-
*/
|
|
7674
|
-
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
7675
7675
|
/**
|
|
7676
7676
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-has.md
|
|
7678
7678
|
*/
|
|
7679
7679
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
7680
7680
|
/**
|
|
7681
7681
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-size.md
|
|
7683
7683
|
*/
|
|
7684
7684
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
7685
7685
|
/**
|
|
7686
7686
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-spread.md
|
|
7688
7688
|
*/
|
|
7689
7689
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
7690
|
-
/**
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
7692
|
-
* @deprecated
|
|
7693
|
-
*/
|
|
7694
|
-
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
7695
7690
|
/**
|
|
7696
7691
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-raw.md
|
|
7698
7693
|
*/
|
|
7699
7694
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
7700
7695
|
/**
|
|
7701
7696
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-replace-all.md
|
|
7703
7698
|
*/
|
|
7704
7699
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
7705
7700
|
/**
|
|
7706
7701
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-slice.md
|
|
7708
7703
|
*/
|
|
7709
7704
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
7710
7705
|
/**
|
|
7711
7706
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7713
7708
|
*/
|
|
7714
7709
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
7715
7710
|
/**
|
|
7716
7711
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7718
7713
|
*/
|
|
7719
7714
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
7720
7715
|
/**
|
|
7721
7716
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-structured-clone.md
|
|
7723
7718
|
*/
|
|
7724
7719
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
7725
7720
|
/**
|
|
7726
7721
|
* Prefer `switch` over multiple `else-if`.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-switch.md
|
|
7728
7723
|
*/
|
|
7729
7724
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
7730
7725
|
/**
|
|
7731
7726
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-ternary.md
|
|
7733
7728
|
*/
|
|
7734
7729
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
7735
|
-
/**
|
|
7736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-text-content
|
|
7737
|
-
* @deprecated
|
|
7738
|
-
*/
|
|
7739
|
-
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
7740
7730
|
/**
|
|
7741
7731
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-top-level-await.md
|
|
7743
7733
|
*/
|
|
7744
7734
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
7745
|
-
/**
|
|
7746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-trim-start-end
|
|
7747
|
-
* @deprecated
|
|
7748
|
-
*/
|
|
7749
|
-
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
7750
7735
|
/**
|
|
7751
7736
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-type-error.md
|
|
7753
7738
|
*/
|
|
7754
7739
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
7755
7740
|
/**
|
|
7756
7741
|
* Prevent abbreviations.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prevent-abbreviations.md
|
|
7758
7743
|
*/
|
|
7759
7744
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
7760
|
-
/**
|
|
7761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#regex-shorthand
|
|
7762
|
-
* @deprecated
|
|
7763
|
-
*/
|
|
7764
|
-
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
7765
7745
|
/**
|
|
7766
7746
|
* Enforce consistent relative URL style.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/relative-url-style.md
|
|
7768
7748
|
*/
|
|
7769
7749
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
7770
7750
|
/**
|
|
7771
7751
|
* Enforce using the separator argument with `Array#join()`.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-array-join-separator.md
|
|
7773
7753
|
*/
|
|
7774
7754
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
7775
7755
|
/**
|
|
7776
7756
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7778
7758
|
*/
|
|
7779
7759
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
7780
7760
|
/**
|
|
7781
7761
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-post-message-target-origin.md
|
|
7783
7763
|
*/
|
|
7784
7764
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
7785
7765
|
/**
|
|
7786
7766
|
* Enforce better string content.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/string-content.md
|
|
7788
7768
|
*/
|
|
7789
7769
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
7790
7770
|
/**
|
|
7791
7771
|
* Enforce consistent brace style for `case` clauses.
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/switch-case-braces.md
|
|
7793
7773
|
*/
|
|
7794
7774
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
7795
7775
|
/**
|
|
7796
7776
|
* Fix whitespace-insensitive template indentation.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/template-indent.md
|
|
7798
7778
|
*/
|
|
7799
7779
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
7800
7780
|
/**
|
|
7801
7781
|
* Enforce consistent case for text encoding identifiers.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7803
7783
|
*/
|
|
7804
7784
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
7805
7785
|
/**
|
|
7806
7786
|
* Require `new` when creating an error.
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/throw-new-error.md
|
|
7808
7788
|
*/
|
|
7809
7789
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
7810
7790
|
/**
|
|
@@ -15250,6 +15230,7 @@ type StyleSpaceInParens = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
15250
15230
|
// ----- style/space-infix-ops -----
|
|
15251
15231
|
type StyleSpaceInfixOps = []|[{
|
|
15252
15232
|
int32Hint?: boolean
|
|
15233
|
+
ignoreTypes?: boolean
|
|
15253
15234
|
}]
|
|
15254
15235
|
// ----- style/space-unary-ops -----
|
|
15255
15236
|
type StyleSpaceUnaryOps = []|[{
|
|
@@ -16931,6 +16912,13 @@ type UnicornNoArrayPushPush = []|[{
|
|
|
16931
16912
|
type UnicornNoArrayReduce = []|[{
|
|
16932
16913
|
allowSimpleOperations?: boolean
|
|
16933
16914
|
}]
|
|
16915
|
+
// ----- unicorn/no-instanceof-builtins -----
|
|
16916
|
+
type UnicornNoInstanceofBuiltins = []|[{
|
|
16917
|
+
useErrorIsError?: boolean
|
|
16918
|
+
strategy?: ("loose" | "strict")
|
|
16919
|
+
include?: string[]
|
|
16920
|
+
exclude?: string[]
|
|
16921
|
+
}]
|
|
16934
16922
|
// ----- unicorn/no-keyword-prefix -----
|
|
16935
16923
|
type UnicornNoKeywordPrefix = []|[{
|
|
16936
16924
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -49,21 +49,23 @@
|
|
|
49
49
|
"dist"
|
|
50
50
|
],
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
52
|
+
"node": ">=22.0.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
55
|
+
"@eslint-react/eslint-plugin": "^1.19.0",
|
|
56
56
|
"@prettier/plugin-xml": "^3.4.1",
|
|
57
|
-
"
|
|
58
|
-
"eslint": "^
|
|
59
|
-
"eslint
|
|
57
|
+
"@unocss/eslint-plugin": ">=0.50.0",
|
|
58
|
+
"astro-eslint-parser": "^1.0.2",
|
|
59
|
+
"eslint": "^9.10.0",
|
|
60
|
+
"eslint-plugin-astro": "^1.2.0",
|
|
61
|
+
"eslint-plugin-format": ">=0.1.0",
|
|
60
62
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
61
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
62
|
-
"eslint-plugin-solid": "^0.14.
|
|
63
|
-
"eslint-plugin-svelte": ">=2.
|
|
64
|
-
"prettier-plugin-astro": "^0.14.
|
|
63
|
+
"eslint-plugin-react-refresh": "^0.4.4",
|
|
64
|
+
"eslint-plugin-solid": "^0.14.3",
|
|
65
|
+
"eslint-plugin-svelte": ">=2.35.1",
|
|
66
|
+
"prettier-plugin-astro": "^0.14.0",
|
|
65
67
|
"prettier-plugin-slidev": "^1.0.5",
|
|
66
|
-
"svelte-eslint-parser": ">=0.
|
|
68
|
+
"svelte-eslint-parser": ">=0.37.0"
|
|
67
69
|
},
|
|
68
70
|
"peerDependenciesMeta": {
|
|
69
71
|
"@eslint-react/eslint-plugin": {
|
|
@@ -111,12 +113,12 @@
|
|
|
111
113
|
"@clack/prompts": "^0.10.0",
|
|
112
114
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
113
115
|
"@eslint/markdown": "^6.2.2",
|
|
114
|
-
"@stylistic/eslint-plugin": "^4.0.0
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^8.24.
|
|
116
|
-
"@typescript-eslint/parser": "^8.24.
|
|
116
|
+
"@stylistic/eslint-plugin": "^4.0.0",
|
|
117
|
+
"@typescript-eslint/eslint-plugin": "^8.24.1",
|
|
118
|
+
"@typescript-eslint/parser": "^8.24.1",
|
|
117
119
|
"@unocss/eslint-plugin": "^65.5.0",
|
|
118
120
|
"@vitest/eslint-plugin": "^1.1.31",
|
|
119
|
-
"eslint-config-flat-gitignore": "^2.
|
|
121
|
+
"eslint-config-flat-gitignore": "^2.1.0",
|
|
120
122
|
"eslint-flat-config-utils": "^2.0.1",
|
|
121
123
|
"eslint-merge-processors": "^2.0.0",
|
|
122
124
|
"eslint-plugin-antfu": "^3.1.0",
|
|
@@ -131,10 +133,10 @@
|
|
|
131
133
|
"eslint-plugin-regexp": "^2.7.0",
|
|
132
134
|
"eslint-plugin-sonarjs": "^3.0.2",
|
|
133
135
|
"eslint-plugin-toml": "^0.12.0",
|
|
134
|
-
"eslint-plugin-unicorn": "^
|
|
136
|
+
"eslint-plugin-unicorn": "^57.0.0",
|
|
135
137
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
136
138
|
"eslint-plugin-vue": "^9.32.0",
|
|
137
|
-
"eslint-plugin-yml": "^1.
|
|
139
|
+
"eslint-plugin-yml": "^1.17.0",
|
|
138
140
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
139
141
|
"globals": "^15.15.0",
|
|
140
142
|
"jsonc-eslint-parser": "^2.4.0",
|