@w5s/eslint-config 3.3.3 → 3.3.4
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 +138 -195
- package/package.json +3 -3
- package/src/typegen/unicorn.d.ts +138 -195
package/dist/index.d.ts
CHANGED
|
@@ -7052,730 +7052,690 @@ declare module 'eslint' {
|
|
|
7052
7052
|
interface RuleOptions$1 {
|
|
7053
7053
|
/**
|
|
7054
7054
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
7056
7056
|
*/
|
|
7057
7057
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
7058
7058
|
/**
|
|
7059
7059
|
* Enforce a specific parameter name in catch clauses.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
7061
7061
|
*/
|
|
7062
7062
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
7063
7063
|
/**
|
|
7064
7064
|
* Enforce consistent assertion style with `node:assert`.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
7066
7066
|
*/
|
|
7067
7067
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
7068
7068
|
/**
|
|
7069
7069
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
7071
7071
|
*/
|
|
7072
7072
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
7073
7073
|
/**
|
|
7074
7074
|
* Use destructured variables over properties.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
7076
7076
|
*/
|
|
7077
7077
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
7078
7078
|
/**
|
|
7079
7079
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7081
7081
|
*/
|
|
7082
7082
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
7083
7083
|
/**
|
|
7084
7084
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
7086
7086
|
*/
|
|
7087
7087
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
7088
7088
|
/**
|
|
7089
7089
|
* Move function definitions to the highest possible scope.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
7091
7091
|
*/
|
|
7092
7092
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
7093
7093
|
/**
|
|
7094
7094
|
* Enforce correct `Error` subclassing.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
7096
7096
|
*/
|
|
7097
7097
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
7098
7098
|
/**
|
|
7099
7099
|
* Enforce no spaces between braces.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
7101
7101
|
*/
|
|
7102
7102
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
7103
7103
|
/**
|
|
7104
7104
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
7106
7106
|
*/
|
|
7107
7107
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
7108
7108
|
/**
|
|
7109
7109
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
7111
7111
|
*/
|
|
7112
7112
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
7113
7113
|
/**
|
|
7114
7114
|
* Add expiration conditions to TODO comments.
|
|
7115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
7116
7116
|
*/
|
|
7117
7117
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
7118
7118
|
/**
|
|
7119
7119
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
7121
7121
|
*/
|
|
7122
7122
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
7123
7123
|
/**
|
|
7124
7124
|
* Enforce a case style for filenames.
|
|
7125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
7126
7126
|
*/
|
|
7127
7127
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
7128
7128
|
/**
|
|
7129
7129
|
* Enforce specific import styles per module.
|
|
7130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
7131
7131
|
*/
|
|
7132
7132
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
7133
|
-
/**
|
|
7134
|
-
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
|
|
7136
|
-
*/
|
|
7137
|
-
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>
|
|
7138
7133
|
/**
|
|
7139
7134
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
7140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
7141
7136
|
*/
|
|
7142
7137
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
7143
7138
|
/**
|
|
7144
7139
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7146
7141
|
*/
|
|
7147
7142
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
7148
7143
|
/**
|
|
7149
7144
|
* Disallow recursive access to `this` within getters and setters.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
7151
7146
|
*/
|
|
7152
7147
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
7153
7148
|
/**
|
|
7154
7149
|
* Disallow anonymous functions and classes as the default export.
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
7156
7151
|
*/
|
|
7157
7152
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
7158
7153
|
/**
|
|
7159
7154
|
* Prevent passing a function reference directly to iterator methods.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
7161
7156
|
*/
|
|
7162
7157
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
7163
7158
|
/**
|
|
7164
7159
|
* Prefer `for…of` over the `forEach` method.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
7166
7161
|
*/
|
|
7167
7162
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
7168
7163
|
/**
|
|
7169
7164
|
* Disallow using the `this` argument in array methods.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
7171
7166
|
*/
|
|
7172
7167
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
7173
7168
|
/**
|
|
7174
7169
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
7176
7171
|
* @deprecated
|
|
7177
7172
|
*/
|
|
7178
7173
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
7179
7174
|
/**
|
|
7180
7175
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
7182
7177
|
*/
|
|
7183
7178
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
7184
7179
|
/**
|
|
7185
7180
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
7187
7182
|
*/
|
|
7188
7183
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
7189
|
-
/**
|
|
7190
|
-
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
|
|
7192
|
-
*/
|
|
7193
|
-
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
7194
7184
|
/**
|
|
7195
7185
|
* Disallow member access from await expression.
|
|
7196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
7197
7187
|
*/
|
|
7198
7188
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
7199
7189
|
/**
|
|
7200
7190
|
* Disallow using `await` in `Promise` method parameters.
|
|
7201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7202
7192
|
*/
|
|
7203
7193
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
7204
7194
|
/**
|
|
7205
7195
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
7207
7197
|
*/
|
|
7208
7198
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
7209
7199
|
/**
|
|
7210
7200
|
* Do not use `document.cookie` directly.
|
|
7211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
7212
7202
|
*/
|
|
7213
7203
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
7214
7204
|
/**
|
|
7215
7205
|
* Disallow empty files.
|
|
7216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
7217
7207
|
*/
|
|
7218
7208
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
7219
7209
|
/**
|
|
7220
7210
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
7222
7212
|
*/
|
|
7223
7213
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
7224
7214
|
/**
|
|
7225
7215
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
7226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
7227
7217
|
*/
|
|
7228
7218
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
7229
|
-
/**
|
|
7230
|
-
* Disallow immediate mutation after variable assignment.
|
|
7231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
|
|
7232
|
-
*/
|
|
7233
|
-
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
|
|
7234
7219
|
/**
|
|
7235
7220
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
7237
7222
|
* @deprecated
|
|
7238
7223
|
*/
|
|
7239
7224
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
7240
7225
|
/**
|
|
7241
7226
|
* Disallow `instanceof` with built-in objects
|
|
7242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
7243
7228
|
*/
|
|
7244
7229
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
7245
7230
|
/**
|
|
7246
7231
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7248
7233
|
*/
|
|
7249
7234
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
7250
7235
|
/**
|
|
7251
7236
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7253
7238
|
*/
|
|
7254
7239
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
7255
7240
|
/**
|
|
7256
7241
|
* Disallow identifiers starting with `new` or `class`.
|
|
7257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
7258
7243
|
*/
|
|
7259
7244
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
7260
7245
|
/**
|
|
7261
7246
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
7263
7248
|
* @deprecated
|
|
7264
7249
|
*/
|
|
7265
7250
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
7266
7251
|
/**
|
|
7267
7252
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
7269
7254
|
*/
|
|
7270
7255
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
7271
7256
|
/**
|
|
7272
7257
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7274
7259
|
*/
|
|
7275
7260
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
7276
7261
|
/**
|
|
7277
7262
|
* Disallow named usage of default import and export.
|
|
7278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
7279
7264
|
*/
|
|
7280
7265
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
7281
7266
|
/**
|
|
7282
7267
|
* Disallow negated conditions.
|
|
7283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
7284
7269
|
*/
|
|
7285
7270
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
7286
7271
|
/**
|
|
7287
7272
|
* Disallow negated expression in equality check.
|
|
7288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7289
7274
|
*/
|
|
7290
7275
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
7291
7276
|
/**
|
|
7292
7277
|
* Disallow nested ternary expressions.
|
|
7293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
7294
7279
|
*/
|
|
7295
7280
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
7296
7281
|
/**
|
|
7297
7282
|
* Disallow `new Array()`.
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
7299
7284
|
*/
|
|
7300
7285
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
7301
7286
|
/**
|
|
7302
7287
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
7304
7289
|
*/
|
|
7305
7290
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
7306
7291
|
/**
|
|
7307
7292
|
* Disallow the use of the `null` literal.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
7309
7294
|
*/
|
|
7310
7295
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
7311
7296
|
/**
|
|
7312
7297
|
* Disallow the use of objects as default parameters.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7314
7299
|
*/
|
|
7315
7300
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
7316
7301
|
/**
|
|
7317
7302
|
* Disallow `process.exit()`.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
|
|
7319
7304
|
*/
|
|
7320
7305
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
7321
7306
|
/**
|
|
7322
7307
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7324
7309
|
*/
|
|
7325
7310
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
7326
7311
|
/**
|
|
7327
7312
|
* Disallow classes that only have static members.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
7329
7314
|
*/
|
|
7330
7315
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
7331
7316
|
/**
|
|
7332
7317
|
* Disallow `then` property.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
7334
7319
|
*/
|
|
7335
7320
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
7336
7321
|
/**
|
|
7337
7322
|
* Disallow assigning `this` to a variable.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
7339
7324
|
*/
|
|
7340
7325
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
7341
7326
|
/**
|
|
7342
7327
|
* Disallow comparing `undefined` using `typeof`.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
7344
7329
|
*/
|
|
7345
7330
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
7346
7331
|
/**
|
|
7347
7332
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7349
7334
|
*/
|
|
7350
7335
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
7351
7336
|
/**
|
|
7352
7337
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7354
7339
|
*/
|
|
7355
7340
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
7356
7341
|
/**
|
|
7357
7342
|
* Disallow awaiting non-promise values.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
7359
7344
|
*/
|
|
7360
7345
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
7361
7346
|
/**
|
|
7362
7347
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7364
7349
|
*/
|
|
7365
7350
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
7366
7351
|
/**
|
|
7367
7352
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7369
7354
|
*/
|
|
7370
7355
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
7371
7356
|
/**
|
|
7372
7357
|
* Disallow unreadable array destructuring.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7374
7359
|
*/
|
|
7375
7360
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
7376
7361
|
/**
|
|
7377
7362
|
* Disallow unreadable IIFEs.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
7379
7364
|
*/
|
|
7380
7365
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
7381
7366
|
/**
|
|
7382
7367
|
* Disallow unused object properties.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
7384
7369
|
*/
|
|
7385
7370
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
7386
|
-
/**
|
|
7387
|
-
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
|
|
7389
|
-
*/
|
|
7390
|
-
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
|
|
7391
7371
|
/**
|
|
7392
7372
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7394
7374
|
*/
|
|
7395
7375
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
7396
7376
|
/**
|
|
7397
7377
|
* Disallow useless fallback when spreading in object literals.
|
|
7398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7399
7379
|
*/
|
|
7400
7380
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
7401
7381
|
/**
|
|
7402
7382
|
* Disallow useless array length check.
|
|
7403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
7404
7384
|
*/
|
|
7405
7385
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
7406
7386
|
/**
|
|
7407
7387
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7409
7389
|
*/
|
|
7410
7390
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
7411
7391
|
/**
|
|
7412
7392
|
* Disallow unnecessary spread.
|
|
7413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
7414
7394
|
*/
|
|
7415
7395
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
7416
7396
|
/**
|
|
7417
7397
|
* Disallow useless case in switch statements.
|
|
7418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
7419
7399
|
*/
|
|
7420
7400
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
7421
7401
|
/**
|
|
7422
7402
|
* Disallow useless `undefined`.
|
|
7423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
7424
7404
|
*/
|
|
7425
7405
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
7426
7406
|
/**
|
|
7427
7407
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
7429
7409
|
*/
|
|
7430
7410
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
7431
7411
|
/**
|
|
7432
7412
|
* Enforce proper case for numeric literals.
|
|
7433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
7434
7414
|
*/
|
|
7435
7415
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
7436
7416
|
/**
|
|
7437
7417
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
7439
7419
|
*/
|
|
7440
7420
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
7441
7421
|
/**
|
|
7442
7422
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
7444
7424
|
*/
|
|
7445
7425
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
7446
7426
|
/**
|
|
7447
7427
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
7449
7429
|
*/
|
|
7450
7430
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
7451
7431
|
/**
|
|
7452
7432
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
7454
7434
|
*/
|
|
7455
7435
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
7456
7436
|
/**
|
|
7457
7437
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
7459
7439
|
*/
|
|
7460
7440
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
7461
7441
|
/**
|
|
7462
7442
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
7464
7444
|
*/
|
|
7465
7445
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
7466
7446
|
/**
|
|
7467
7447
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
7469
7449
|
*/
|
|
7470
7450
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
7471
7451
|
/**
|
|
7472
7452
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
7474
7454
|
*/
|
|
7475
7455
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
7476
|
-
/**
|
|
7477
|
-
* Prefer `BigInt` literals over the constructor.
|
|
7478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
|
|
7479
|
-
*/
|
|
7480
|
-
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
7481
7456
|
/**
|
|
7482
7457
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7484
7459
|
*/
|
|
7485
7460
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
7486
7461
|
/**
|
|
7487
7462
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
7489
7464
|
*/
|
|
7490
7465
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
7491
|
-
/**
|
|
7492
|
-
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7494
|
-
*/
|
|
7495
|
-
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
7496
7466
|
/**
|
|
7497
7467
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
7499
7469
|
*/
|
|
7500
7470
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
7501
7471
|
/**
|
|
7502
7472
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
7504
7474
|
*/
|
|
7505
7475
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
7506
7476
|
/**
|
|
7507
7477
|
* Prefer default parameters over reassignment.
|
|
7508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
7509
7479
|
*/
|
|
7510
7480
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
7511
7481
|
/**
|
|
7512
7482
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
7514
7484
|
*/
|
|
7515
7485
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
7516
7486
|
/**
|
|
7517
7487
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
7519
7489
|
*/
|
|
7520
7490
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
7521
7491
|
/**
|
|
7522
7492
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7524
7494
|
*/
|
|
7525
7495
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
7526
7496
|
/**
|
|
7527
7497
|
* Prefer `.textContent` over `.innerText`.
|
|
7528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7529
7499
|
*/
|
|
7530
7500
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
7531
7501
|
/**
|
|
7532
7502
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
7534
7504
|
*/
|
|
7535
7505
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
7536
7506
|
/**
|
|
7537
7507
|
* Prefer `export…from` when re-exporting.
|
|
7538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
7539
7509
|
*/
|
|
7540
7510
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
7541
7511
|
/**
|
|
7542
7512
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
7544
7514
|
*/
|
|
7545
7515
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
7546
7516
|
/**
|
|
7547
7517
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7549
7519
|
*/
|
|
7550
7520
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
7551
7521
|
/**
|
|
7552
7522
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
7554
7524
|
*/
|
|
7555
7525
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
7556
7526
|
/**
|
|
7557
7527
|
* Prefer reading a JSON file as a buffer.
|
|
7558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
7559
7529
|
*/
|
|
7560
7530
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
7561
7531
|
/**
|
|
7562
7532
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7564
7534
|
*/
|
|
7565
7535
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
7566
7536
|
/**
|
|
7567
7537
|
* Prefer using a logical operator over a ternary.
|
|
7568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7569
7539
|
*/
|
|
7570
7540
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
7571
7541
|
/**
|
|
7572
7542
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
7574
7544
|
*/
|
|
7575
7545
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
7576
7546
|
/**
|
|
7577
7547
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
7579
7549
|
*/
|
|
7580
7550
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
7581
7551
|
/**
|
|
7582
7552
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7584
7554
|
*/
|
|
7585
7555
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
7586
7556
|
/**
|
|
7587
7557
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7589
7559
|
*/
|
|
7590
7560
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
7591
7561
|
/**
|
|
7592
7562
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
7594
7564
|
*/
|
|
7595
7565
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
7596
7566
|
/**
|
|
7597
7567
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7599
7569
|
*/
|
|
7600
7570
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
7601
7571
|
/**
|
|
7602
7572
|
* Prefer negative index over `.length - index` when possible.
|
|
7603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
7604
7574
|
*/
|
|
7605
7575
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
7606
7576
|
/**
|
|
7607
7577
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
7609
7579
|
*/
|
|
7610
7580
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
7611
7581
|
/**
|
|
7612
7582
|
* Prefer `Number` static properties over global ones.
|
|
7613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
7614
7584
|
*/
|
|
7615
7585
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
7616
7586
|
/**
|
|
7617
7587
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
7619
7589
|
*/
|
|
7620
7590
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
7621
7591
|
/**
|
|
7622
7592
|
* Prefer omitting the `catch` binding parameter.
|
|
7623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7624
7594
|
*/
|
|
7625
7595
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
7626
7596
|
/**
|
|
7627
7597
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
7629
7599
|
*/
|
|
7630
7600
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
7631
7601
|
/**
|
|
7632
7602
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
7634
7604
|
*/
|
|
7635
7605
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
7636
7606
|
/**
|
|
7637
7607
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
7639
7609
|
*/
|
|
7640
7610
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
7641
7611
|
/**
|
|
7642
7612
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
7644
7614
|
*/
|
|
7645
7615
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
7646
|
-
/**
|
|
7647
|
-
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
|
|
7649
|
-
*/
|
|
7650
|
-
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
|
|
7651
7616
|
/**
|
|
7652
7617
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
7654
7619
|
*/
|
|
7655
7620
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
7656
7621
|
/**
|
|
7657
7622
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
7659
7624
|
*/
|
|
7660
7625
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
7661
7626
|
/**
|
|
7662
7627
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
7664
7629
|
*/
|
|
7665
7630
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
7666
7631
|
/**
|
|
7667
7632
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
7669
7634
|
*/
|
|
7670
7635
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
7671
7636
|
/**
|
|
7672
7637
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
7674
7639
|
*/
|
|
7675
7640
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
7676
7641
|
/**
|
|
7677
7642
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
7679
7644
|
*/
|
|
7680
7645
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
7681
7646
|
/**
|
|
7682
7647
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
7684
7649
|
*/
|
|
7685
7650
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
7686
7651
|
/**
|
|
7687
7652
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7689
7654
|
*/
|
|
7690
7655
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
7691
7656
|
/**
|
|
7692
7657
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7694
7659
|
*/
|
|
7695
7660
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
7696
7661
|
/**
|
|
7697
7662
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
7699
7664
|
*/
|
|
7700
7665
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
7701
7666
|
/**
|
|
7702
7667
|
* Prefer `switch` over multiple `else-if`.
|
|
7703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
7704
7669
|
*/
|
|
7705
7670
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
7706
7671
|
/**
|
|
7707
7672
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
7709
7674
|
*/
|
|
7710
7675
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
7711
7676
|
/**
|
|
7712
7677
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
7714
7679
|
*/
|
|
7715
7680
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
7716
7681
|
/**
|
|
7717
7682
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
7719
7684
|
*/
|
|
7720
7685
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
7721
7686
|
/**
|
|
7722
7687
|
* Prevent abbreviations.
|
|
7723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
7724
7689
|
*/
|
|
7725
7690
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
7726
7691
|
/**
|
|
7727
7692
|
* Enforce consistent relative URL style.
|
|
7728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
7729
7694
|
*/
|
|
7730
7695
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
7731
7696
|
/**
|
|
7732
7697
|
* Enforce using the separator argument with `Array#join()`.
|
|
7733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
7734
7699
|
*/
|
|
7735
7700
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
7736
|
-
/**
|
|
7737
|
-
* Require non-empty module attributes for imports and exports
|
|
7738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
|
|
7739
|
-
*/
|
|
7740
|
-
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
7741
7701
|
/**
|
|
7742
7702
|
* Require non-empty specifier list in import and export statements.
|
|
7743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
7744
7704
|
*/
|
|
7745
7705
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
7746
7706
|
/**
|
|
7747
7707
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7749
7709
|
*/
|
|
7750
7710
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
7751
7711
|
/**
|
|
7752
7712
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
7754
7714
|
*/
|
|
7755
7715
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
7756
7716
|
/**
|
|
7757
7717
|
* Enforce better string content.
|
|
7758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
7759
7719
|
*/
|
|
7760
7720
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
7761
7721
|
/**
|
|
7762
7722
|
* Enforce consistent brace style for `case` clauses.
|
|
7763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
7764
7724
|
*/
|
|
7765
7725
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
7766
7726
|
/**
|
|
7767
7727
|
* Fix whitespace-insensitive template indentation.
|
|
7768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
7769
7729
|
*/
|
|
7770
7730
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
7771
7731
|
/**
|
|
7772
7732
|
* Enforce consistent case for text encoding identifiers.
|
|
7773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7774
7734
|
*/
|
|
7775
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
7735
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
7776
7736
|
/**
|
|
7777
7737
|
* Require `new` when creating an error.
|
|
7778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
7779
7739
|
*/
|
|
7780
7740
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
7781
7741
|
}
|
|
@@ -7839,15 +7799,6 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
7839
7799
|
interface _UnicornImportStyle_BooleanObject {
|
|
7840
7800
|
[k: string]: boolean | undefined
|
|
7841
7801
|
}
|
|
7842
|
-
// ----- unicorn/isolated-functions -----
|
|
7843
|
-
type UnicornIsolatedFunctions = []|[{
|
|
7844
|
-
overrideGlobals?: {
|
|
7845
|
-
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined
|
|
7846
|
-
}
|
|
7847
|
-
functions?: string[]
|
|
7848
|
-
selectors?: string[]
|
|
7849
|
-
comments?: string[]
|
|
7850
|
-
}]
|
|
7851
7802
|
// ----- unicorn/no-array-reduce -----
|
|
7852
7803
|
type UnicornNoArrayReduce = []|[{
|
|
7853
7804
|
allowSimpleOperations?: boolean
|
|
@@ -7856,10 +7807,6 @@ type UnicornNoArrayReduce = []|[{
|
|
|
7856
7807
|
type UnicornNoArrayReverse = []|[{
|
|
7857
7808
|
allowExpressionStatement?: boolean
|
|
7858
7809
|
}]
|
|
7859
|
-
// ----- unicorn/no-array-sort -----
|
|
7860
|
-
type UnicornNoArraySort = []|[{
|
|
7861
|
-
allowExpressionStatement?: boolean
|
|
7862
|
-
}]
|
|
7863
7810
|
// ----- unicorn/no-instanceof-builtins -----
|
|
7864
7811
|
type UnicornNoInstanceofBuiltins = []|[{
|
|
7865
7812
|
useErrorIsError?: boolean
|
|
@@ -8009,10 +7956,6 @@ type UnicornTemplateIndent = []|[{
|
|
|
8009
7956
|
selectors?: string[]
|
|
8010
7957
|
comments?: string[]
|
|
8011
7958
|
}]
|
|
8012
|
-
// ----- unicorn/text-encoding-identifier-case -----
|
|
8013
|
-
type UnicornTextEncodingIdentifierCase = []|[{
|
|
8014
|
-
withDash?: boolean
|
|
8015
|
-
}]
|
|
8016
7959
|
|
|
8017
7960
|
declare function unicorn(options?: unicorn.Options): Promise<[Config, Config, Config]>;
|
|
8018
7961
|
declare namespace unicorn {
|