@antfu/eslint-config 7.4.2 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +9 -9
- package/dist/index.d.mts +241 -154
- package/dist/index.mjs +28 -4
- package/dist/{lib-DRA-mDV0.mjs → lib-B1Rme4qD.mjs} +222 -222
- package/package.json +36 -36
package/dist/index.d.mts
CHANGED
|
@@ -1011,6 +1011,10 @@ interface RuleOptions {
|
|
|
1011
1011
|
* Use dprint to format code
|
|
1012
1012
|
*/
|
|
1013
1013
|
'format/dprint'?: Linter.RuleEntry<FormatDprint>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Use oxfmt to format code
|
|
1016
|
+
*/
|
|
1017
|
+
'format/oxfmt'?: Linter.RuleEntry<FormatOxfmt>;
|
|
1014
1018
|
/**
|
|
1015
1019
|
* Use Prettier to format code
|
|
1016
1020
|
*/
|
|
@@ -3270,6 +3274,11 @@ interface RuleOptions {
|
|
|
3270
3274
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md
|
|
3271
3275
|
*/
|
|
3272
3276
|
'node/prefer-global/console'?: Linter.RuleEntry<NodePreferGlobalConsole>;
|
|
3277
|
+
/**
|
|
3278
|
+
* enforce either `crypto` or `require("crypto").webcrypto`
|
|
3279
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/crypto.md
|
|
3280
|
+
*/
|
|
3281
|
+
'node/prefer-global/crypto'?: Linter.RuleEntry<NodePreferGlobalCrypto>;
|
|
3273
3282
|
/**
|
|
3274
3283
|
* enforce either `process` or `require("process")`
|
|
3275
3284
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md
|
|
@@ -3285,6 +3294,11 @@ interface RuleOptions {
|
|
|
3285
3294
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md
|
|
3286
3295
|
*/
|
|
3287
3296
|
'node/prefer-global/text-encoder'?: Linter.RuleEntry<NodePreferGlobalTextEncoder>;
|
|
3297
|
+
/**
|
|
3298
|
+
* enforce either global timer functions or `require("timers")`
|
|
3299
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/timers.md
|
|
3300
|
+
*/
|
|
3301
|
+
'node/prefer-global/timers'?: Linter.RuleEntry<NodePreferGlobalTimers>;
|
|
3288
3302
|
/**
|
|
3289
3303
|
* enforce either `URL` or `require("url").URL`
|
|
3290
3304
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md
|
|
@@ -3618,7 +3632,7 @@ interface RuleOptions {
|
|
|
3618
3632
|
*/
|
|
3619
3633
|
'quotes'?: Linter.RuleEntry<Quotes>;
|
|
3620
3634
|
/**
|
|
3621
|
-
* Enforce the
|
|
3635
|
+
* Enforce the use of the radix argument when using `parseInt()`
|
|
3622
3636
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
3623
3637
|
*/
|
|
3624
3638
|
'radix'?: Linter.RuleEntry<Radix>;
|
|
@@ -3855,6 +3869,11 @@ interface RuleOptions {
|
|
|
3855
3869
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
3856
3870
|
*/
|
|
3857
3871
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
|
|
3872
|
+
/**
|
|
3873
|
+
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
3874
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
3875
|
+
*/
|
|
3876
|
+
'react-naming-convention/id-name'?: Linter.RuleEntry<[]>;
|
|
3858
3877
|
/**
|
|
3859
3878
|
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
3860
3879
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
@@ -3892,7 +3911,7 @@ interface RuleOptions {
|
|
|
3892
3911
|
*/
|
|
3893
3912
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
3894
3913
|
/**
|
|
3895
|
-
* Prevents
|
|
3914
|
+
* Prevents unintentional '$' sign before expression.
|
|
3896
3915
|
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
3897
3916
|
*/
|
|
3898
3917
|
'react/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
@@ -6169,11 +6188,21 @@ interface RuleOptions {
|
|
|
6169
6188
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/indent.html
|
|
6170
6189
|
*/
|
|
6171
6190
|
'toml/indent'?: Linter.RuleEntry<TomlIndent>;
|
|
6191
|
+
/**
|
|
6192
|
+
* enforce linebreaks after opening and before closing braces
|
|
6193
|
+
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-newline.html
|
|
6194
|
+
*/
|
|
6195
|
+
'toml/inline-table-curly-newline'?: Linter.RuleEntry<TomlInlineTableCurlyNewline>;
|
|
6172
6196
|
/**
|
|
6173
6197
|
* enforce consistent spacing inside braces
|
|
6174
6198
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-spacing.html
|
|
6175
6199
|
*/
|
|
6176
6200
|
'toml/inline-table-curly-spacing'?: Linter.RuleEntry<TomlInlineTableCurlySpacing>;
|
|
6201
|
+
/**
|
|
6202
|
+
* enforce placing inline table key-value pairs on separate lines
|
|
6203
|
+
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-key-value-newline.html
|
|
6204
|
+
*/
|
|
6205
|
+
'toml/inline-table-key-value-newline'?: Linter.RuleEntry<TomlInlineTableKeyValueNewline>;
|
|
6177
6206
|
/**
|
|
6178
6207
|
* enforce consistent spacing between keys and values in key/value pairs
|
|
6179
6208
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/key-spacing.html
|
|
@@ -6939,725 +6968,730 @@ interface RuleOptions {
|
|
|
6939
6968
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6940
6969
|
/**
|
|
6941
6970
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
|
|
6943
6972
|
*/
|
|
6944
6973
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6945
6974
|
/**
|
|
6946
6975
|
* Enforce a specific parameter name in catch clauses.
|
|
6947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
|
|
6948
6977
|
*/
|
|
6949
6978
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6950
6979
|
/**
|
|
6951
6980
|
* Enforce consistent assertion style with `node:assert`.
|
|
6952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
|
|
6953
6982
|
*/
|
|
6954
6983
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6955
6984
|
/**
|
|
6956
6985
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
|
|
6958
6987
|
*/
|
|
6959
6988
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6960
6989
|
/**
|
|
6961
6990
|
* Use destructured variables over properties.
|
|
6962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
|
|
6963
6992
|
*/
|
|
6964
6993
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6965
6994
|
/**
|
|
6966
6995
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6968
6997
|
*/
|
|
6969
6998
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6970
6999
|
/**
|
|
6971
7000
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
|
|
6973
7002
|
*/
|
|
6974
7003
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6975
7004
|
/**
|
|
6976
7005
|
* Move function definitions to the highest possible scope.
|
|
6977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
|
|
6978
7007
|
*/
|
|
6979
7008
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6980
7009
|
/**
|
|
6981
7010
|
* Enforce correct `Error` subclassing.
|
|
6982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
|
|
6983
7012
|
*/
|
|
6984
7013
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6985
7014
|
/**
|
|
6986
7015
|
* Enforce no spaces between braces.
|
|
6987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
|
|
6988
7017
|
*/
|
|
6989
7018
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6990
7019
|
/**
|
|
6991
7020
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
|
|
6993
7022
|
*/
|
|
6994
7023
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6995
7024
|
/**
|
|
6996
7025
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
|
|
6998
7027
|
*/
|
|
6999
7028
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7000
7029
|
/**
|
|
7001
7030
|
* Add expiration conditions to TODO comments.
|
|
7002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
|
|
7003
7032
|
*/
|
|
7004
7033
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7005
7034
|
/**
|
|
7006
7035
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
|
|
7008
7037
|
*/
|
|
7009
7038
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7010
7039
|
/**
|
|
7011
7040
|
* Enforce a case style for filenames.
|
|
7012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
|
|
7013
7042
|
*/
|
|
7014
7043
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7015
7044
|
/**
|
|
7016
7045
|
* Enforce specific import styles per module.
|
|
7017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
|
|
7018
7047
|
*/
|
|
7019
7048
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7049
|
+
/**
|
|
7050
|
+
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
|
|
7052
|
+
*/
|
|
7053
|
+
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7020
7054
|
/**
|
|
7021
7055
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
7022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
|
|
7023
7057
|
*/
|
|
7024
7058
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7025
7059
|
/**
|
|
7026
7060
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7028
7062
|
*/
|
|
7029
7063
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7030
7064
|
/**
|
|
7031
7065
|
* Disallow recursive access to `this` within getters and setters.
|
|
7032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
|
|
7033
7067
|
*/
|
|
7034
7068
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7035
7069
|
/**
|
|
7036
7070
|
* Disallow anonymous functions and classes as the default export.
|
|
7037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
|
|
7038
7072
|
*/
|
|
7039
7073
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7040
7074
|
/**
|
|
7041
7075
|
* Prevent passing a function reference directly to iterator methods.
|
|
7042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
|
|
7043
7077
|
*/
|
|
7044
7078
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
7045
7079
|
/**
|
|
7046
7080
|
* Prefer `for…of` over the `forEach` method.
|
|
7047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
|
|
7048
7082
|
*/
|
|
7049
7083
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
7050
7084
|
/**
|
|
7051
7085
|
* Disallow using the `this` argument in array methods.
|
|
7052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
|
|
7053
7087
|
*/
|
|
7054
7088
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7055
7089
|
/**
|
|
7056
7090
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7058
7092
|
* @deprecated
|
|
7059
7093
|
*/
|
|
7060
7094
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7061
7095
|
/**
|
|
7062
7096
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
|
|
7064
7098
|
*/
|
|
7065
7099
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7066
7100
|
/**
|
|
7067
7101
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
|
|
7069
7103
|
*/
|
|
7070
7104
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7071
7105
|
/**
|
|
7072
7106
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
|
|
7074
7108
|
*/
|
|
7075
7109
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7076
7110
|
/**
|
|
7077
7111
|
* Disallow member access from await expression.
|
|
7078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
|
|
7079
7113
|
*/
|
|
7080
7114
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7081
7115
|
/**
|
|
7082
7116
|
* Disallow using `await` in `Promise` method parameters.
|
|
7083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7084
7118
|
*/
|
|
7085
7119
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7086
7120
|
/**
|
|
7087
7121
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
|
|
7089
7123
|
*/
|
|
7090
7124
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7091
7125
|
/**
|
|
7092
7126
|
* Do not use `document.cookie` directly.
|
|
7093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
|
|
7094
7128
|
*/
|
|
7095
7129
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7096
7130
|
/**
|
|
7097
7131
|
* Disallow empty files.
|
|
7098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
|
|
7099
7133
|
*/
|
|
7100
7134
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
7101
7135
|
/**
|
|
7102
7136
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
|
|
7104
7138
|
*/
|
|
7105
7139
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7106
7140
|
/**
|
|
7107
7141
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
7108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
|
|
7109
7143
|
*/
|
|
7110
7144
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7111
7145
|
/**
|
|
7112
7146
|
* Disallow immediate mutation after variable assignment.
|
|
7113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
|
|
7114
7148
|
*/
|
|
7115
7149
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7116
7150
|
/**
|
|
7117
7151
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7119
7153
|
* @deprecated
|
|
7120
7154
|
*/
|
|
7121
7155
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7122
7156
|
/**
|
|
7123
7157
|
* Disallow `instanceof` with built-in objects
|
|
7124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
|
|
7125
7159
|
*/
|
|
7126
7160
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7127
7161
|
/**
|
|
7128
7162
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7130
7164
|
*/
|
|
7131
7165
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7132
7166
|
/**
|
|
7133
7167
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7135
7169
|
*/
|
|
7136
7170
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7137
7171
|
/**
|
|
7138
7172
|
* Disallow identifiers starting with `new` or `class`.
|
|
7139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
|
|
7140
7174
|
*/
|
|
7141
7175
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7142
7176
|
/**
|
|
7143
7177
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7145
7179
|
* @deprecated
|
|
7146
7180
|
*/
|
|
7147
7181
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7148
7182
|
/**
|
|
7149
7183
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
|
|
7151
7185
|
*/
|
|
7152
7186
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7153
7187
|
/**
|
|
7154
7188
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7156
7190
|
*/
|
|
7157
7191
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7158
7192
|
/**
|
|
7159
7193
|
* Disallow named usage of default import and export.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
|
|
7161
7195
|
*/
|
|
7162
7196
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7163
7197
|
/**
|
|
7164
7198
|
* Disallow negated conditions.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
|
|
7166
7200
|
*/
|
|
7167
7201
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7168
7202
|
/**
|
|
7169
7203
|
* Disallow negated expression in equality check.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7171
7205
|
*/
|
|
7172
7206
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7173
7207
|
/**
|
|
7174
7208
|
* Disallow nested ternary expressions.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
|
|
7176
7210
|
*/
|
|
7177
7211
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7178
7212
|
/**
|
|
7179
7213
|
* Disallow `new Array()`.
|
|
7180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
|
|
7181
7215
|
*/
|
|
7182
7216
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7183
7217
|
/**
|
|
7184
7218
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
|
|
7186
7220
|
*/
|
|
7187
7221
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7188
7222
|
/**
|
|
7189
7223
|
* Disallow the use of the `null` literal.
|
|
7190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
|
|
7191
7225
|
*/
|
|
7192
7226
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7193
7227
|
/**
|
|
7194
7228
|
* Disallow the use of objects as default parameters.
|
|
7195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7196
7230
|
*/
|
|
7197
7231
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7198
7232
|
/**
|
|
7199
7233
|
* Disallow `process.exit()`.
|
|
7200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
|
|
7201
7235
|
*/
|
|
7202
7236
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7203
7237
|
/**
|
|
7204
7238
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7206
7240
|
*/
|
|
7207
7241
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7208
7242
|
/**
|
|
7209
7243
|
* Disallow classes that only have static members.
|
|
7210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
|
|
7211
7245
|
*/
|
|
7212
7246
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7213
7247
|
/**
|
|
7214
7248
|
* Disallow `then` property.
|
|
7215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
|
|
7216
7250
|
*/
|
|
7217
7251
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7218
7252
|
/**
|
|
7219
7253
|
* Disallow assigning `this` to a variable.
|
|
7220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
|
|
7221
7255
|
*/
|
|
7222
7256
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7223
7257
|
/**
|
|
7224
7258
|
* Disallow comparing `undefined` using `typeof`.
|
|
7225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
|
|
7226
7260
|
*/
|
|
7227
7261
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7228
7262
|
/**
|
|
7229
7263
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7231
7265
|
*/
|
|
7232
7266
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7233
7267
|
/**
|
|
7234
7268
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7236
7270
|
*/
|
|
7237
7271
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7238
7272
|
/**
|
|
7239
7273
|
* Disallow awaiting non-promise values.
|
|
7240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
|
|
7241
7275
|
*/
|
|
7242
7276
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7243
7277
|
/**
|
|
7244
7278
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7246
7280
|
*/
|
|
7247
7281
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7248
7282
|
/**
|
|
7249
7283
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7251
7285
|
*/
|
|
7252
7286
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7253
7287
|
/**
|
|
7254
7288
|
* Disallow unreadable array destructuring.
|
|
7255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7256
7290
|
*/
|
|
7257
7291
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
7258
7292
|
/**
|
|
7259
7293
|
* Disallow unreadable IIFEs.
|
|
7260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
|
|
7261
7295
|
*/
|
|
7262
7296
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7263
7297
|
/**
|
|
7264
7298
|
* Disallow unused object properties.
|
|
7265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
|
|
7266
7300
|
*/
|
|
7267
7301
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7268
7302
|
/**
|
|
7269
7303
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
|
|
7271
7305
|
*/
|
|
7272
7306
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7273
7307
|
/**
|
|
7274
7308
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7276
7310
|
*/
|
|
7277
7311
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7278
7312
|
/**
|
|
7279
7313
|
* Disallow useless fallback when spreading in object literals.
|
|
7280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7281
7315
|
*/
|
|
7282
7316
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7283
7317
|
/**
|
|
7284
7318
|
* Disallow useless array length check.
|
|
7285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
|
|
7286
7320
|
*/
|
|
7287
7321
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7288
7322
|
/**
|
|
7289
7323
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7291
7325
|
*/
|
|
7292
7326
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7293
7327
|
/**
|
|
7294
7328
|
* Disallow unnecessary spread.
|
|
7295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
|
|
7296
7330
|
*/
|
|
7297
7331
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7298
7332
|
/**
|
|
7299
7333
|
* Disallow useless case in switch statements.
|
|
7300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
|
|
7301
7335
|
*/
|
|
7302
7336
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7303
7337
|
/**
|
|
7304
7338
|
* Disallow useless `undefined`.
|
|
7305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
|
|
7306
7340
|
*/
|
|
7307
7341
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7308
7342
|
/**
|
|
7309
7343
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
|
|
7311
7345
|
*/
|
|
7312
7346
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7313
7347
|
/**
|
|
7314
7348
|
* Enforce proper case for numeric literals.
|
|
7315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
|
|
7316
7350
|
*/
|
|
7317
7351
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7318
7352
|
/**
|
|
7319
7353
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
|
|
7321
7355
|
*/
|
|
7322
7356
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7323
7357
|
/**
|
|
7324
7358
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
|
|
7326
7360
|
*/
|
|
7327
7361
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7328
7362
|
/**
|
|
7329
7363
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
|
|
7331
7365
|
*/
|
|
7332
7366
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7333
7367
|
/**
|
|
7334
7368
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
|
|
7336
7370
|
*/
|
|
7337
7371
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7338
7372
|
/**
|
|
7339
7373
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
|
|
7341
7375
|
*/
|
|
7342
7376
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7343
7377
|
/**
|
|
7344
7378
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
|
|
7346
7380
|
*/
|
|
7347
7381
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7348
7382
|
/**
|
|
7349
7383
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
|
|
7351
7385
|
*/
|
|
7352
7386
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7353
7387
|
/**
|
|
7354
7388
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
|
|
7356
7390
|
*/
|
|
7357
7391
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7358
7392
|
/**
|
|
7359
7393
|
* Prefer `BigInt` literals over the constructor.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
|
|
7361
7395
|
*/
|
|
7362
7396
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7363
7397
|
/**
|
|
7364
7398
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7366
7400
|
*/
|
|
7367
7401
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7368
7402
|
/**
|
|
7369
7403
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
|
|
7371
7405
|
*/
|
|
7372
7406
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7373
7407
|
/**
|
|
7374
7408
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7376
7410
|
*/
|
|
7377
7411
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7378
7412
|
/**
|
|
7379
7413
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
|
|
7381
7415
|
*/
|
|
7382
7416
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7383
7417
|
/**
|
|
7384
7418
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
|
|
7386
7420
|
*/
|
|
7387
7421
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7388
7422
|
/**
|
|
7389
7423
|
* Prefer default parameters over reassignment.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
|
|
7391
7425
|
*/
|
|
7392
7426
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7393
7427
|
/**
|
|
7394
7428
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
|
|
7396
7430
|
*/
|
|
7397
7431
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7398
7432
|
/**
|
|
7399
7433
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
7401
7435
|
*/
|
|
7402
7436
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7403
7437
|
/**
|
|
7404
7438
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7406
7440
|
*/
|
|
7407
7441
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7408
7442
|
/**
|
|
7409
7443
|
* Prefer `.textContent` over `.innerText`.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7411
7445
|
*/
|
|
7412
7446
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7413
7447
|
/**
|
|
7414
7448
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
|
|
7416
7450
|
*/
|
|
7417
7451
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7418
7452
|
/**
|
|
7419
7453
|
* Prefer `export…from` when re-exporting.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
|
|
7421
7455
|
*/
|
|
7422
7456
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7423
7457
|
/**
|
|
7424
7458
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
|
|
7426
7460
|
*/
|
|
7427
7461
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7428
7462
|
/**
|
|
7429
7463
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7431
7465
|
*/
|
|
7432
7466
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7433
7467
|
/**
|
|
7434
7468
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
|
|
7436
7470
|
*/
|
|
7437
7471
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7438
7472
|
/**
|
|
7439
7473
|
* Prefer reading a JSON file as a buffer.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
7441
7475
|
*/
|
|
7442
7476
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7443
7477
|
/**
|
|
7444
7478
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7446
7480
|
*/
|
|
7447
7481
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7448
7482
|
/**
|
|
7449
7483
|
* Prefer using a logical operator over a ternary.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7451
7485
|
*/
|
|
7452
7486
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7453
7487
|
/**
|
|
7454
7488
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
|
|
7456
7490
|
*/
|
|
7457
7491
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7458
7492
|
/**
|
|
7459
7493
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
|
|
7461
7495
|
*/
|
|
7462
7496
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7463
7497
|
/**
|
|
7464
7498
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7466
7500
|
*/
|
|
7467
7501
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7468
7502
|
/**
|
|
7469
7503
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7471
7505
|
*/
|
|
7472
7506
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7473
7507
|
/**
|
|
7474
7508
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
|
|
7476
7510
|
*/
|
|
7477
7511
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7478
7512
|
/**
|
|
7479
7513
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7481
7515
|
*/
|
|
7482
7516
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7483
7517
|
/**
|
|
7484
7518
|
* Prefer negative index over `.length - index` when possible.
|
|
7485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
|
|
7486
7520
|
*/
|
|
7487
7521
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7488
7522
|
/**
|
|
7489
7523
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
|
|
7491
7525
|
*/
|
|
7492
7526
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7493
7527
|
/**
|
|
7494
7528
|
* Prefer `Number` static properties over global ones.
|
|
7495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
|
|
7496
7530
|
*/
|
|
7497
7531
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7498
7532
|
/**
|
|
7499
7533
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
|
|
7501
7535
|
*/
|
|
7502
7536
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7503
7537
|
/**
|
|
7504
7538
|
* Prefer omitting the `catch` binding parameter.
|
|
7505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7506
7540
|
*/
|
|
7507
7541
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7508
7542
|
/**
|
|
7509
7543
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
|
|
7511
7545
|
*/
|
|
7512
7546
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7513
7547
|
/**
|
|
7514
7548
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
|
|
7516
7550
|
*/
|
|
7517
7551
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
7518
7552
|
/**
|
|
7519
7553
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
|
|
7521
7555
|
*/
|
|
7522
7556
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7523
7557
|
/**
|
|
7524
7558
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
|
|
7526
7560
|
*/
|
|
7527
7561
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7528
7562
|
/**
|
|
7529
7563
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
|
|
7531
7565
|
*/
|
|
7532
7566
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7533
7567
|
/**
|
|
7534
7568
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
|
|
7536
7570
|
*/
|
|
7537
7571
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
7538
7572
|
/**
|
|
7539
7573
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
|
|
7541
7575
|
*/
|
|
7542
7576
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7543
7577
|
/**
|
|
7544
7578
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
|
|
7546
7580
|
*/
|
|
7547
7581
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7548
7582
|
/**
|
|
7549
7583
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
|
|
7551
7585
|
*/
|
|
7552
7586
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7553
7587
|
/**
|
|
7554
7588
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
|
|
7556
7590
|
*/
|
|
7557
7591
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7558
7592
|
/**
|
|
7559
7593
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
|
|
7561
7595
|
*/
|
|
7562
7596
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7563
7597
|
/**
|
|
7564
7598
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
|
|
7566
7600
|
*/
|
|
7567
7601
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7568
7602
|
/**
|
|
7569
7603
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7571
7605
|
*/
|
|
7572
7606
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7573
7607
|
/**
|
|
7574
7608
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7576
7610
|
*/
|
|
7577
7611
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7578
7612
|
/**
|
|
7579
7613
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
|
|
7581
7615
|
*/
|
|
7582
7616
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7583
7617
|
/**
|
|
7584
7618
|
* Prefer `switch` over multiple `else-if`.
|
|
7585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
|
|
7586
7620
|
*/
|
|
7587
7621
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7588
7622
|
/**
|
|
7589
7623
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
|
|
7591
7625
|
*/
|
|
7592
7626
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7593
7627
|
/**
|
|
7594
7628
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
|
|
7596
7630
|
*/
|
|
7597
7631
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7598
7632
|
/**
|
|
7599
7633
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
|
|
7601
7635
|
*/
|
|
7602
7636
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7603
7637
|
/**
|
|
7604
7638
|
* Prevent abbreviations.
|
|
7605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
|
|
7606
7640
|
*/
|
|
7607
7641
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7608
7642
|
/**
|
|
7609
7643
|
* Enforce consistent relative URL style.
|
|
7610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
|
|
7611
7645
|
*/
|
|
7612
7646
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7613
7647
|
/**
|
|
7614
7648
|
* Enforce using the separator argument with `Array#join()`.
|
|
7615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
|
|
7616
7650
|
*/
|
|
7617
7651
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7618
7652
|
/**
|
|
7619
7653
|
* Require non-empty module attributes for imports and exports
|
|
7620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
|
|
7621
7655
|
*/
|
|
7622
7656
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7623
7657
|
/**
|
|
7624
7658
|
* Require non-empty specifier list in import and export statements.
|
|
7625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
|
|
7626
7660
|
*/
|
|
7627
7661
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7628
7662
|
/**
|
|
7629
7663
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7631
7665
|
*/
|
|
7632
7666
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7633
7667
|
/**
|
|
7634
7668
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
|
|
7636
7670
|
*/
|
|
7637
7671
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7638
7672
|
/**
|
|
7639
7673
|
* Enforce better string content.
|
|
7640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
|
|
7641
7675
|
*/
|
|
7642
7676
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7643
7677
|
/**
|
|
7644
7678
|
* Enforce consistent brace style for `case` clauses.
|
|
7645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
|
|
7646
7680
|
*/
|
|
7647
7681
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7648
7682
|
/**
|
|
7649
7683
|
* Fix whitespace-insensitive template indentation.
|
|
7650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
|
|
7651
7685
|
*/
|
|
7652
7686
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7653
7687
|
/**
|
|
7654
7688
|
* Enforce consistent case for text encoding identifiers.
|
|
7655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7656
7690
|
*/
|
|
7657
7691
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7658
7692
|
/**
|
|
7659
7693
|
* Require `new` when creating an error.
|
|
7660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
|
|
7661
7695
|
*/
|
|
7662
7696
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7663
7697
|
/**
|
|
@@ -8996,7 +9030,7 @@ interface RuleOptions {
|
|
|
8996
9030
|
* enforce valid `v-for` directives
|
|
8997
9031
|
* @see https://eslint.vuejs.org/rules/valid-v-for.html
|
|
8998
9032
|
*/
|
|
8999
|
-
'vue/valid-v-for'?: Linter.RuleEntry<
|
|
9033
|
+
'vue/valid-v-for'?: Linter.RuleEntry<VueValidVFor>;
|
|
9000
9034
|
/**
|
|
9001
9035
|
* enforce valid `v-html` directives
|
|
9002
9036
|
* @see https://eslint.vuejs.org/rules/valid-v-html.html
|
|
@@ -9810,6 +9844,10 @@ type FormatDprint = [] | [{
|
|
|
9810
9844
|
plugins?: unknown[];
|
|
9811
9845
|
[k: string]: unknown | undefined;
|
|
9812
9846
|
}];
|
|
9847
|
+
// ----- format/oxfmt -----
|
|
9848
|
+
type FormatOxfmt = [] | [{
|
|
9849
|
+
[k: string]: unknown | undefined;
|
|
9850
|
+
}];
|
|
9813
9851
|
// ----- format/prettier -----
|
|
9814
9852
|
type FormatPrettier = [] | [{
|
|
9815
9853
|
parser: string;
|
|
@@ -10464,6 +10502,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
|
|
|
10464
10502
|
endLines?: (number | null);
|
|
10465
10503
|
maxBlockLines?: (number | null);
|
|
10466
10504
|
startLines?: (number | null);
|
|
10505
|
+
startLinesWithNoTags?: number;
|
|
10467
10506
|
tags?: {
|
|
10468
10507
|
[k: string]: {
|
|
10469
10508
|
count?: number;
|
|
@@ -10692,6 +10731,7 @@ type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
|
10692
10731
|
type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
10693
10732
|
arraysInObjects?: boolean;
|
|
10694
10733
|
objectsInObjects?: boolean;
|
|
10734
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
10695
10735
|
}];
|
|
10696
10736
|
// ----- jsonc/object-property-newline -----
|
|
10697
10737
|
type JsoncObjectPropertyNewline = [] | [{
|
|
@@ -11539,6 +11579,7 @@ type MaxParams = [] | [(number | {
|
|
|
11539
11579
|
maximum?: number;
|
|
11540
11580
|
max?: number;
|
|
11541
11581
|
countVoidThis?: boolean;
|
|
11582
|
+
countThis?: ("never" | "except-void" | "always");
|
|
11542
11583
|
})];
|
|
11543
11584
|
// ----- max-statements -----
|
|
11544
11585
|
type MaxStatements = [] | [(number | {
|
|
@@ -12197,12 +12238,16 @@ type NodeNoUnsupportedFeaturesNodeBuiltins = [] | [{
|
|
|
12197
12238
|
type NodePreferGlobalBuffer = [] | [("always" | "never")];
|
|
12198
12239
|
// ----- node/prefer-global/console -----
|
|
12199
12240
|
type NodePreferGlobalConsole = [] | [("always" | "never")];
|
|
12241
|
+
// ----- node/prefer-global/crypto -----
|
|
12242
|
+
type NodePreferGlobalCrypto = [] | [("always" | "never")];
|
|
12200
12243
|
// ----- node/prefer-global/process -----
|
|
12201
12244
|
type NodePreferGlobalProcess = [] | [("always" | "never")];
|
|
12202
12245
|
// ----- node/prefer-global/text-decoder -----
|
|
12203
12246
|
type NodePreferGlobalTextDecoder = [] | [("always" | "never")];
|
|
12204
12247
|
// ----- node/prefer-global/text-encoder -----
|
|
12205
12248
|
type NodePreferGlobalTextEncoder = [] | [("always" | "never")];
|
|
12249
|
+
// ----- node/prefer-global/timers -----
|
|
12250
|
+
type NodePreferGlobalTimers = [] | [("always" | "never")];
|
|
12206
12251
|
// ----- node/prefer-global/url -----
|
|
12207
12252
|
type NodePreferGlobalUrl = [] | [("always" | "never")];
|
|
12208
12253
|
// ----- node/prefer-global/url-search-params -----
|
|
@@ -16410,13 +16455,17 @@ type StylePaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
|
|
|
16410
16455
|
}];
|
|
16411
16456
|
// ----- style/padding-line-between-statements -----
|
|
16412
16457
|
type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
|
|
16413
|
-
type _StylePaddingLineBetweenStatementsStatementOption = (
|
|
16458
|
+
type _StylePaddingLineBetweenStatementsStatementOption = (_StylePaddingLineBetweenStatementsStatementMatcher | [_StylePaddingLineBetweenStatementsStatementMatcher, ...(_StylePaddingLineBetweenStatementsStatementMatcher)[]]);
|
|
16459
|
+
type _StylePaddingLineBetweenStatementsStatementMatcher = (_StylePaddingLineBetweenStatementsStatementType | _StylePaddingLineBetweenStatements_SelectorOption);
|
|
16414
16460
|
type _StylePaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type");
|
|
16415
16461
|
type StylePaddingLineBetweenStatements = {
|
|
16416
16462
|
blankLine: _StylePaddingLineBetweenStatementsPaddingType;
|
|
16417
16463
|
prev: _StylePaddingLineBetweenStatementsStatementOption;
|
|
16418
16464
|
next: _StylePaddingLineBetweenStatementsStatementOption;
|
|
16419
16465
|
}[];
|
|
16466
|
+
interface _StylePaddingLineBetweenStatements_SelectorOption {
|
|
16467
|
+
selector: string;
|
|
16468
|
+
}
|
|
16420
16469
|
// ----- style/quote-props -----
|
|
16421
16470
|
type StyleQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
16422
16471
|
keywords?: boolean;
|
|
@@ -16884,10 +16933,21 @@ type TomlIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
16884
16933
|
subTables?: number;
|
|
16885
16934
|
keyValuePairs?: number;
|
|
16886
16935
|
}];
|
|
16936
|
+
// ----- toml/inline-table-curly-newline -----
|
|
16937
|
+
type TomlInlineTableCurlyNewline = [] | [(("always" | "never") | {
|
|
16938
|
+
multiline?: boolean;
|
|
16939
|
+
minProperties?: number;
|
|
16940
|
+
consistent?: boolean;
|
|
16941
|
+
})];
|
|
16887
16942
|
// ----- toml/inline-table-curly-spacing -----
|
|
16888
16943
|
type TomlInlineTableCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
16889
16944
|
arraysInObjects?: boolean;
|
|
16890
16945
|
objectsInObjects?: boolean;
|
|
16946
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
16947
|
+
}];
|
|
16948
|
+
// ----- toml/inline-table-key-value-newline -----
|
|
16949
|
+
type TomlInlineTableKeyValueNewline = [] | [{
|
|
16950
|
+
allowAllPropertiesOnSameLine?: boolean;
|
|
16891
16951
|
}];
|
|
16892
16952
|
// ----- toml/key-spacing -----
|
|
16893
16953
|
type TomlKeySpacing = [] | [({
|
|
@@ -17996,6 +18056,15 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
17996
18056
|
interface _UnicornImportStyle_BooleanObject {
|
|
17997
18057
|
[k: string]: boolean | undefined;
|
|
17998
18058
|
}
|
|
18059
|
+
// ----- unicorn/isolated-functions -----
|
|
18060
|
+
type UnicornIsolatedFunctions = [] | [{
|
|
18061
|
+
overrideGlobals?: {
|
|
18062
|
+
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined;
|
|
18063
|
+
};
|
|
18064
|
+
functions?: string[];
|
|
18065
|
+
selectors?: string[];
|
|
18066
|
+
comments?: string[];
|
|
18067
|
+
}];
|
|
17999
18068
|
// ----- unicorn/no-array-reduce -----
|
|
18000
18069
|
type UnicornNoArrayReduce = [] | [{
|
|
18001
18070
|
allowSimpleOperations?: boolean;
|
|
@@ -18323,6 +18392,7 @@ type VueAttributesOrder = [] | [{
|
|
|
18323
18392
|
order?: (("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT") | ("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT")[])[];
|
|
18324
18393
|
alphabetical?: boolean;
|
|
18325
18394
|
sortLineLength?: boolean;
|
|
18395
|
+
ignoreVBindObject?: boolean;
|
|
18326
18396
|
}];
|
|
18327
18397
|
// ----- vue/block-lang -----
|
|
18328
18398
|
type VueBlockLang = [] | [{
|
|
@@ -18414,7 +18484,7 @@ type VueDefineMacrosOrder = [] | [{
|
|
|
18414
18484
|
type VueDefinePropsDeclaration = [] | [("type-based" | "runtime")];
|
|
18415
18485
|
// ----- vue/define-props-destructuring -----
|
|
18416
18486
|
type VueDefinePropsDestructuring = [] | [{
|
|
18417
|
-
destructure?: ("always" | "never");
|
|
18487
|
+
destructure?: ("only-when-assigned" | "always" | "never");
|
|
18418
18488
|
}];
|
|
18419
18489
|
// ----- vue/dot-location -----
|
|
18420
18490
|
type VueDotLocation = [] | [("object" | "property")];
|
|
@@ -19467,6 +19537,10 @@ type VueVSlotStyle = [] | [(("shorthand" | "longform") | {
|
|
|
19467
19537
|
default?: ("shorthand" | "longform" | "v-slot");
|
|
19468
19538
|
named?: ("shorthand" | "longform");
|
|
19469
19539
|
})];
|
|
19540
|
+
// ----- vue/valid-v-for -----
|
|
19541
|
+
type VueValidVFor = [] | [{
|
|
19542
|
+
allowEmptyAlias?: boolean;
|
|
19543
|
+
}];
|
|
19470
19544
|
// ----- vue/valid-v-on -----
|
|
19471
19545
|
type VueValidVOn = [] | [{
|
|
19472
19546
|
modifiers?: unknown[];
|
|
@@ -19513,6 +19587,7 @@ type YamlFlowMappingCurlyNewline = [] | [(("always" | "never") | {
|
|
|
19513
19587
|
type YamlFlowMappingCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
19514
19588
|
arraysInObjects?: boolean;
|
|
19515
19589
|
objectsInObjects?: boolean;
|
|
19590
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
19516
19591
|
}];
|
|
19517
19592
|
// ----- yaml/flow-sequence-bracket-newline -----
|
|
19518
19593
|
type YamlFlowSequenceBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
@@ -19698,7 +19773,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
19698
19773
|
onlyEquality?: boolean;
|
|
19699
19774
|
}];
|
|
19700
19775
|
// Names of all the configs
|
|
19701
|
-
type ConfigNames = 'antfu/gitignore' | 'antfu/ignores' | 'antfu/javascript/setup' | 'antfu/javascript/rules' | 'antfu/eslint-comments/rules' | 'antfu/command/rules' | 'antfu/perfectionist/setup' | 'antfu/node/rules' | 'antfu/jsdoc/rules' | 'antfu/imports/rules' | 'antfu/unicorn/rules' | 'antfu/jsx/setup' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/type-aware-parser' | 'antfu/typescript/rules' | 'antfu/typescript/rules-type-aware' | 'antfu/typescript/erasable-syntax-only' | 'antfu/stylistic/rules' | 'antfu/regexp/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/react/typescript' | 'antfu/react/type-aware-rules' | 'antfu/nextjs/setup' | 'antfu/nextjs/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/unocss' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/sort/package-json' | 'antfu/sort/tsconfig-json' | 'antfu/pnpm/package-json' | 'antfu/pnpm/pnpm-workspace-yaml' | 'antfu/pnpm/pnpm-workspace-yaml-sort' | 'antfu/yaml/setup' | 'antfu/yaml/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/disables' | 'antfu/formatter/setup' | 'antfu/formatter/css' | 'antfu/formatter/scss' | 'antfu/formatter/less' | 'antfu/formatter/html' | 'antfu/formatter/xml' | 'antfu/formatter/svg' | 'antfu/formatter/markdown' | 'antfu/formatter/astro' | 'antfu/formatter/astro/disables' | 'antfu/formatter/graphql' | 'antfu/disables/scripts' | 'antfu/disables/cli' | 'antfu/disables/bin' | 'antfu/disables/dts' | 'antfu/disables/cjs' | 'antfu/disables/config-files';
|
|
19776
|
+
type ConfigNames = 'antfu/gitignore' | 'antfu/ignores' | 'antfu/javascript/setup' | 'antfu/javascript/rules' | 'antfu/eslint-comments/rules' | 'antfu/command/rules' | 'antfu/perfectionist/setup' | 'antfu/node/rules' | 'antfu/jsdoc/rules' | 'antfu/imports/rules' | 'antfu/unicorn/rules' | 'antfu/jsx/setup' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/type-aware-parser' | 'antfu/typescript/rules' | 'antfu/typescript/rules-type-aware' | 'antfu/typescript/erasable-syntax-only' | 'antfu/stylistic/rules' | 'antfu/regexp/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/react/typescript' | 'antfu/react/type-aware-rules' | 'antfu/nextjs/setup' | 'antfu/nextjs/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/unocss' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/sort/package-json' | 'antfu/sort/tsconfig-json' | 'antfu/pnpm/package-json' | 'antfu/pnpm/pnpm-workspace-yaml' | 'antfu/pnpm/pnpm-workspace-yaml-sort' | 'antfu/yaml/setup' | 'antfu/yaml/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/rules' | 'antfu/markdown/disables/markdown' | 'antfu/markdown/disables/code' | 'antfu/formatter/setup' | 'antfu/formatter/css' | 'antfu/formatter/scss' | 'antfu/formatter/less' | 'antfu/formatter/html' | 'antfu/formatter/xml' | 'antfu/formatter/svg' | 'antfu/formatter/markdown' | 'antfu/formatter/astro' | 'antfu/formatter/astro/disables' | 'antfu/formatter/graphql' | 'antfu/disables/scripts' | 'antfu/disables/cli' | 'antfu/disables/bin' | 'antfu/disables/dts' | 'antfu/disables/cjs' | 'antfu/disables/config-files';
|
|
19702
19777
|
//#endregion
|
|
19703
19778
|
//#region src/vender/prettier-types.d.ts
|
|
19704
19779
|
/**
|
|
@@ -19965,6 +20040,18 @@ interface OptionsUnicorn extends OptionsOverrides {
|
|
|
19965
20040
|
*/
|
|
19966
20041
|
allRecommended?: boolean;
|
|
19967
20042
|
}
|
|
20043
|
+
interface OptionsMarkdown extends OptionsOverrides {
|
|
20044
|
+
/**
|
|
20045
|
+
* Enable GFM (GitHub Flavored Markdown) support.
|
|
20046
|
+
*
|
|
20047
|
+
* @default true
|
|
20048
|
+
*/
|
|
20049
|
+
gfm?: boolean;
|
|
20050
|
+
/**
|
|
20051
|
+
* Override rules for markdown itself.
|
|
20052
|
+
*/
|
|
20053
|
+
overridesMarkdown?: TypedFlatConfigItem['rules'];
|
|
20054
|
+
}
|
|
19968
20055
|
interface OptionsTypeScriptParserOptions {
|
|
19969
20056
|
/**
|
|
19970
20057
|
* Additional parser options for TypeScript.
|
|
@@ -20196,13 +20283,13 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
20196
20283
|
*/
|
|
20197
20284
|
angular?: boolean | OptionsOverrides;
|
|
20198
20285
|
/**
|
|
20199
|
-
* Enable linting for **code snippets** in Markdown.
|
|
20286
|
+
* Enable linting for **code snippets** in Markdown and the markdown content itself.
|
|
20200
20287
|
*
|
|
20201
20288
|
* For formatting Markdown content, enable also `formatters.markdown`.
|
|
20202
20289
|
*
|
|
20203
20290
|
* @default true
|
|
20204
20291
|
*/
|
|
20205
|
-
markdown?: boolean |
|
|
20292
|
+
markdown?: boolean | OptionsMarkdown;
|
|
20206
20293
|
/**
|
|
20207
20294
|
* Enable stylistic rules.
|
|
20208
20295
|
*
|
|
@@ -20387,7 +20474,7 @@ declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverri
|
|
|
20387
20474
|
declare function jsx(options?: OptionsJSX): Promise<TypedFlatConfigItem[]>;
|
|
20388
20475
|
//#endregion
|
|
20389
20476
|
//#region src/configs/markdown.d.ts
|
|
20390
|
-
declare function markdown(options?: OptionsFiles & OptionsComponentExts &
|
|
20477
|
+
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsMarkdown): Promise<TypedFlatConfigItem[]>;
|
|
20391
20478
|
//#endregion
|
|
20392
20479
|
//#region src/configs/nextjs.d.ts
|
|
20393
20480
|
declare function nextjs(options?: OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
@@ -20565,4 +20652,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
20565
20652
|
declare function isInEditorEnv(): boolean;
|
|
20566
20653
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
20567
20654
|
//#endregion
|
|
20568
|
-
export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, type RuleOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, angular, antfu, antfu as default, astro, combine, command, comments, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
20655
|
+
export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsMarkdown, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, type RuleOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, angular, antfu, antfu as default, astro, combine, command, comments, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|