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