@2digits/eslint-config 5.2.5 → 5.2.6

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.mts CHANGED
@@ -1652,6 +1652,11 @@ interface RuleOptions {
1652
1652
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
1653
1653
  */
1654
1654
  'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>;
1655
+ /**
1656
+ * Require or disallow metadata for fenced code blocks
1657
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-meta.md
1658
+ */
1659
+ 'markdown/fenced-code-meta'?: Linter.RuleEntry<MarkdownFencedCodeMeta>;
1655
1660
  /**
1656
1661
  * Enforce heading levels increment by one
1657
1662
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
@@ -6969,730 +6974,750 @@ interface RuleOptions {
6969
6974
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
6970
6975
  /**
6971
6976
  * Improve regexes by making them shorter, consistent, and safer.
6972
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
6977
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
6973
6978
  */
6974
6979
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
6975
6980
  /**
6976
6981
  * Enforce a specific parameter name in catch clauses.
6977
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
6982
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
6978
6983
  */
6979
6984
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
6980
6985
  /**
6981
6986
  * Enforce consistent assertion style with `node:assert`.
6982
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
6987
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
6983
6988
  */
6984
6989
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
6985
6990
  /**
6986
6991
  * Prefer passing `Date` directly to the constructor when cloning.
6987
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
6992
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
6988
6993
  */
6989
6994
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
6990
6995
  /**
6991
6996
  * Use destructured variables over properties.
6992
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
6997
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
6993
6998
  */
6994
6999
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
6995
7000
  /**
6996
7001
  * Prefer consistent types when spreading a ternary in an array literal.
6997
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
7002
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
6998
7003
  */
6999
7004
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
7000
7005
  /**
7001
7006
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
7002
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
7007
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
7003
7008
  */
7004
7009
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
7005
7010
  /**
7006
7011
  * Move function definitions to the highest possible scope.
7007
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
7012
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
7008
7013
  */
7009
7014
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
7015
+ /**
7016
+ * Enforce consistent style for escaping `${` in template literals.
7017
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
7018
+ */
7019
+ 'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
7010
7020
  /**
7011
7021
  * Enforce correct `Error` subclassing.
7012
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
7022
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
7013
7023
  */
7014
7024
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
7015
7025
  /**
7016
7026
  * Enforce no spaces between braces.
7017
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
7027
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
7018
7028
  */
7019
7029
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
7020
7030
  /**
7021
7031
  * Enforce passing a `message` value when creating a built-in error.
7022
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
7032
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
7023
7033
  */
7024
7034
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
7025
7035
  /**
7026
7036
  * Require escape sequences to use uppercase or lowercase values.
7027
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
7037
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
7028
7038
  */
7029
7039
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
7030
7040
  /**
7031
7041
  * Add expiration conditions to TODO comments.
7032
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
7042
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
7033
7043
  */
7034
7044
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
7035
7045
  /**
7036
7046
  * Enforce explicitly comparing the `length` or `size` property of a value.
7037
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
7047
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
7038
7048
  */
7039
7049
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
7040
7050
  /**
7041
7051
  * Enforce a case style for filenames.
7042
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
7052
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
7043
7053
  */
7044
7054
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
7045
7055
  /**
7046
7056
  * Enforce specific import styles per module.
7047
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
7057
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
7048
7058
  */
7049
7059
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
7050
7060
  /**
7051
7061
  * Prevent usage of variables from outside the scope of isolated functions.
7052
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
7062
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
7053
7063
  */
7054
7064
  'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
7055
7065
  /**
7056
7066
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
7057
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
7067
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
7058
7068
  */
7059
7069
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
7060
7070
  /**
7061
7071
  * Enforce specifying rules to disable in `eslint-disable` comments.
7062
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
7072
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
7063
7073
  */
7064
7074
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
7065
7075
  /**
7066
7076
  * Disallow recursive access to `this` within getters and setters.
7067
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
7077
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
7068
7078
  */
7069
7079
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
7070
7080
  /**
7071
7081
  * Disallow anonymous functions and classes as the default export.
7072
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
7082
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
7073
7083
  */
7074
7084
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
7075
7085
  /**
7076
7086
  * Prevent passing a function reference directly to iterator methods.
7077
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
7087
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
7078
7088
  */
7079
7089
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
7080
7090
  /**
7081
7091
  * Prefer `for…of` over the `forEach` method.
7082
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
7092
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
7083
7093
  */
7084
7094
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
7085
7095
  /**
7086
7096
  * Disallow using the `this` argument in array methods.
7087
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
7097
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
7088
7098
  */
7089
7099
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
7090
7100
  /**
7091
7101
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
7092
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
7102
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
7093
7103
  * @deprecated
7094
7104
  */
7095
7105
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
7096
7106
  /**
7097
7107
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
7098
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
7108
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
7099
7109
  */
7100
7110
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
7101
7111
  /**
7102
7112
  * Prefer `Array#toReversed()` over `Array#reverse()`.
7103
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
7113
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
7104
7114
  */
7105
7115
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
7106
7116
  /**
7107
7117
  * Prefer `Array#toSorted()` over `Array#sort()`.
7108
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
7118
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
7109
7119
  */
7110
7120
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
7111
7121
  /**
7112
7122
  * Disallow member access from await expression.
7113
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
7123
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
7114
7124
  */
7115
7125
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
7116
7126
  /**
7117
7127
  * Disallow using `await` in `Promise` method parameters.
7118
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
7128
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
7119
7129
  */
7120
7130
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
7121
7131
  /**
7122
7132
  * Do not use leading/trailing space between `console.log` parameters.
7123
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
7133
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
7124
7134
  */
7125
7135
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
7126
7136
  /**
7127
7137
  * Do not use `document.cookie` directly.
7128
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
7138
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
7129
7139
  */
7130
7140
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
7131
7141
  /**
7132
7142
  * Disallow empty files.
7133
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
7143
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
7134
7144
  */
7135
7145
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
7136
7146
  /**
7137
7147
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
7138
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
7148
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
7139
7149
  */
7140
7150
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
7141
7151
  /**
7142
7152
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
7143
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
7153
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
7144
7154
  */
7145
7155
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
7146
7156
  /**
7147
7157
  * Disallow immediate mutation after variable assignment.
7148
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
7158
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
7149
7159
  */
7150
7160
  'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
7151
7161
  /**
7152
7162
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
7153
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
7163
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
7154
7164
  * @deprecated
7155
7165
  */
7156
7166
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
7157
7167
  /**
7158
7168
  * Disallow `instanceof` with built-in objects
7159
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
7169
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
7160
7170
  */
7161
7171
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
7162
7172
  /**
7163
7173
  * Disallow invalid options in `fetch()` and `new Request()`.
7164
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
7174
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
7165
7175
  */
7166
7176
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
7167
7177
  /**
7168
7178
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
7169
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
7179
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
7170
7180
  */
7171
7181
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
7172
7182
  /**
7173
7183
  * Disallow identifiers starting with `new` or `class`.
7174
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
7184
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
7175
7185
  */
7176
7186
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
7177
7187
  /**
7178
7188
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
7179
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
7189
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
7180
7190
  * @deprecated
7181
7191
  */
7182
7192
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
7183
7193
  /**
7184
7194
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
7185
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
7195
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
7186
7196
  */
7187
7197
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
7188
7198
  /**
7189
7199
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
7190
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
7200
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
7191
7201
  */
7192
7202
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
7193
7203
  /**
7194
7204
  * Disallow named usage of default import and export.
7195
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
7205
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
7196
7206
  */
7197
7207
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
7198
7208
  /**
7199
7209
  * Disallow negated conditions.
7200
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
7210
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
7201
7211
  */
7202
7212
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
7203
7213
  /**
7204
7214
  * Disallow negated expression in equality check.
7205
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
7215
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
7206
7216
  */
7207
7217
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
7208
7218
  /**
7209
7219
  * Disallow nested ternary expressions.
7210
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
7220
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
7211
7221
  */
7212
7222
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
7213
7223
  /**
7214
7224
  * Disallow `new Array()`.
7215
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
7225
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
7216
7226
  */
7217
7227
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
7218
7228
  /**
7219
7229
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
7220
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
7230
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
7221
7231
  */
7222
7232
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
7223
7233
  /**
7224
7234
  * Disallow the use of the `null` literal.
7225
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
7235
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
7226
7236
  */
7227
7237
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
7228
7238
  /**
7229
7239
  * Disallow the use of objects as default parameters.
7230
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
7240
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
7231
7241
  */
7232
7242
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
7233
7243
  /**
7234
7244
  * Disallow `process.exit()`.
7235
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
7245
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
7236
7246
  */
7237
7247
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
7238
7248
  /**
7239
7249
  * Disallow passing single-element arrays to `Promise` methods.
7240
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
7250
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
7241
7251
  */
7242
7252
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
7243
7253
  /**
7244
7254
  * Disallow classes that only have static members.
7245
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
7255
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
7246
7256
  */
7247
7257
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
7248
7258
  /**
7249
7259
  * Disallow `then` property.
7250
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
7260
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
7251
7261
  */
7252
7262
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
7253
7263
  /**
7254
7264
  * Disallow assigning `this` to a variable.
7255
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
7265
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
7256
7266
  */
7257
7267
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
7258
7268
  /**
7259
7269
  * Disallow comparing `undefined` using `typeof`.
7260
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
7270
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
7261
7271
  */
7262
7272
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
7263
7273
  /**
7264
7274
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
7265
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
7275
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
7266
7276
  */
7267
7277
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
7268
7278
  /**
7269
7279
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
7270
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
7280
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
7271
7281
  */
7272
7282
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
7273
7283
  /**
7274
7284
  * Disallow awaiting non-promise values.
7275
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
7285
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
7276
7286
  */
7277
7287
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
7278
7288
  /**
7279
7289
  * Enforce the use of built-in methods instead of unnecessary polyfills.
7280
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
7290
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
7281
7291
  */
7282
7292
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
7283
7293
  /**
7284
7294
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
7285
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
7295
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
7286
7296
  */
7287
7297
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
7288
7298
  /**
7289
7299
  * Disallow unreadable array destructuring.
7290
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
7300
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
7291
7301
  */
7292
7302
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
7293
7303
  /**
7294
7304
  * Disallow unreadable IIFEs.
7295
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
7305
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
7296
7306
  */
7297
7307
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
7298
7308
  /**
7299
7309
  * Disallow unused object properties.
7300
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
7310
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
7301
7311
  */
7302
7312
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
7303
7313
  /**
7304
7314
  * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
7305
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
7315
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
7306
7316
  */
7307
7317
  'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
7308
7318
  /**
7309
7319
  * Disallow unnecessary `Error.captureStackTrace(…)`.
7310
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
7320
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
7311
7321
  */
7312
7322
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
7313
7323
  /**
7314
7324
  * Disallow useless fallback when spreading in object literals.
7315
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
7325
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
7316
7326
  */
7317
7327
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
7328
+ /**
7329
+ * Disallow unnecessary `.toArray()` on iterators.
7330
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
7331
+ */
7332
+ 'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
7318
7333
  /**
7319
7334
  * Disallow useless array length check.
7320
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
7335
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
7321
7336
  */
7322
7337
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
7323
7338
  /**
7324
7339
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
7325
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
7340
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
7326
7341
  */
7327
7342
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
7328
7343
  /**
7329
7344
  * Disallow unnecessary spread.
7330
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
7345
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
7331
7346
  */
7332
7347
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
7333
7348
  /**
7334
7349
  * Disallow useless case in switch statements.
7335
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
7350
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
7336
7351
  */
7337
7352
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
7338
7353
  /**
7339
7354
  * Disallow useless `undefined`.
7340
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
7355
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
7341
7356
  */
7342
7357
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
7343
7358
  /**
7344
7359
  * Disallow number literals with zero fractions or dangling dots.
7345
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
7360
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
7346
7361
  */
7347
7362
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
7348
7363
  /**
7349
7364
  * Enforce proper case for numeric literals.
7350
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
7365
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
7351
7366
  */
7352
7367
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
7353
7368
  /**
7354
7369
  * Enforce the style of numeric separators by correctly grouping digits.
7355
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
7370
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
7356
7371
  */
7357
7372
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
7358
7373
  /**
7359
7374
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
7360
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
7375
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
7361
7376
  */
7362
7377
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
7363
7378
  /**
7364
7379
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
7365
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
7380
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
7366
7381
  */
7367
7382
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
7368
7383
  /**
7369
7384
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
7370
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
7385
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
7371
7386
  */
7372
7387
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
7373
7388
  /**
7374
7389
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
7375
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
7390
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
7376
7391
  */
7377
7392
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
7378
7393
  /**
7379
7394
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
7380
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
7395
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
7381
7396
  */
7382
7397
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
7383
7398
  /**
7384
7399
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
7385
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
7400
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
7386
7401
  */
7387
7402
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
7388
7403
  /**
7389
7404
  * Prefer `.at()` method for index access and `String#charAt()`.
7390
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
7405
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
7391
7406
  */
7392
7407
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
7393
7408
  /**
7394
7409
  * Prefer `BigInt` literals over the constructor.
7395
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
7410
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
7396
7411
  */
7397
7412
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
7398
7413
  /**
7399
7414
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
7400
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
7415
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
7401
7416
  */
7402
7417
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
7403
7418
  /**
7404
7419
  * Prefer class field declarations over `this` assignments in constructors.
7405
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
7420
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
7406
7421
  */
7407
7422
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
7408
7423
  /**
7409
7424
  * Prefer using `Element#classList.toggle()` to toggle class names.
7410
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
7425
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
7411
7426
  */
7412
7427
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
7413
7428
  /**
7414
7429
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
7415
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
7430
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
7416
7431
  */
7417
7432
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
7418
7433
  /**
7419
7434
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
7420
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
7435
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
7421
7436
  */
7422
7437
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
7423
7438
  /**
7424
7439
  * Prefer default parameters over reassignment.
7425
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
7440
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
7426
7441
  */
7427
7442
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
7428
7443
  /**
7429
7444
  * Prefer `Node#append()` over `Node#appendChild()`.
7430
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
7445
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
7431
7446
  */
7432
7447
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
7433
7448
  /**
7434
7449
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
7435
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
7450
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
7436
7451
  */
7437
7452
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
7438
7453
  /**
7439
7454
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
7440
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
7455
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
7441
7456
  */
7442
7457
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
7443
7458
  /**
7444
7459
  * Prefer `.textContent` over `.innerText`.
7445
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
7460
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
7446
7461
  */
7447
7462
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
7448
7463
  /**
7449
7464
  * Prefer `EventTarget` over `EventEmitter`.
7450
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
7465
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
7451
7466
  */
7452
7467
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
7453
7468
  /**
7454
7469
  * Prefer `export…from` when re-exporting.
7455
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
7470
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
7456
7471
  */
7457
7472
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
7458
7473
  /**
7459
7474
  * Prefer `globalThis` over `window`, `self`, and `global`.
7460
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
7475
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
7461
7476
  */
7462
7477
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
7463
7478
  /**
7464
7479
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
7465
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
7480
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
7466
7481
  */
7467
7482
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
7468
7483
  /**
7469
7484
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
7470
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
7485
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
7471
7486
  */
7472
7487
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
7473
7488
  /**
7474
7489
  * Prefer reading a JSON file as a buffer.
7475
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
7490
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
7476
7491
  */
7477
7492
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
7478
7493
  /**
7479
7494
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
7480
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
7495
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
7481
7496
  */
7482
7497
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
7483
7498
  /**
7484
7499
  * Prefer using a logical operator over a ternary.
7485
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
7500
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
7486
7501
  */
7487
7502
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
7488
7503
  /**
7489
7504
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
7490
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
7505
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
7491
7506
  */
7492
7507
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
7493
7508
  /**
7494
7509
  * Enforce the use of `Math.trunc` instead of bitwise operators.
7495
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
7510
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
7496
7511
  */
7497
7512
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
7498
7513
  /**
7499
7514
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
7500
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
7515
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
7501
7516
  */
7502
7517
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
7503
7518
  /**
7504
7519
  * Prefer modern `Math` APIs over legacy patterns.
7505
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
7520
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
7506
7521
  */
7507
7522
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
7508
7523
  /**
7509
7524
  * Prefer JavaScript modules (ESM) over CommonJS.
7510
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
7525
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
7511
7526
  */
7512
7527
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
7513
7528
  /**
7514
7529
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
7515
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
7530
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
7516
7531
  */
7517
7532
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
7518
7533
  /**
7519
7534
  * Prefer negative index over `.length - index` when possible.
7520
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
7535
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
7521
7536
  */
7522
7537
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
7523
7538
  /**
7524
7539
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
7525
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
7540
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
7526
7541
  */
7527
7542
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
7528
7543
  /**
7529
7544
  * Prefer `Number` static properties over global ones.
7530
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
7545
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
7531
7546
  */
7532
7547
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
7533
7548
  /**
7534
7549
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
7535
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
7550
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
7536
7551
  */
7537
7552
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
7538
7553
  /**
7539
7554
  * Prefer omitting the `catch` binding parameter.
7540
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
7555
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
7541
7556
  */
7542
7557
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
7543
7558
  /**
7544
7559
  * Prefer borrowing methods from the prototype instead of the instance.
7545
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
7560
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
7546
7561
  */
7547
7562
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
7548
7563
  /**
7549
7564
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
7550
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
7565
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
7551
7566
  */
7552
7567
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
7553
7568
  /**
7554
7569
  * Prefer `Reflect.apply()` over `Function#apply()`.
7555
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
7570
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
7556
7571
  */
7557
7572
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
7558
7573
  /**
7559
7574
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
7560
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
7575
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
7561
7576
  */
7562
7577
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
7563
7578
  /**
7564
7579
  * Prefer `Response.json()` over `new Response(JSON.stringify())`.
7565
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
7580
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
7566
7581
  */
7567
7582
  'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
7568
7583
  /**
7569
7584
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
7570
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
7585
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
7571
7586
  */
7572
7587
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
7573
7588
  /**
7574
7589
  * Prefer using `Set#size` instead of `Array#length`.
7575
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
7590
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
7576
7591
  */
7577
7592
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
7593
+ /**
7594
+ * Prefer simple conditions first in logical expressions.
7595
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
7596
+ */
7597
+ 'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
7578
7598
  /**
7579
7599
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
7580
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
7600
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
7581
7601
  */
7582
7602
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
7583
7603
  /**
7584
7604
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
7585
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
7605
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
7586
7606
  */
7587
7607
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
7588
7608
  /**
7589
7609
  * Prefer using the `String.raw` tag to avoid escaping `\`.
7590
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
7610
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
7591
7611
  */
7592
7612
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
7593
7613
  /**
7594
7614
  * Prefer `String#replaceAll()` over regex searches with the global flag.
7595
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
7615
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
7596
7616
  */
7597
7617
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
7598
7618
  /**
7599
7619
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
7600
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
7620
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
7601
7621
  */
7602
7622
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
7603
7623
  /**
7604
7624
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
7605
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
7625
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
7606
7626
  */
7607
7627
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
7608
7628
  /**
7609
7629
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
7610
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
7630
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
7611
7631
  */
7612
7632
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
7613
7633
  /**
7614
7634
  * Prefer using `structuredClone` to create a deep clone.
7615
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
7635
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
7616
7636
  */
7617
7637
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
7618
7638
  /**
7619
7639
  * Prefer `switch` over multiple `else-if`.
7620
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
7640
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
7621
7641
  */
7622
7642
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
7623
7643
  /**
7624
7644
  * Prefer ternary expressions over simple `if-else` statements.
7625
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
7645
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
7626
7646
  */
7627
7647
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
7628
7648
  /**
7629
7649
  * Prefer top-level await over top-level promises and async function calls.
7630
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
7650
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
7631
7651
  */
7632
7652
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
7633
7653
  /**
7634
7654
  * Enforce throwing `TypeError` in type checking conditions.
7635
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
7655
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
7636
7656
  */
7637
7657
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
7638
7658
  /**
7639
7659
  * Prevent abbreviations.
7640
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
7660
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
7641
7661
  */
7642
7662
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
7643
7663
  /**
7644
7664
  * Enforce consistent relative URL style.
7645
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
7665
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
7646
7666
  */
7647
7667
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
7648
7668
  /**
7649
7669
  * Enforce using the separator argument with `Array#join()`.
7650
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
7670
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
7651
7671
  */
7652
7672
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
7653
7673
  /**
7654
7674
  * Require non-empty module attributes for imports and exports
7655
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
7675
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
7656
7676
  */
7657
7677
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
7658
7678
  /**
7659
7679
  * Require non-empty specifier list in import and export statements.
7660
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
7680
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
7661
7681
  */
7662
7682
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
7663
7683
  /**
7664
7684
  * Enforce using the digits argument with `Number#toFixed()`.
7665
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
7685
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
7666
7686
  */
7667
7687
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
7668
7688
  /**
7669
7689
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
7670
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
7690
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
7671
7691
  */
7672
7692
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
7673
7693
  /**
7674
7694
  * Enforce better string content.
7675
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
7695
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
7676
7696
  */
7677
7697
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
7678
7698
  /**
7679
7699
  * Enforce consistent brace style for `case` clauses.
7680
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
7700
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
7681
7701
  */
7682
7702
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
7703
+ /**
7704
+ * Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
7705
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
7706
+ */
7707
+ 'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
7683
7708
  /**
7684
7709
  * Fix whitespace-insensitive template indentation.
7685
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
7710
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
7686
7711
  */
7687
7712
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
7688
7713
  /**
7689
7714
  * Enforce consistent case for text encoding identifiers.
7690
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
7715
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
7691
7716
  */
7692
7717
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
7693
7718
  /**
7694
7719
  * Require `new` when creating an error.
7695
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
7720
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
7696
7721
  */
7697
7722
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
7698
7723
  /**
@@ -9941,13 +9966,15 @@ type LogicalAssignmentOperators = (([] | ["always"] | ["always", {
9941
9966
  }] | ["never"]) & unknown[]); // ----- markdown/fenced-code-language -----
9942
9967
  type MarkdownFencedCodeLanguage = [] | [{
9943
9968
  required?: string[];
9944
- }]; // ----- markdown/heading-increment -----
9969
+ }]; // ----- markdown/fenced-code-meta -----
9970
+ type MarkdownFencedCodeMeta = [] | [("always" | "never")]; // ----- markdown/heading-increment -----
9945
9971
  type MarkdownHeadingIncrement = [] | [{
9946
9972
  frontmatterTitle?: string;
9947
9973
  }]; // ----- markdown/no-duplicate-definitions -----
9948
9974
  type MarkdownNoDuplicateDefinitions = [] | [{
9949
9975
  allowDefinitions?: string[];
9950
9976
  allowFootnoteDefinitions?: string[];
9977
+ checkFootnoteDefinitions?: boolean;
9951
9978
  }]; // ----- markdown/no-duplicate-headings -----
9952
9979
  type MarkdownNoDuplicateHeadings = [] | [{
9953
9980
  checkSiblingsOnly?: boolean;
@@ -9980,6 +10007,7 @@ type MarkdownNoSpaceInEmphasis = [] | [{
9980
10007
  type MarkdownNoUnusedDefinitions = [] | [{
9981
10008
  allowDefinitions?: string[];
9982
10009
  allowFootnoteDefinitions?: string[];
10010
+ checkFootnoteDefinitions?: boolean;
9983
10011
  }]; // ----- markdown/table-column-count -----
9984
10012
  type MarkdownTableColumnCount = [] | [{
9985
10013
  checkMissingCells?: boolean;
@@ -13407,6 +13435,7 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/ex
13407
13435
  type UnicornExpiringTodoComments = [] | [{
13408
13436
  terms?: string[];
13409
13437
  ignore?: unknown[];
13438
+ ignoreDates?: boolean;
13410
13439
  ignoreDatesOnPullRequests?: boolean;
13411
13440
  allowWarningComments?: boolean;
13412
13441
  date?: string;
@@ -13563,6 +13592,9 @@ type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbrevia
13563
13592
  interface _UnicornPreventAbbreviations_Abbreviations {
13564
13593
  [k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
13565
13594
  }
13595
+ interface _UnicornPreventAbbreviations_BooleanObject {
13596
+ [k: string]: boolean | undefined;
13597
+ }
13566
13598
  interface _UnicornPreventAbbreviations_BooleanObject {
13567
13599
  [k: string]: boolean | undefined;
13568
13600
  } // ----- unicorn/relative-url-style -----
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{getPackageInfo as r,isPackageExists as i}from"local-pkg";import{findWorkspaceDir as a}from"pkg-types";import o from"eslint-plugin-antfu";import s from"eslint-plugin-de-morgan";import c from"@eslint-community/eslint-plugin-eslint-comments";import l from"@eslint-community/eslint-plugin-eslint-comments/configs";import u from"@eslint/css";import{tailwind3 as d,tailwind4 as f}from"tailwind-csstree";import ee from"eslint-plugin-depend";import{fixupPluginRules as p}from"@eslint/compat";import m from"eslint-plugin-github-action";import*as h from"yaml-eslint-parser";import te from"eslint-config-flat-gitignore";import ne from"@eslint/js";import re from"@stylistic/eslint-plugin";import g from"globals";import ie from"eslint-plugin-jsdoc";import _,{configs as v}from"eslint-plugin-jsonc";import*as y from"jsonc-eslint-parser";import b from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import se from"eslint-plugin-n";import x from"eslint-plugin-regexp";import S from"eslint-plugin-sonarjs";import*as C from"empathic/find";import w from"eslint-plugin-toml";import T from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const E=`**/*.?([cm])[jt]s?(x)`,D=`**/*.?([cm])ts`,O=`**/*.?([cm])tsx`,k=`.github/workflows/*.y?(a)ml`,A=`**/*.md`,j=`${A}/${E}`,M=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function N(){return[{files:[E],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/top-level-function":`error`}}]}function P(){return[{files:[E],name:`2digits:boolean`,plugins:{boolean:s},rules:{...s.configs.recommended.rules}}]}const F={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react/rsc":`react-rsc`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},I=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],L=n(l.recommended.rules,F);function R(){return[{files:[E],name:`2digits:comments`,plugins:{comments:c},rules:{...L,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function z(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return d;if(e?.tailwindMajor===4)return f;try{let e=(await r(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return f}catch{}return d}async function B(e={}){let t=await z(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:u},languageOptions:{tolerant:!0,customSyntax:t},rules:{...u.configs.recommended.rules,...e.overrides}}]}function V(){return[{files:[E],name:`2digits:depend`,plugins:{depend:ee},rules:{"depend/ban-dependencies":`warn`}}]}async function H(e){let t=await e;return t.default||t}async function U(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await H(import(`eslint-plugin-drizzle`));return[{files:[E],name:`2digits:drizzle`,plugins:{drizzle:p(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const W=Object.fromEntries(m.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function G(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":m}},{name:`2digits:github-actions/recommended`,files:[k],ignores:[`!**/${k}`],languageOptions:{parser:h},rules:{...W}}]}async function le(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([H(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=n(s,F);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function ue(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[M,n].flat(),name:`2digits:ignores`},te({strict:!1,...t,name:`2digits:gitignore`})]}function de(e={}){let{overrides:t={}}=e;return[{files:[E],name:`2digits:javascript`,plugins:{stylistic:re},languageOptions:{ecmaVersion:2022,globals:{...g.browser,...g.es2021,...g.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...ne.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-assignment":`off`,"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function fe(){return[{files:[E],name:`2digits:jsdoc`,plugins:{jsdoc:ie},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function pe(){return[...v[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(v[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(v[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(v[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...v[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:y},plugins:{jsonc:_}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[A];function me(){return[{name:`2digits:markdown/setup`,plugins:{markdown:b}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([b.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ge}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}}]}async function he(){let e=await H(import(`typescript-eslint`)),t=await H(import(`@eslint-react/eslint-plugin`)),r=n({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},F);return[{name:`2digits:markdown/disables`,files:[j],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...r,"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const ge={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function _e(e={}){let{files:t=[D,O],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([H(import(`@next/eslint-plugin-next`)),H(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},F);return[{name:`2digits:next/setup`,plugins:{next:p(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ve={node:`24.14.0`};function ye(){return[{files:[E],name:`2digits:node`,settings:{node:{version:ve.node}},plugins:{node:se},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function be(){let e=await H(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:y},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await H(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function xe(){let[e,t]=await Promise.all([H(import(`eslint-config-prettier`)),H(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function Se(e={}){let{files:t=[D,O],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u]=await Promise.all([H(import(`@eslint-react/eslint-plugin`)),H(import(`@typescript-eslint/parser`)),o?H(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),H(import(`@stylistic/eslint-plugin`))]),d=s.configs.all.plugins,f=n({...s.configs[`disable-conflict-eslint-plugin-react`].rules,...s.configs[`disable-conflict-eslint-plugin-react-hooks`].rules,...s.configs[`strict-type-checked`].rules},F);return[{name:`2digits:react/setup`,plugins:{stylistic:u,"react-dom":d[`@eslint-react/dom`],"react-web-api":d[`@eslint-react/web-api`],"react-extra":d[`@eslint-react`],"react-naming-convention":d[`@eslint-react/naming-convention`],"react-rsc":d[`@eslint-react/rsc`],...o?{"react-compiler":l}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...f,...o?{"react-compiler/react-compiler":`error`}:{},"react-extra/exhaustive-deps":`error`,"react-extra/purity":`error`,"react-extra/no-unused-class-component-members":`error`,"react-extra/no-unnecessary-use-callback":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/set-state-in-effect":`error`,"react-extra/use-state":`error`,"react-extra/no-unstable-context-value":`error`,"react-extra/no-unstable-default-props":`error`,"react-extra/no-unused-props":`error`,"react-extra/no-context-provider":`error`,"react-extra/no-forward-ref":`error`,"react-extra/no-use-context":`error`,"react-extra/immutability":`error`,"react-extra/refs":`error`,"react-extra/no-duplicate-key":`error`,"react-dom/no-missing-button-type":`error`,"react-dom/no-missing-iframe-sandbox":`error`,"react-dom/no-unsafe-target-blank":`error`,"react-naming-convention/context-name":`error`,"react-naming-convention/id-name":`error`,"react-naming-convention/ref-name":`error`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-namespace-import":`error`,"react-extra/no-useless-fragment":`off`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function Ce(){return[{files:[E],name:`2digits:regexp`,plugins:{regexp:x},rules:{...x.configs[`flat/recommended`].rules}}]}function we(){return[{files:[E],name:`2digits:sonar`,plugins:{sonar:S},rules:{"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Te(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([H(import(`eslint-plugin-storybook`)),H(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:a}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,"storybook/no-renderer-packages":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function Ee(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([H(import(`eslint-plugin-tailwindcss`)),H(import(`@2digits/constants`)),a().catch(()=>void 0)]),o=C.file(`tailwind.config.ts`,{last:i})??C.file(`tailwind.config.js`,{last:i});return[{files:[E],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:o}},rules:{...n.configs.recommended.rules,...t}}]}async function De(e={}){let{overrides:t={}}=e,r=await H(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},F);return[{files:[E],name:`2digits:tanstack-query`,plugins:{"tanstack-query":r},rules:{...i,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,r=await H(import(`@tanstack/eslint-plugin-router`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},F);return[{files:[E],name:`2digits:tanstack-router`,plugins:{"tanstack-router":r},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const ke=Object.fromEntries(w.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function Y(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:w},rules:{...ke,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Ae(e={}){let{overrides:t={}}=e,n=await H(import(`eslint-plugin-turbo`));return[{files:[E],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function je(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([H(import(`typescript-eslint`)),H(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,F),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[E],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Me(){return[{files:[E],name:`2digits:unicorn`,plugins:{unicorn:T},rules:{...T.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"unicorn/filename-case":`off`,"unicorn/prefer-module":`off`,"unicorn/prevent-abbreviations":`off`,"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":`off`}}]}function Ne(){return[{name:`2digits:yaml/setup`,plugins:{yml:ce}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:h}};async function Pe(e={}){let{overrides:t={}}=e,n=await H(import(`eslint-plugin-zod`));return[{files:[E],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-string-schema-with-uuid":`error`,"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/prefer-string-schema-with-trim":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let r;t.pnpm===void 0&&(r=a());let o=new e(ue(t.ignores),de(t.js),P(),ye(),R(),fe(),Me(),we(),Ce(),N(),pe(),Y(),Ne(),me(),G());Z(t.css)&&(o=o.append(B(Q(t.css)))),Z(t.depend,!0)&&(o=o.append(V())),Z(t.turbo,i(`turbo`))&&(o=o.append(Ae(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(je(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(Se({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(_e({...Q(t.next),...c}))),Z(t.storybook,I.some(e=>i(e)))&&(o=o.append(Te({...Q(t.storybook),...c}))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(Ee(Q(t.tailwind)))),Z(t.tanstackQuery,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(De(Q(t.tanstackQuery)))),Z(t.tanstackRouter,i(`@tanstack/react-router`))&&(o=o.append(Oe(Q(t.tanstackRouter)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(U(Q(t.drizzle)))),Z(t.zod,i(`zod`))&&(o=o.append(Pe(Q(t.zod)))),Z(t.graphql,i(`graphql`))&&(o=o.append(le(Q(t.graphql)))),Z(t.pnpm,!!await r)&&(o=o.append(be())),o=o.append(...n),i(`prettier`)&&(o=o.append(xe())),o=o.append(he()),o.renamePlugins(F).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{getPackageInfo as r,isPackageExists as i}from"local-pkg";import{findWorkspaceDir as a}from"pkg-types";import o from"eslint-plugin-antfu";import s from"eslint-plugin-de-morgan";import c from"@eslint-community/eslint-plugin-eslint-comments";import l from"@eslint-community/eslint-plugin-eslint-comments/configs";import u from"@eslint/css";import{tailwind3 as d,tailwind4 as f}from"tailwind-csstree";import ee from"eslint-plugin-depend";import{fixupPluginRules as p}from"@eslint/compat";import m from"eslint-plugin-github-action";import*as h from"yaml-eslint-parser";import te from"eslint-config-flat-gitignore";import ne from"@eslint/js";import re from"@stylistic/eslint-plugin";import g from"globals";import ie from"eslint-plugin-jsdoc";import _,{configs as v}from"eslint-plugin-jsonc";import*as y from"jsonc-eslint-parser";import b from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import se from"eslint-plugin-n";import x from"eslint-plugin-regexp";import S from"eslint-plugin-sonarjs";import*as C from"empathic/find";import w from"eslint-plugin-toml";import T from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const E=`**/*.?([cm])[jt]s?(x)`,D=`**/*.?([cm])ts`,O=`**/*.?([cm])tsx`,k=`.github/workflows/*.y?(a)ml`,A=`**/*.md`,j=`${A}/${E}`,M=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function N(){return[{files:[E],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/top-level-function":`error`}}]}function P(){return[{files:[E],name:`2digits:boolean`,plugins:{boolean:s},rules:{...s.configs.recommended.rules}}]}const F={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react/rsc":`react-rsc`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},I=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],L=n(l.recommended.rules,F);function R(){return[{files:[E],name:`2digits:comments`,plugins:{comments:c},rules:{...L,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function z(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return d;if(e?.tailwindMajor===4)return f;try{let e=(await r(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return f}catch{}return d}async function B(e={}){let t=await z(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:u},languageOptions:{tolerant:!0,customSyntax:t},rules:{...u.configs.recommended.rules,...e.overrides}}]}function V(){return[{files:[E],name:`2digits:depend`,plugins:{depend:ee},rules:{"depend/ban-dependencies":`warn`}}]}async function H(e){let t=await e;return t.default||t}async function U(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await H(import(`eslint-plugin-drizzle`));return[{files:[E],name:`2digits:drizzle`,plugins:{drizzle:p(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const W=Object.fromEntries(m.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function G(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":m}},{name:`2digits:github-actions/recommended`,files:[k],ignores:[`!**/${k}`],languageOptions:{parser:h},rules:{...W}}]}async function le(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([H(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=n(s,F);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function ue(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[M,n].flat(),name:`2digits:ignores`},te({strict:!1,...t,name:`2digits:gitignore`})]}function de(e={}){let{overrides:t={}}=e;return[{files:[E],name:`2digits:javascript`,plugins:{stylistic:re},languageOptions:{ecmaVersion:2022,globals:{...g.browser,...g.es2021,...g.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...ne.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-assignment":`off`,"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function fe(){return[{files:[E],name:`2digits:jsdoc`,plugins:{jsdoc:ie},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function pe(){return[...v[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(v[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(v[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(v[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...v[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:y},plugins:{jsonc:_}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[A];function me(){return[{name:`2digits:markdown/setup`,plugins:{markdown:b}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([b.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ge}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}}]}async function he(){let e=await H(import(`typescript-eslint`)),t=await H(import(`@eslint-react/eslint-plugin`)),r=n({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},F);return[{name:`2digits:markdown/disables`,files:[j],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...r,"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const ge={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function _e(e={}){let{files:t=[D,O],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([H(import(`@next/eslint-plugin-next`)),H(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},F);return[{name:`2digits:next/setup`,plugins:{next:p(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ve={node:`24.14.1`};function ye(){return[{files:[E],name:`2digits:node`,settings:{node:{version:ve.node}},plugins:{node:se},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function be(){let e=await H(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:y},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await H(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function xe(){let[e,t]=await Promise.all([H(import(`eslint-config-prettier`)),H(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function Se(e={}){let{files:t=[D,O],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u]=await Promise.all([H(import(`@eslint-react/eslint-plugin`)),H(import(`@typescript-eslint/parser`)),o?H(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),H(import(`@stylistic/eslint-plugin`))]),d=s.configs.all.plugins,f=n({...s.configs[`disable-conflict-eslint-plugin-react`].rules,...s.configs[`disable-conflict-eslint-plugin-react-hooks`].rules,...s.configs[`strict-type-checked`].rules},F);return[{name:`2digits:react/setup`,plugins:{stylistic:u,"react-dom":d[`@eslint-react/dom`],"react-web-api":d[`@eslint-react/web-api`],"react-extra":d[`@eslint-react`],"react-naming-convention":d[`@eslint-react/naming-convention`],"react-rsc":d[`@eslint-react/rsc`],...o?{"react-compiler":l}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...f,...o?{"react-compiler/react-compiler":`error`}:{},"react-extra/exhaustive-deps":`error`,"react-extra/purity":`error`,"react-extra/no-unused-class-component-members":`error`,"react-extra/no-unnecessary-use-callback":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/set-state-in-effect":`error`,"react-extra/use-state":`error`,"react-extra/no-unstable-context-value":`error`,"react-extra/no-unstable-default-props":`error`,"react-extra/no-unused-props":`error`,"react-extra/no-context-provider":`error`,"react-extra/no-forward-ref":`error`,"react-extra/no-use-context":`error`,"react-extra/immutability":`error`,"react-extra/refs":`error`,"react-extra/no-duplicate-key":`error`,"react-dom/no-missing-button-type":`error`,"react-dom/no-missing-iframe-sandbox":`error`,"react-dom/no-unsafe-target-blank":`error`,"react-naming-convention/context-name":`error`,"react-naming-convention/id-name":`error`,"react-naming-convention/ref-name":`error`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-namespace-import":`error`,"react-extra/no-useless-fragment":`off`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function Ce(){return[{files:[E],name:`2digits:regexp`,plugins:{regexp:x},rules:{...x.configs[`flat/recommended`].rules}}]}function we(){return[{files:[E],name:`2digits:sonar`,plugins:{sonar:S},rules:{"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Te(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([H(import(`eslint-plugin-storybook`)),H(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:a}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,"storybook/no-renderer-packages":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function Ee(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([H(import(`eslint-plugin-tailwindcss`)),H(import(`@2digits/constants`)),a().catch(()=>void 0)]),o=C.file(`tailwind.config.ts`,{last:i})??C.file(`tailwind.config.js`,{last:i});return[{files:[E],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:o}},rules:{...n.configs.recommended.rules,...t}}]}async function De(e={}){let{overrides:t={}}=e,r=await H(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},F);return[{files:[E],name:`2digits:tanstack-query`,plugins:{"tanstack-query":r},rules:{...i,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,r=await H(import(`@tanstack/eslint-plugin-router`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},F);return[{files:[E],name:`2digits:tanstack-router`,plugins:{"tanstack-router":r},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const ke=Object.fromEntries(w.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function Y(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:w},rules:{...ke,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Ae(e={}){let{overrides:t={}}=e,n=await H(import(`eslint-plugin-turbo`));return[{files:[E],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function je(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([H(import(`typescript-eslint`)),H(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,F),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[E],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Me(){return[{files:[E],name:`2digits:unicorn`,plugins:{unicorn:T},rules:{...T.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"unicorn/filename-case":`off`,"unicorn/prefer-module":`off`,"unicorn/prevent-abbreviations":`off`,"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":`off`}}]}function Ne(){return[{name:`2digits:yaml/setup`,plugins:{yml:ce}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:h}};async function Pe(e={}){let{overrides:t={}}=e,n=await H(import(`eslint-plugin-zod`));return[{files:[E],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-string-schema-with-uuid":`error`,"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/prefer-string-schema-with-trim":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let r;t.pnpm===void 0&&(r=a());let o=new e(ue(t.ignores),de(t.js),P(),ye(),R(),fe(),Me(),we(),Ce(),N(),pe(),Y(),Ne(),me(),G());Z(t.css)&&(o=o.append(B(Q(t.css)))),Z(t.depend,!0)&&(o=o.append(V())),Z(t.turbo,i(`turbo`))&&(o=o.append(Ae(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(je(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(Se({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(_e({...Q(t.next),...c}))),Z(t.storybook,I.some(e=>i(e)))&&(o=o.append(Te({...Q(t.storybook),...c}))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(Ee(Q(t.tailwind)))),Z(t.tanstackQuery,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(De(Q(t.tanstackQuery)))),Z(t.tanstackRouter,i(`@tanstack/react-router`))&&(o=o.append(Oe(Q(t.tanstackRouter)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(U(Q(t.drizzle)))),Z(t.zod,i(`zod`))&&(o=o.append(Pe(Q(t.zod)))),Z(t.graphql,i(`graphql`))&&(o=o.append(le(Q(t.graphql)))),Z(t.pnpm,!!await r)&&(o=o.append(be())),o=o.append(...n),i(`prettier`)&&(o=o.append(xe())),o=o.append(he()),o.renamePlugins(F).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "5.2.5",
3
+ "version": "5.2.6",
4
4
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
5
5
  "homepage": "https://2d-configs.vercel.app/",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "@eslint/compat": "2.0.3",
30
30
  "@eslint/css": "1.0.0",
31
31
  "@eslint/js": "10.0.1",
32
- "@eslint/markdown": "7.5.1",
32
+ "@eslint/markdown": "8.0.0",
33
33
  "@graphql-eslint/eslint-plugin": "4.4.0",
34
34
  "@next/eslint-plugin-next": "16.2.1",
35
35
  "@stylistic/eslint-plugin": "5.10.0",
@@ -47,7 +47,7 @@
47
47
  "eslint-plugin-depend": "1.5.0",
48
48
  "eslint-plugin-drizzle": "0.2.3",
49
49
  "eslint-plugin-github-action": "0.2.0",
50
- "eslint-plugin-jsdoc": "62.8.0",
50
+ "eslint-plugin-jsdoc": "62.8.1",
51
51
  "eslint-plugin-jsonc": "3.1.2",
52
52
  "eslint-plugin-n": "17.24.0",
53
53
  "eslint-plugin-pnpm": "1.6.0",
@@ -57,8 +57,8 @@
57
57
  "eslint-plugin-storybook": "10.3.3",
58
58
  "eslint-plugin-tailwindcss": "3.18.2",
59
59
  "eslint-plugin-toml": "1.3.1",
60
- "eslint-plugin-turbo": "2.8.20",
61
- "eslint-plugin-unicorn": "63.0.0",
60
+ "eslint-plugin-turbo": "2.8.21",
61
+ "eslint-plugin-unicorn": "64.0.0",
62
62
  "eslint-plugin-yml": "3.3.1",
63
63
  "eslint-plugin-zod": "3.5.0",
64
64
  "globals": "17.4.0",
@@ -76,7 +76,7 @@
76
76
  "@arethetypeswrong/core": "0.18.2",
77
77
  "@eslint/config-inspector": "1.5.0",
78
78
  "@types/react": "19.2.14",
79
- "@typescript/native-preview": "7.0.0-dev.20260325.1",
79
+ "@typescript/native-preview": "7.0.0-dev.20260328.1",
80
80
  "dedent": "1.7.2",
81
81
  "eslint": "10.1.0",
82
82
  "eslint-typegen": "2.3.1",
@@ -84,9 +84,9 @@
84
84
  "react": "19.2.4",
85
85
  "tinyexec": "1.0.4",
86
86
  "tinyglobby": "0.2.15",
87
- "tsdown": "0.21.4",
87
+ "tsdown": "0.21.6",
88
88
  "typescript": "6.0.2",
89
- "vitest": "4.1.1",
89
+ "vitest": "4.1.2",
90
90
  "zod": "4.3.6",
91
91
  "@2digits/tsconfig": "0.8.7"
92
92
  },
@@ -94,7 +94,7 @@
94
94
  "eslint": "10.1.0"
95
95
  },
96
96
  "engines": {
97
- "node": "24.14.0"
97
+ "node": "24.14.1"
98
98
  },
99
99
  "scripts": {
100
100
  "build": "tsdown --minify --config-loader unconfig",