@ntnyq/eslint-config 3.0.0-beta.18 → 3.0.0-beta.19

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 CHANGED
@@ -3897,687 +3897,702 @@ interface RuleOptions {
3897
3897
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
3898
3898
  /**
3899
3899
  * Improve regexes by making them shorter, consistent, and safer.
3900
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/better-regex.md
3900
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/better-regex.md
3901
3901
  */
3902
3902
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
3903
3903
  /**
3904
3904
  * Enforce a specific parameter name in catch clauses.
3905
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/catch-error-name.md
3905
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/catch-error-name.md
3906
3906
  */
3907
3907
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
3908
3908
  /**
3909
3909
  * Use destructured variables over properties.
3910
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/consistent-destructuring.md
3910
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-destructuring.md
3911
3911
  */
3912
3912
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
3913
3913
  /**
3914
3914
  * Prefer consistent types when spreading a ternary in an array literal.
3915
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/consistent-empty-array-spread.md
3915
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-empty-array-spread.md
3916
3916
  */
3917
3917
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
3918
+ /**
3919
+ * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
3920
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-existence-index-check.md
3921
+ */
3922
+ 'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
3918
3923
  /**
3919
3924
  * Move function definitions to the highest possible scope.
3920
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/consistent-function-scoping.md
3925
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-function-scoping.md
3921
3926
  */
3922
3927
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
3923
3928
  /**
3924
3929
  * Enforce correct `Error` subclassing.
3925
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/custom-error-definition.md
3930
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/custom-error-definition.md
3926
3931
  */
3927
3932
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
3928
3933
  /**
3929
3934
  * Enforce no spaces between braces.
3930
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/empty-brace-spaces.md
3935
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/empty-brace-spaces.md
3931
3936
  */
3932
3937
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
3933
3938
  /**
3934
3939
  * Enforce passing a `message` value when creating a built-in error.
3935
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/error-message.md
3940
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/error-message.md
3936
3941
  */
3937
3942
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
3938
3943
  /**
3939
3944
  * Require escape sequences to use uppercase values.
3940
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/escape-case.md
3945
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/escape-case.md
3941
3946
  */
3942
3947
  'unicorn/escape-case'?: Linter.RuleEntry<[]>;
3943
3948
  /**
3944
3949
  * Add expiration conditions to TODO comments.
3945
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/expiring-todo-comments.md
3950
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/expiring-todo-comments.md
3946
3951
  */
3947
3952
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
3948
3953
  /**
3949
3954
  * Enforce explicitly comparing the `length` or `size` property of a value.
3950
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/explicit-length-check.md
3955
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/explicit-length-check.md
3951
3956
  */
3952
3957
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
3953
3958
  /**
3954
3959
  * Enforce a case style for filenames.
3955
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/filename-case.md
3960
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/filename-case.md
3956
3961
  */
3957
3962
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
3958
3963
  /**
3959
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#import-index
3964
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#import-index
3960
3965
  * @deprecated
3961
3966
  */
3962
3967
  'unicorn/import-index'?: Linter.RuleEntry<[]>;
3963
3968
  /**
3964
3969
  * Enforce specific import styles per module.
3965
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/import-style.md
3970
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/import-style.md
3966
3971
  */
3967
3972
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
3968
3973
  /**
3969
3974
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
3970
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/new-for-builtins.md
3975
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/new-for-builtins.md
3971
3976
  */
3972
3977
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
3973
3978
  /**
3974
3979
  * Enforce specifying rules to disable in `eslint-disable` comments.
3975
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-abusive-eslint-disable.md
3980
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-abusive-eslint-disable.md
3976
3981
  */
3977
3982
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
3978
3983
  /**
3979
3984
  * Disallow anonymous functions and classes as the default export.
3980
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-anonymous-default-export.md
3985
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-anonymous-default-export.md
3981
3986
  */
3982
3987
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
3983
3988
  /**
3984
3989
  * Prevent passing a function reference directly to iterator methods.
3985
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-callback-reference.md
3990
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-callback-reference.md
3986
3991
  */
3987
3992
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
3988
3993
  /**
3989
3994
  * Prefer `for…of` over the `forEach` method.
3990
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-for-each.md
3995
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-for-each.md
3991
3996
  */
3992
3997
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
3993
3998
  /**
3994
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-array-instanceof
3999
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-array-instanceof
3995
4000
  * @deprecated
3996
4001
  */
3997
4002
  'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>;
3998
4003
  /**
3999
4004
  * Disallow using the `this` argument in array methods.
4000
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-method-this-argument.md
4005
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-method-this-argument.md
4001
4006
  */
4002
4007
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
4003
4008
  /**
4004
4009
  * Enforce combining multiple `Array#push()` into one call.
4005
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-push-push.md
4010
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-push-push.md
4006
4011
  */
4007
4012
  'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>;
4008
4013
  /**
4009
4014
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
4010
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-reduce.md
4015
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-reduce.md
4011
4016
  */
4012
4017
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
4013
4018
  /**
4014
4019
  * Disallow member access from await expression.
4015
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-await-expression-member.md
4020
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-expression-member.md
4016
4021
  */
4017
4022
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
4018
4023
  /**
4019
4024
  * Disallow using `await` in `Promise` method parameters.
4020
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-await-in-promise-methods.md
4025
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-in-promise-methods.md
4021
4026
  */
4022
4027
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
4023
4028
  /**
4024
4029
  * Do not use leading/trailing space between `console.log` parameters.
4025
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-console-spaces.md
4030
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-console-spaces.md
4026
4031
  */
4027
4032
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
4028
4033
  /**
4029
4034
  * Do not use `document.cookie` directly.
4030
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-document-cookie.md
4035
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-document-cookie.md
4031
4036
  */
4032
4037
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
4033
4038
  /**
4034
4039
  * Disallow empty files.
4035
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-empty-file.md
4040
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-empty-file.md
4036
4041
  */
4037
4042
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
4038
4043
  /**
4039
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
4044
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
4040
4045
  * @deprecated
4041
4046
  */
4042
4047
  'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>;
4043
4048
  /**
4044
4049
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
4045
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-for-loop.md
4050
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-for-loop.md
4046
4051
  */
4047
4052
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
4048
4053
  /**
4049
4054
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
4050
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-hex-escape.md
4055
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-hex-escape.md
4051
4056
  */
4052
4057
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
4053
4058
  /**
4054
4059
  * Require `Array.isArray()` instead of `instanceof Array`.
4055
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-instanceof-array.md
4060
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-instanceof-array.md
4056
4061
  */
4057
4062
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
4058
4063
  /**
4059
4064
  * Disallow invalid options in `fetch()` and `new Request()`.
4060
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-invalid-fetch-options.md
4065
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-fetch-options.md
4061
4066
  */
4062
4067
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
4063
4068
  /**
4064
4069
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
4065
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-invalid-remove-event-listener.md
4070
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-remove-event-listener.md
4066
4071
  */
4067
4072
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
4068
4073
  /**
4069
4074
  * Disallow identifiers starting with `new` or `class`.
4070
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-keyword-prefix.md
4075
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-keyword-prefix.md
4071
4076
  */
4072
4077
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
4073
4078
  /**
4074
4079
  * Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
4075
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-length-as-slice-end.md
4080
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-length-as-slice-end.md
4076
4081
  */
4077
4082
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
4078
4083
  /**
4079
4084
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
4080
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-lonely-if.md
4085
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-lonely-if.md
4081
4086
  */
4082
4087
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
4083
4088
  /**
4084
4089
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
4085
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-magic-array-flat-depth.md
4090
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-magic-array-flat-depth.md
4086
4091
  */
4087
4092
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
4088
4093
  /**
4089
4094
  * Disallow negated conditions.
4090
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-negated-condition.md
4095
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negated-condition.md
4091
4096
  */
4092
4097
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
4093
4098
  /**
4094
4099
  * Disallow negated expression in equality check.
4095
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-negation-in-equality-check.md
4100
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negation-in-equality-check.md
4096
4101
  */
4097
4102
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
4098
4103
  /**
4099
4104
  * Disallow nested ternary expressions.
4100
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-nested-ternary.md
4105
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-nested-ternary.md
4101
4106
  */
4102
4107
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
4103
4108
  /**
4104
4109
  * Disallow `new Array()`.
4105
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-new-array.md
4110
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-array.md
4106
4111
  */
4107
4112
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
4108
4113
  /**
4109
4114
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
4110
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-new-buffer.md
4115
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-buffer.md
4111
4116
  */
4112
4117
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
4113
4118
  /**
4114
4119
  * Disallow the use of the `null` literal.
4115
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-null.md
4120
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-null.md
4116
4121
  */
4117
4122
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
4118
4123
  /**
4119
4124
  * Disallow the use of objects as default parameters.
4120
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-object-as-default-parameter.md
4125
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-object-as-default-parameter.md
4121
4126
  */
4122
4127
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
4123
4128
  /**
4124
4129
  * Disallow `process.exit()`.
4125
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-process-exit.md
4130
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-process-exit.md
4126
4131
  */
4127
4132
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
4128
4133
  /**
4129
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-reduce
4134
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-reduce
4130
4135
  * @deprecated
4131
4136
  */
4132
4137
  'unicorn/no-reduce'?: Linter.RuleEntry<[]>;
4133
4138
  /**
4134
4139
  * Disallow passing single-element arrays to `Promise` methods.
4135
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-single-promise-in-promise-methods.md
4140
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-single-promise-in-promise-methods.md
4136
4141
  */
4137
4142
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
4138
4143
  /**
4139
4144
  * Disallow classes that only have static members.
4140
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-static-only-class.md
4145
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-static-only-class.md
4141
4146
  */
4142
4147
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
4143
4148
  /**
4144
4149
  * Disallow `then` property.
4145
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-thenable.md
4150
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-thenable.md
4146
4151
  */
4147
4152
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
4148
4153
  /**
4149
4154
  * Disallow assigning `this` to a variable.
4150
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-this-assignment.md
4155
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-this-assignment.md
4151
4156
  */
4152
4157
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
4153
4158
  /**
4154
4159
  * Disallow comparing `undefined` using `typeof`.
4155
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-typeof-undefined.md
4160
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-typeof-undefined.md
4156
4161
  */
4157
4162
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
4158
4163
  /**
4159
4164
  * Disallow awaiting non-promise values.
4160
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unnecessary-await.md
4165
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-await.md
4161
4166
  */
4162
4167
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
4163
4168
  /**
4164
4169
  * Enforce the use of built-in methods instead of unnecessary polyfills.
4165
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unnecessary-polyfills.md
4170
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-polyfills.md
4166
4171
  */
4167
4172
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
4168
4173
  /**
4169
4174
  * Disallow unreadable array destructuring.
4170
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unreadable-array-destructuring.md
4175
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-array-destructuring.md
4171
4176
  */
4172
4177
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
4173
4178
  /**
4174
4179
  * Disallow unreadable IIFEs.
4175
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unreadable-iife.md
4180
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-iife.md
4176
4181
  */
4177
4182
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
4178
4183
  /**
4179
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-unsafe-regex
4184
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-unsafe-regex
4180
4185
  * @deprecated
4181
4186
  */
4182
4187
  'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>;
4183
4188
  /**
4184
4189
  * Disallow unused object properties.
4185
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unused-properties.md
4190
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unused-properties.md
4186
4191
  */
4187
4192
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
4188
4193
  /**
4189
4194
  * Disallow useless fallback when spreading in object literals.
4190
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-fallback-in-spread.md
4195
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-fallback-in-spread.md
4191
4196
  */
4192
4197
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
4193
4198
  /**
4194
4199
  * Disallow useless array length check.
4195
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-length-check.md
4200
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-length-check.md
4196
4201
  */
4197
4202
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
4198
4203
  /**
4199
4204
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
4200
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-promise-resolve-reject.md
4205
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-promise-resolve-reject.md
4201
4206
  */
4202
4207
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
4203
4208
  /**
4204
4209
  * Disallow unnecessary spread.
4205
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-spread.md
4210
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-spread.md
4206
4211
  */
4207
4212
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
4208
4213
  /**
4209
4214
  * Disallow useless case in switch statements.
4210
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-switch-case.md
4215
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-switch-case.md
4211
4216
  */
4212
4217
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
4213
4218
  /**
4214
4219
  * Disallow useless `undefined`.
4215
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-undefined.md
4220
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-undefined.md
4216
4221
  */
4217
4222
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
4218
4223
  /**
4219
4224
  * Disallow number literals with zero fractions or dangling dots.
4220
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-zero-fractions.md
4225
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-zero-fractions.md
4221
4226
  */
4222
4227
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
4223
4228
  /**
4224
4229
  * Enforce proper case for numeric literals.
4225
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/number-literal-case.md
4230
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/number-literal-case.md
4226
4231
  */
4227
4232
  'unicorn/number-literal-case'?: Linter.RuleEntry<[]>;
4228
4233
  /**
4229
4234
  * Enforce the style of numeric separators by correctly grouping digits.
4230
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/numeric-separators-style.md
4235
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/numeric-separators-style.md
4231
4236
  */
4232
4237
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
4233
4238
  /**
4234
4239
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
4235
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-add-event-listener.md
4240
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-add-event-listener.md
4236
4241
  */
4237
4242
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
4238
4243
  /**
4239
4244
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
4240
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-find.md
4245
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-find.md
4241
4246
  */
4242
4247
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
4243
4248
  /**
4244
4249
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
4245
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-flat.md
4250
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat.md
4246
4251
  */
4247
4252
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
4248
4253
  /**
4249
4254
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
4250
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-flat-map.md
4255
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat-map.md
4251
4256
  */
4252
4257
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
4253
4258
  /**
4254
4259
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
4255
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-index-of.md
4260
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-index-of.md
4256
4261
  */
4257
4262
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
4258
4263
  /**
4259
4264
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
4260
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-some.md
4265
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-some.md
4261
4266
  */
4262
4267
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
4263
4268
  /**
4264
4269
  * Prefer `.at()` method for index access and `String#charAt()`.
4265
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-at.md
4270
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-at.md
4266
4271
  */
4267
4272
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
4268
4273
  /**
4269
4274
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
4270
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-blob-reading-methods.md
4275
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-blob-reading-methods.md
4271
4276
  */
4272
4277
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
4273
4278
  /**
4274
4279
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
4275
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-code-point.md
4280
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-code-point.md
4276
4281
  */
4277
4282
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
4278
4283
  /**
4279
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-dataset
4284
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-dataset
4280
4285
  * @deprecated
4281
4286
  */
4282
4287
  'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>;
4283
4288
  /**
4284
4289
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
4285
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-date-now.md
4290
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-date-now.md
4286
4291
  */
4287
4292
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
4288
4293
  /**
4289
4294
  * Prefer default parameters over reassignment.
4290
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-default-parameters.md
4295
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-default-parameters.md
4291
4296
  */
4292
4297
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
4293
4298
  /**
4294
4299
  * Prefer `Node#append()` over `Node#appendChild()`.
4295
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-append.md
4300
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-append.md
4296
4301
  */
4297
4302
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
4298
4303
  /**
4299
4304
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
4300
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-dataset.md
4305
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-dataset.md
4301
4306
  */
4302
4307
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
4303
4308
  /**
4304
4309
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
4305
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-remove.md
4310
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-remove.md
4306
4311
  */
4307
4312
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
4308
4313
  /**
4309
4314
  * Prefer `.textContent` over `.innerText`.
4310
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-text-content.md
4315
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-text-content.md
4311
4316
  */
4312
4317
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
4313
4318
  /**
4314
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-event-key
4319
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-event-key
4315
4320
  * @deprecated
4316
4321
  */
4317
4322
  'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>;
4318
4323
  /**
4319
4324
  * Prefer `EventTarget` over `EventEmitter`.
4320
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-event-target.md
4325
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-event-target.md
4321
4326
  */
4322
4327
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
4323
4328
  /**
4324
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
4329
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
4325
4330
  * @deprecated
4326
4331
  */
4327
4332
  'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>;
4328
4333
  /**
4329
4334
  * Prefer `export…from` when re-exporting.
4330
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-export-from.md
4335
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-export-from.md
4331
4336
  */
4332
4337
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
4333
4338
  /**
4334
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-flat-map
4339
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-flat-map
4335
4340
  * @deprecated
4336
4341
  */
4337
4342
  'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>;
4343
+ /**
4344
+ * Prefer `globalThis` over `window`, `self`, and `global`.
4345
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-global-this.md
4346
+ */
4347
+ 'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
4338
4348
  /**
4339
4349
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
4340
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-includes.md
4350
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-includes.md
4341
4351
  */
4342
4352
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
4343
4353
  /**
4344
4354
  * Prefer reading a JSON file as a buffer.
4345
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-json-parse-buffer.md
4355
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-json-parse-buffer.md
4346
4356
  */
4347
4357
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
4348
4358
  /**
4349
4359
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
4350
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-keyboard-event-key.md
4360
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-keyboard-event-key.md
4351
4361
  */
4352
4362
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
4353
4363
  /**
4354
4364
  * Prefer using a logical operator over a ternary.
4355
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-logical-operator-over-ternary.md
4365
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-logical-operator-over-ternary.md
4356
4366
  */
4357
4367
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
4368
+ /**
4369
+ * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
4370
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-min-max.md
4371
+ */
4372
+ 'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
4358
4373
  /**
4359
4374
  * Enforce the use of `Math.trunc` instead of bitwise operators.
4360
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-math-trunc.md
4375
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-trunc.md
4361
4376
  */
4362
4377
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
4363
4378
  /**
4364
4379
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
4365
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-modern-dom-apis.md
4380
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-dom-apis.md
4366
4381
  */
4367
4382
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
4368
4383
  /**
4369
4384
  * Prefer modern `Math` APIs over legacy patterns.
4370
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-modern-math-apis.md
4385
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-math-apis.md
4371
4386
  */
4372
4387
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
4373
4388
  /**
4374
4389
  * Prefer JavaScript modules (ESM) over CommonJS.
4375
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-module.md
4390
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-module.md
4376
4391
  */
4377
4392
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
4378
4393
  /**
4379
4394
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
4380
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-native-coercion-functions.md
4395
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-native-coercion-functions.md
4381
4396
  */
4382
4397
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
4383
4398
  /**
4384
4399
  * Prefer negative index over `.length - index` when possible.
4385
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-negative-index.md
4400
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-negative-index.md
4386
4401
  */
4387
4402
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
4388
4403
  /**
4389
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-node-append
4404
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-append
4390
4405
  * @deprecated
4391
4406
  */
4392
4407
  'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>;
4393
4408
  /**
4394
4409
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
4395
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-node-protocol.md
4410
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-node-protocol.md
4396
4411
  */
4397
4412
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
4398
4413
  /**
4399
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-node-remove
4414
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-remove
4400
4415
  * @deprecated
4401
4416
  */
4402
4417
  'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>;
4403
4418
  /**
4404
4419
  * Prefer `Number` static properties over global ones.
4405
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-number-properties.md
4420
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-number-properties.md
4406
4421
  */
4407
4422
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
4408
4423
  /**
4409
4424
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
4410
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-object-from-entries.md
4425
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-object-from-entries.md
4411
4426
  */
4412
4427
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
4413
4428
  /**
4414
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-object-has-own
4429
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-object-has-own
4415
4430
  * @deprecated
4416
4431
  */
4417
4432
  'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>;
4418
4433
  /**
4419
4434
  * Prefer omitting the `catch` binding parameter.
4420
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-optional-catch-binding.md
4435
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-optional-catch-binding.md
4421
4436
  */
4422
4437
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
4423
4438
  /**
4424
4439
  * Prefer borrowing methods from the prototype instead of the instance.
4425
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-prototype-methods.md
4440
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-prototype-methods.md
4426
4441
  */
4427
4442
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
4428
4443
  /**
4429
- * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
4430
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-query-selector.md
4444
+ * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
4445
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-query-selector.md
4431
4446
  */
4432
4447
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
4433
4448
  /**
4434
4449
  * Prefer `Reflect.apply()` over `Function#apply()`.
4435
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-reflect-apply.md
4450
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-reflect-apply.md
4436
4451
  */
4437
4452
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
4438
4453
  /**
4439
4454
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
4440
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-regexp-test.md
4455
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-regexp-test.md
4441
4456
  */
4442
4457
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
4443
4458
  /**
4444
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-replace-all
4459
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-replace-all
4445
4460
  * @deprecated
4446
4461
  */
4447
4462
  'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>;
4448
4463
  /**
4449
4464
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
4450
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-set-has.md
4465
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-has.md
4451
4466
  */
4452
4467
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
4453
4468
  /**
4454
4469
  * Prefer using `Set#size` instead of `Array#length`.
4455
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-set-size.md
4470
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-size.md
4456
4471
  */
4457
4472
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
4458
4473
  /**
4459
4474
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
4460
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-spread.md
4475
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-spread.md
4461
4476
  */
4462
4477
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
4463
4478
  /**
4464
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
4479
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
4465
4480
  * @deprecated
4466
4481
  */
4467
4482
  'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>;
4468
4483
  /**
4469
4484
  * Prefer using the `String.raw` tag to avoid escaping `\`.
4470
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-raw.md
4485
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-raw.md
4471
4486
  */
4472
4487
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
4473
4488
  /**
4474
4489
  * Prefer `String#replaceAll()` over regex searches with the global flag.
4475
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-replace-all.md
4490
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-replace-all.md
4476
4491
  */
4477
4492
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
4478
4493
  /**
4479
4494
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
4480
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-slice.md
4495
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-slice.md
4481
4496
  */
4482
4497
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
4483
4498
  /**
4484
4499
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
4485
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-starts-ends-with.md
4500
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-starts-ends-with.md
4486
4501
  */
4487
4502
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
4488
4503
  /**
4489
4504
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
4490
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-trim-start-end.md
4505
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-trim-start-end.md
4491
4506
  */
4492
4507
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
4493
4508
  /**
4494
4509
  * Prefer using `structuredClone` to create a deep clone.
4495
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-structured-clone.md
4510
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-structured-clone.md
4496
4511
  */
4497
4512
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
4498
4513
  /**
4499
4514
  * Prefer `switch` over multiple `else-if`.
4500
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-switch.md
4515
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-switch.md
4501
4516
  */
4502
4517
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
4503
4518
  /**
4504
4519
  * Prefer ternary expressions over simple `if-else` statements.
4505
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-ternary.md
4520
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-ternary.md
4506
4521
  */
4507
4522
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
4508
4523
  /**
4509
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-text-content
4524
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-text-content
4510
4525
  * @deprecated
4511
4526
  */
4512
4527
  'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>;
4513
4528
  /**
4514
4529
  * Prefer top-level await over top-level promises and async function calls.
4515
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-top-level-await.md
4530
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-top-level-await.md
4516
4531
  */
4517
4532
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
4518
4533
  /**
4519
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-trim-start-end
4534
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-trim-start-end
4520
4535
  * @deprecated
4521
4536
  */
4522
4537
  'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>;
4523
4538
  /**
4524
4539
  * Enforce throwing `TypeError` in type checking conditions.
4525
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-type-error.md
4540
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-type-error.md
4526
4541
  */
4527
4542
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
4528
4543
  /**
4529
4544
  * Prevent abbreviations.
4530
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prevent-abbreviations.md
4545
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prevent-abbreviations.md
4531
4546
  */
4532
4547
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
4533
4548
  /**
4534
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#regex-shorthand
4549
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#regex-shorthand
4535
4550
  * @deprecated
4536
4551
  */
4537
4552
  'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>;
4538
4553
  /**
4539
4554
  * Enforce consistent relative URL style.
4540
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/relative-url-style.md
4555
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/relative-url-style.md
4541
4556
  */
4542
4557
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
4543
4558
  /**
4544
4559
  * Enforce using the separator argument with `Array#join()`.
4545
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/require-array-join-separator.md
4560
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-array-join-separator.md
4546
4561
  */
4547
4562
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
4548
4563
  /**
4549
4564
  * Enforce using the digits argument with `Number#toFixed()`.
4550
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/require-number-to-fixed-digits-argument.md
4565
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-number-to-fixed-digits-argument.md
4551
4566
  */
4552
4567
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
4553
4568
  /**
4554
4569
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
4555
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/require-post-message-target-origin.md
4570
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-post-message-target-origin.md
4556
4571
  */
4557
4572
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
4558
4573
  /**
4559
4574
  * Enforce better string content.
4560
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/string-content.md
4575
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/string-content.md
4561
4576
  */
4562
4577
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
4563
4578
  /**
4564
4579
  * Enforce consistent brace style for `case` clauses.
4565
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/switch-case-braces.md
4580
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/switch-case-braces.md
4566
4581
  */
4567
4582
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
4568
4583
  /**
4569
4584
  * Fix whitespace-insensitive template indentation.
4570
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/template-indent.md
4585
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/template-indent.md
4571
4586
  */
4572
4587
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
4573
4588
  /**
4574
4589
  * Enforce consistent case for text encoding identifiers.
4575
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/text-encoding-identifier-case.md
4590
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/text-encoding-identifier-case.md
4576
4591
  */
4577
4592
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
4578
4593
  /**
4579
4594
  * Require `new` when creating an error.
4580
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/throw-new-error.md
4595
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/throw-new-error.md
4581
4596
  */
4582
4597
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
4583
4598
  /**
@@ -7144,6 +7159,7 @@ type Complexity = [] | [
7144
7159
  (number | {
7145
7160
  maximum?: number;
7146
7161
  max?: number;
7162
+ variant?: ("classic" | "modified");
7147
7163
  })
7148
7164
  ];
7149
7165
  type ComputedPropertySpacing = [] | [("always" | "never")] | [