@jimmy.codes/eslint-config 6.7.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,14 +10,12 @@
10
10
 
11
11
  A strict but practical ESLint config that works out of the box, adapts to your stack, and enforces good patterns without getting in the way. It catches real bugs, reduces ambiguity, and keeps your codebase consistent.
12
12
 
13
- - **Auto-detects your stack**: React, TypeScript, Astro, Next.js, Vitest, Jest, Playwright, Storybook, and TanStack Query.
13
+ - **Auto-detects your stack**: React, TypeScript, Astro, Next.js, Vitest, Jest, Testing Library, Playwright, Storybook, and TanStack Query.
14
+ - **Zero-config start**: Install it, extend it, done.
14
15
  - **Prevents real issues**: Prioritizes rules that catch bugs and unsafe patterns.
15
16
  - **Prevents confusion**: Flags ambiguous code, confusing promise usage, shadowed variables, and unused exports.
16
17
  - **Enforces consistency**: Standardizes imports, naming, coding style, and testing conventions.
17
- - **Fast and lightweight**: Loads only what your project needs.
18
- - **Zero-config start**: Install it, extend it, done.
19
- - **Customizable**: Turn off or override rules per project or file.
20
- - **Test-ready**: Works with Vitest, Jest, Playwright, and Testing Library.
18
+ - **Flexible**: Easily customize or disable any part of the config.
21
19
 
22
20
  ---
23
21
 
package/dist/index.d.ts CHANGED
@@ -3006,7 +3006,7 @@ interface RuleOptions {
3006
3006
  * Reports invalid alignment of JSDoc block asterisks.
3007
3007
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
3008
3008
  */
3009
- 'jsdoc/check-alignment'?: Linter.RuleEntry<[]>;
3009
+ 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
3010
3010
  /**
3011
3011
  * Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
3012
3012
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
@@ -5122,6 +5122,11 @@ interface RuleOptions {
5122
5122
  * @see https://eslint.org/docs/latest/rules/prefer-template
5123
5123
  */
5124
5124
  'prefer-template'?: Linter.RuleEntry<[]>;
5125
+ /**
5126
+ * Disallow losing originally caught error when re-throwing custom errors
5127
+ * @see https://eslint.org/docs/latest/rules/preserve-caught-error
5128
+ */
5129
+ 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>;
5125
5130
  /**
5126
5131
  * Require quotes around object literal property names
5127
5132
  * @see https://eslint.org/docs/latest/rules/quote-props
@@ -5909,690 +5914,710 @@ interface RuleOptions {
5909
5914
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
5910
5915
  /**
5911
5916
  * Improve regexes by making them shorter, consistent, and safer.
5912
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
5917
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/better-regex.md
5913
5918
  */
5914
5919
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
5915
5920
  /**
5916
5921
  * Enforce a specific parameter name in catch clauses.
5917
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
5922
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/catch-error-name.md
5918
5923
  */
5919
5924
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
5920
5925
  /**
5921
5926
  * Enforce consistent assertion style with `node:assert`.
5922
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
5927
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-assert.md
5923
5928
  */
5924
5929
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
5925
5930
  /**
5926
5931
  * Prefer passing `Date` directly to the constructor when cloning.
5927
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
5932
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-date-clone.md
5928
5933
  */
5929
5934
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
5930
5935
  /**
5931
5936
  * Use destructured variables over properties.
5932
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
5937
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-destructuring.md
5933
5938
  */
5934
5939
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
5935
5940
  /**
5936
5941
  * Prefer consistent types when spreading a ternary in an array literal.
5937
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
5942
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-empty-array-spread.md
5938
5943
  */
5939
5944
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
5940
5945
  /**
5941
5946
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
5942
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
5947
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-existence-index-check.md
5943
5948
  */
5944
5949
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
5945
5950
  /**
5946
5951
  * Move function definitions to the highest possible scope.
5947
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
5952
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-function-scoping.md
5948
5953
  */
5949
5954
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
5950
5955
  /**
5951
5956
  * Enforce correct `Error` subclassing.
5952
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
5957
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/custom-error-definition.md
5953
5958
  */
5954
5959
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
5955
5960
  /**
5956
5961
  * Enforce no spaces between braces.
5957
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
5962
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/empty-brace-spaces.md
5958
5963
  */
5959
5964
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
5960
5965
  /**
5961
5966
  * Enforce passing a `message` value when creating a built-in error.
5962
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
5967
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/error-message.md
5963
5968
  */
5964
5969
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
5965
5970
  /**
5966
5971
  * Require escape sequences to use uppercase or lowercase values.
5967
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
5972
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/escape-case.md
5968
5973
  */
5969
5974
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
5970
5975
  /**
5971
5976
  * Add expiration conditions to TODO comments.
5972
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
5977
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/expiring-todo-comments.md
5973
5978
  */
5974
5979
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
5975
5980
  /**
5976
5981
  * Enforce explicitly comparing the `length` or `size` property of a value.
5977
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
5982
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/explicit-length-check.md
5978
5983
  */
5979
5984
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
5980
5985
  /**
5981
5986
  * Enforce a case style for filenames.
5982
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
5987
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/filename-case.md
5983
5988
  */
5984
5989
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
5985
5990
  /**
5986
5991
  * Enforce specific import styles per module.
5987
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
5992
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/import-style.md
5988
5993
  */
5989
5994
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
5990
5995
  /**
5991
5996
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
5992
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
5997
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/new-for-builtins.md
5993
5998
  */
5994
5999
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
5995
6000
  /**
5996
6001
  * Enforce specifying rules to disable in `eslint-disable` comments.
5997
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
6002
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-abusive-eslint-disable.md
5998
6003
  */
5999
6004
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
6000
6005
  /**
6001
6006
  * Disallow recursive access to `this` within getters and setters.
6002
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
6007
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-accessor-recursion.md
6003
6008
  */
6004
6009
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
6005
6010
  /**
6006
6011
  * Disallow anonymous functions and classes as the default export.
6007
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
6012
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-anonymous-default-export.md
6008
6013
  */
6009
6014
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
6010
6015
  /**
6011
6016
  * Prevent passing a function reference directly to iterator methods.
6012
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
6017
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-callback-reference.md
6013
6018
  */
6014
6019
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
6015
6020
  /**
6016
6021
  * Prefer `for…of` over the `forEach` method.
6017
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
6022
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-for-each.md
6018
6023
  */
6019
6024
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
6020
6025
  /**
6021
6026
  * Disallow using the `this` argument in array methods.
6022
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
6027
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-method-this-argument.md
6023
6028
  */
6024
6029
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
6025
6030
  /**
6026
6031
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6027
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
6032
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-array-push-push
6028
6033
  * @deprecated
6029
6034
  */
6030
6035
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
6031
6036
  /**
6032
6037
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6033
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
6038
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reduce.md
6034
6039
  */
6035
6040
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
6036
6041
  /**
6037
6042
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6038
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
6043
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reverse.md
6039
6044
  */
6040
6045
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
6046
+ /**
6047
+ * Prefer `Array#toSorted()` over `Array#sort()`.
6048
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-sort.md
6049
+ */
6050
+ 'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
6041
6051
  /**
6042
6052
  * Disallow member access from await expression.
6043
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
6053
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-expression-member.md
6044
6054
  */
6045
6055
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
6046
6056
  /**
6047
6057
  * Disallow using `await` in `Promise` method parameters.
6048
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
6058
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-in-promise-methods.md
6049
6059
  */
6050
6060
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
6051
6061
  /**
6052
6062
  * Do not use leading/trailing space between `console.log` parameters.
6053
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
6063
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-console-spaces.md
6054
6064
  */
6055
6065
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
6056
6066
  /**
6057
6067
  * Do not use `document.cookie` directly.
6058
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
6068
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-document-cookie.md
6059
6069
  */
6060
6070
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
6061
6071
  /**
6062
6072
  * Disallow empty files.
6063
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
6073
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-empty-file.md
6064
6074
  */
6065
6075
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
6066
6076
  /**
6067
6077
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
6068
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
6078
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-for-loop.md
6069
6079
  */
6070
6080
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
6071
6081
  /**
6072
6082
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
6073
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
6083
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-hex-escape.md
6074
6084
  */
6075
6085
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
6076
6086
  /**
6077
6087
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
6078
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
6088
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-instanceof-array
6079
6089
  * @deprecated
6080
6090
  */
6081
6091
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
6082
6092
  /**
6083
6093
  * Disallow `instanceof` with built-in objects
6084
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
6094
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-instanceof-builtins.md
6085
6095
  */
6086
6096
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
6087
6097
  /**
6088
6098
  * Disallow invalid options in `fetch()` and `new Request()`.
6089
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
6099
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-fetch-options.md
6090
6100
  */
6091
6101
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
6092
6102
  /**
6093
6103
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
6094
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
6104
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-remove-event-listener.md
6095
6105
  */
6096
6106
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
6097
6107
  /**
6098
6108
  * Disallow identifiers starting with `new` or `class`.
6099
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
6109
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-keyword-prefix.md
6100
6110
  */
6101
6111
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
6102
6112
  /**
6103
6113
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
6104
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
6114
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-length-as-slice-end
6105
6115
  * @deprecated
6106
6116
  */
6107
6117
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
6108
6118
  /**
6109
6119
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
6110
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
6120
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-lonely-if.md
6111
6121
  */
6112
6122
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
6113
6123
  /**
6114
6124
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
6115
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
6125
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-magic-array-flat-depth.md
6116
6126
  */
6117
6127
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
6118
6128
  /**
6119
6129
  * Disallow named usage of default import and export.
6120
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
6130
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-named-default.md
6121
6131
  */
6122
6132
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
6123
6133
  /**
6124
6134
  * Disallow negated conditions.
6125
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
6135
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negated-condition.md
6126
6136
  */
6127
6137
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
6128
6138
  /**
6129
6139
  * Disallow negated expression in equality check.
6130
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
6140
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negation-in-equality-check.md
6131
6141
  */
6132
6142
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
6133
6143
  /**
6134
6144
  * Disallow nested ternary expressions.
6135
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
6145
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-nested-ternary.md
6136
6146
  */
6137
6147
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
6138
6148
  /**
6139
6149
  * Disallow `new Array()`.
6140
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
6150
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-array.md
6141
6151
  */
6142
6152
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
6143
6153
  /**
6144
6154
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
6145
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
6155
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-buffer.md
6146
6156
  */
6147
6157
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
6148
6158
  /**
6149
6159
  * Disallow the use of the `null` literal.
6150
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
6160
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-null.md
6151
6161
  */
6152
6162
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
6153
6163
  /**
6154
6164
  * Disallow the use of objects as default parameters.
6155
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
6165
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-object-as-default-parameter.md
6156
6166
  */
6157
6167
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
6158
6168
  /**
6159
6169
  * Disallow `process.exit()`.
6160
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
6170
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-process-exit.md
6161
6171
  */
6162
6172
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
6163
6173
  /**
6164
6174
  * Disallow passing single-element arrays to `Promise` methods.
6165
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
6175
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-single-promise-in-promise-methods.md
6166
6176
  */
6167
6177
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
6168
6178
  /**
6169
6179
  * Disallow classes that only have static members.
6170
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
6180
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-static-only-class.md
6171
6181
  */
6172
6182
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
6173
6183
  /**
6174
6184
  * Disallow `then` property.
6175
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
6185
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-thenable.md
6176
6186
  */
6177
6187
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
6178
6188
  /**
6179
6189
  * Disallow assigning `this` to a variable.
6180
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
6190
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-this-assignment.md
6181
6191
  */
6182
6192
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
6183
6193
  /**
6184
6194
  * Disallow comparing `undefined` using `typeof`.
6185
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
6195
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-typeof-undefined.md
6186
6196
  */
6187
6197
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
6188
6198
  /**
6189
6199
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
6190
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
6200
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-flat-depth.md
6191
6201
  */
6192
6202
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
6193
6203
  /**
6194
6204
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
6195
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
6205
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-splice-count.md
6196
6206
  */
6197
6207
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
6198
6208
  /**
6199
6209
  * Disallow awaiting non-promise values.
6200
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
6210
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-await.md
6201
6211
  */
6202
6212
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
6203
6213
  /**
6204
6214
  * Enforce the use of built-in methods instead of unnecessary polyfills.
6205
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
6215
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-polyfills.md
6206
6216
  */
6207
6217
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
6208
6218
  /**
6209
6219
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
6210
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
6220
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-slice-end.md
6211
6221
  */
6212
6222
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
6213
6223
  /**
6214
6224
  * Disallow unreadable array destructuring.
6215
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
6225
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-array-destructuring.md
6216
6226
  */
6217
6227
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
6218
6228
  /**
6219
6229
  * Disallow unreadable IIFEs.
6220
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
6230
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-iife.md
6221
6231
  */
6222
6232
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
6223
6233
  /**
6224
6234
  * Disallow unused object properties.
6225
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
6235
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unused-properties.md
6226
6236
  */
6227
6237
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
6228
6238
  /**
6229
6239
  * Disallow unnecessary `Error.captureStackTrace(…)`.
6230
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
6240
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-error-capture-stack-trace.md
6231
6241
  */
6232
6242
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
6233
6243
  /**
6234
6244
  * Disallow useless fallback when spreading in object literals.
6235
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
6245
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-fallback-in-spread.md
6236
6246
  */
6237
6247
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
6238
6248
  /**
6239
6249
  * Disallow useless array length check.
6240
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
6250
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-length-check.md
6241
6251
  */
6242
6252
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
6243
6253
  /**
6244
6254
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
6245
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
6255
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-promise-resolve-reject.md
6246
6256
  */
6247
6257
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
6248
6258
  /**
6249
6259
  * Disallow unnecessary spread.
6250
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
6260
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-spread.md
6251
6261
  */
6252
6262
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
6253
6263
  /**
6254
6264
  * Disallow useless case in switch statements.
6255
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
6265
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-switch-case.md
6256
6266
  */
6257
6267
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
6258
6268
  /**
6259
6269
  * Disallow useless `undefined`.
6260
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
6270
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-undefined.md
6261
6271
  */
6262
6272
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
6263
6273
  /**
6264
6274
  * Disallow number literals with zero fractions or dangling dots.
6265
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
6275
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-zero-fractions.md
6266
6276
  */
6267
6277
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
6268
6278
  /**
6269
6279
  * Enforce proper case for numeric literals.
6270
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
6280
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/number-literal-case.md
6271
6281
  */
6272
6282
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
6273
6283
  /**
6274
6284
  * Enforce the style of numeric separators by correctly grouping digits.
6275
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
6285
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/numeric-separators-style.md
6276
6286
  */
6277
6287
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
6278
6288
  /**
6279
6289
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
6280
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
6290
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-add-event-listener.md
6281
6291
  */
6282
6292
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
6283
6293
  /**
6284
6294
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
6285
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
6295
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-find.md
6286
6296
  */
6287
6297
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
6288
6298
  /**
6289
6299
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
6290
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
6300
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat.md
6291
6301
  */
6292
6302
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
6293
6303
  /**
6294
6304
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
6295
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
6305
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat-map.md
6296
6306
  */
6297
6307
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
6298
6308
  /**
6299
6309
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
6300
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
6310
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-index-of.md
6301
6311
  */
6302
6312
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
6303
6313
  /**
6304
6314
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
6305
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
6315
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-some.md
6306
6316
  */
6307
6317
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
6308
6318
  /**
6309
6319
  * Prefer `.at()` method for index access and `String#charAt()`.
6310
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
6320
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-at.md
6311
6321
  */
6312
6322
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
6323
+ /**
6324
+ * Prefer `BigInt` literals over the constructor.
6325
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-bigint-literals.md
6326
+ */
6327
+ 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
6313
6328
  /**
6314
6329
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
6315
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
6330
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-blob-reading-methods.md
6316
6331
  */
6317
6332
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
6318
6333
  /**
6319
6334
  * Prefer class field declarations over `this` assignments in constructors.
6320
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
6335
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-class-fields.md
6321
6336
  */
6322
6337
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
6338
+ /**
6339
+ * Prefer using `Element#classList.toggle()` to toggle class names.
6340
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-classlist-toggle.md
6341
+ */
6342
+ 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
6323
6343
  /**
6324
6344
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
6325
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
6345
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-code-point.md
6326
6346
  */
6327
6347
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
6328
6348
  /**
6329
6349
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
6330
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
6350
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-date-now.md
6331
6351
  */
6332
6352
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
6333
6353
  /**
6334
6354
  * Prefer default parameters over reassignment.
6335
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
6355
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-default-parameters.md
6336
6356
  */
6337
6357
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
6338
6358
  /**
6339
6359
  * Prefer `Node#append()` over `Node#appendChild()`.
6340
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
6360
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-append.md
6341
6361
  */
6342
6362
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
6343
6363
  /**
6344
6364
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
6345
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
6365
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-dataset.md
6346
6366
  */
6347
6367
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
6348
6368
  /**
6349
6369
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
6350
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
6370
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-remove.md
6351
6371
  */
6352
6372
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
6353
6373
  /**
6354
6374
  * Prefer `.textContent` over `.innerText`.
6355
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
6375
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-text-content.md
6356
6376
  */
6357
6377
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
6358
6378
  /**
6359
6379
  * Prefer `EventTarget` over `EventEmitter`.
6360
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
6380
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-event-target.md
6361
6381
  */
6362
6382
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
6363
6383
  /**
6364
6384
  * Prefer `export…from` when re-exporting.
6365
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
6385
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-export-from.md
6366
6386
  */
6367
6387
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
6368
6388
  /**
6369
6389
  * Prefer `globalThis` over `window`, `self`, and `global`.
6370
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
6390
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-global-this.md
6371
6391
  */
6372
6392
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
6373
6393
  /**
6374
6394
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
6375
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
6395
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-import-meta-properties.md
6376
6396
  */
6377
6397
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
6378
6398
  /**
6379
6399
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
6380
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
6400
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-includes.md
6381
6401
  */
6382
6402
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
6383
6403
  /**
6384
6404
  * Prefer reading a JSON file as a buffer.
6385
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
6405
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-json-parse-buffer.md
6386
6406
  */
6387
6407
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
6388
6408
  /**
6389
6409
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
6390
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
6410
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-keyboard-event-key.md
6391
6411
  */
6392
6412
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
6393
6413
  /**
6394
6414
  * Prefer using a logical operator over a ternary.
6395
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
6415
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-logical-operator-over-ternary.md
6396
6416
  */
6397
6417
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
6398
6418
  /**
6399
6419
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
6400
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
6420
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-min-max.md
6401
6421
  */
6402
6422
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
6403
6423
  /**
6404
6424
  * Enforce the use of `Math.trunc` instead of bitwise operators.
6405
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
6425
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-trunc.md
6406
6426
  */
6407
6427
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
6408
6428
  /**
6409
6429
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
6410
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
6430
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-dom-apis.md
6411
6431
  */
6412
6432
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
6413
6433
  /**
6414
6434
  * Prefer modern `Math` APIs over legacy patterns.
6415
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
6435
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-math-apis.md
6416
6436
  */
6417
6437
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
6418
6438
  /**
6419
6439
  * Prefer JavaScript modules (ESM) over CommonJS.
6420
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
6440
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-module.md
6421
6441
  */
6422
6442
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
6423
6443
  /**
6424
6444
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
6425
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
6445
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-native-coercion-functions.md
6426
6446
  */
6427
6447
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
6428
6448
  /**
6429
6449
  * Prefer negative index over `.length - index` when possible.
6430
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
6450
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-negative-index.md
6431
6451
  */
6432
6452
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
6433
6453
  /**
6434
6454
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
6435
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
6455
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-node-protocol.md
6436
6456
  */
6437
6457
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
6438
6458
  /**
6439
6459
  * Prefer `Number` static properties over global ones.
6440
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
6460
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-number-properties.md
6441
6461
  */
6442
6462
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
6443
6463
  /**
6444
6464
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
6445
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
6465
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-object-from-entries.md
6446
6466
  */
6447
6467
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
6448
6468
  /**
6449
6469
  * Prefer omitting the `catch` binding parameter.
6450
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
6470
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-optional-catch-binding.md
6451
6471
  */
6452
6472
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
6453
6473
  /**
6454
6474
  * Prefer borrowing methods from the prototype instead of the instance.
6455
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
6475
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-prototype-methods.md
6456
6476
  */
6457
6477
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
6458
6478
  /**
6459
6479
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
6460
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
6480
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-query-selector.md
6461
6481
  */
6462
6482
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
6463
6483
  /**
6464
6484
  * Prefer `Reflect.apply()` over `Function#apply()`.
6465
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
6485
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-reflect-apply.md
6466
6486
  */
6467
6487
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
6468
6488
  /**
6469
6489
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
6470
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
6490
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-regexp-test.md
6471
6491
  */
6472
6492
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
6473
6493
  /**
6474
6494
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
6475
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
6495
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-has.md
6476
6496
  */
6477
6497
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
6478
6498
  /**
6479
6499
  * Prefer using `Set#size` instead of `Array#length`.
6480
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
6500
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-size.md
6481
6501
  */
6482
6502
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
6483
6503
  /**
6484
6504
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
6485
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
6505
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-single-call.md
6486
6506
  */
6487
6507
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
6488
6508
  /**
6489
6509
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
6490
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
6510
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-spread.md
6491
6511
  */
6492
6512
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
6493
6513
  /**
6494
6514
  * Prefer using the `String.raw` tag to avoid escaping `\`.
6495
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
6515
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-raw.md
6496
6516
  */
6497
6517
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
6498
6518
  /**
6499
6519
  * Prefer `String#replaceAll()` over regex searches with the global flag.
6500
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
6520
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-replace-all.md
6501
6521
  */
6502
6522
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
6503
6523
  /**
6504
6524
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
6505
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
6525
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-slice.md
6506
6526
  */
6507
6527
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
6508
6528
  /**
6509
6529
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
6510
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
6530
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-starts-ends-with.md
6511
6531
  */
6512
6532
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
6513
6533
  /**
6514
6534
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
6515
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
6535
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-trim-start-end.md
6516
6536
  */
6517
6537
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
6518
6538
  /**
6519
6539
  * Prefer using `structuredClone` to create a deep clone.
6520
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
6540
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-structured-clone.md
6521
6541
  */
6522
6542
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
6523
6543
  /**
6524
6544
  * Prefer `switch` over multiple `else-if`.
6525
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
6545
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-switch.md
6526
6546
  */
6527
6547
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
6528
6548
  /**
6529
6549
  * Prefer ternary expressions over simple `if-else` statements.
6530
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
6550
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-ternary.md
6531
6551
  */
6532
6552
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
6533
6553
  /**
6534
6554
  * Prefer top-level await over top-level promises and async function calls.
6535
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
6555
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-top-level-await.md
6536
6556
  */
6537
6557
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
6538
6558
  /**
6539
6559
  * Enforce throwing `TypeError` in type checking conditions.
6540
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
6560
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-type-error.md
6541
6561
  */
6542
6562
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
6543
6563
  /**
6544
6564
  * Prevent abbreviations.
6545
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
6565
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prevent-abbreviations.md
6546
6566
  */
6547
6567
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
6548
6568
  /**
6549
6569
  * Enforce consistent relative URL style.
6550
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
6570
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/relative-url-style.md
6551
6571
  */
6552
6572
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
6553
6573
  /**
6554
6574
  * Enforce using the separator argument with `Array#join()`.
6555
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
6575
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-array-join-separator.md
6556
6576
  */
6557
6577
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
6578
+ /**
6579
+ * Require non-empty module attributes for imports and exports
6580
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-attributes.md
6581
+ */
6582
+ 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
6558
6583
  /**
6559
6584
  * Require non-empty specifier list in import and export statements.
6560
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
6585
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-specifiers.md
6561
6586
  */
6562
6587
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
6563
6588
  /**
6564
6589
  * Enforce using the digits argument with `Number#toFixed()`.
6565
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
6590
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-number-to-fixed-digits-argument.md
6566
6591
  */
6567
6592
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
6568
6593
  /**
6569
6594
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
6570
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
6595
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-post-message-target-origin.md
6571
6596
  */
6572
6597
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
6573
6598
  /**
6574
6599
  * Enforce better string content.
6575
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
6600
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/string-content.md
6576
6601
  */
6577
6602
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
6578
6603
  /**
6579
6604
  * Enforce consistent brace style for `case` clauses.
6580
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
6605
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/switch-case-braces.md
6581
6606
  */
6582
6607
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
6583
6608
  /**
6584
6609
  * Fix whitespace-insensitive template indentation.
6585
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
6610
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/template-indent.md
6586
6611
  */
6587
6612
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
6588
6613
  /**
6589
6614
  * Enforce consistent case for text encoding identifiers.
6590
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
6615
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/text-encoding-identifier-case.md
6591
6616
  */
6592
6617
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
6593
6618
  /**
6594
6619
  * Require `new` when creating an error.
6595
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
6620
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/throw-new-error.md
6596
6621
  */
6597
6622
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
6598
6623
  /**
@@ -10004,6 +10029,10 @@ type JestValidTitle = [] | [{
10004
10029
  [k: string]: (string | [string] | [string, string]) | undefined;
10005
10030
  });
10006
10031
  }];
10032
+ // ----- jsdoc/check-alignment -----
10033
+ type JsdocCheckAlignment = [] | [{
10034
+ innerIndent?: number;
10035
+ }];
10007
10036
  // ----- jsdoc/check-examples -----
10008
10037
  type JsdocCheckExamples = [] | [{
10009
10038
  allowInlineConfig?: boolean;
@@ -13783,6 +13812,10 @@ type PreferReflect = [] | [{
13783
13812
  type PreferRegexLiterals = [] | [{
13784
13813
  disallowRedundantWrapping?: boolean;
13785
13814
  }];
13815
+ // ----- preserve-caught-error -----
13816
+ type PreserveCaughtError = [] | [{
13817
+ requireCatchParameter?: boolean;
13818
+ }];
13786
13819
  // ----- quote-props -----
13787
13820
  type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
13788
13821
  keywords?: boolean;
@@ -14168,6 +14201,10 @@ type UnicornNoArrayReduce = [] | [{
14168
14201
  type UnicornNoArrayReverse = [] | [{
14169
14202
  allowExpressionStatement?: boolean;
14170
14203
  }];
14204
+ // ----- unicorn/no-array-sort -----
14205
+ type UnicornNoArraySort = [] | [{
14206
+ allowExpressionStatement?: boolean;
14207
+ }];
14171
14208
  // ----- unicorn/no-instanceof-builtins -----
14172
14209
  type UnicornNoInstanceofBuiltins = [] | [{
14173
14210
  useErrorIsError?: boolean;
package/dist/index.js CHANGED
@@ -164,6 +164,7 @@ const additionalRules = {
164
164
  "prefer-rest-params": "error",
165
165
  "prefer-spread": "error",
166
166
  "prefer-template": "error",
167
+ "preserve-caught-error": "error",
167
168
  "radix": "error",
168
169
  "require-await": "error",
169
170
  "strict": ["error", "safe"],
@@ -481,10 +482,10 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
481
482
  isReactEnabled && unwrap(import("./react-DD9VDtyi.js")),
482
483
  isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
483
484
  isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
484
- isJestEnabled && unwrap(import("./jest-BhHoh4EB.js")),
485
- isVitestEnabled && unwrap(import("./vitest-DaKrmXJy.js")),
485
+ isJestEnabled && unwrap(import("./jest-G-dRTY_j.js")),
486
+ isVitestEnabled && unwrap(import("./vitest-C38KvCT7.js")),
486
487
  isTestingLibraryEnabled && unwrap(import("./testing-library-lJsmjyFo.js")),
487
- isPlaywrightEnabled && unwrap(import("./playwright-Cyd4gThA.js")),
488
+ isPlaywrightEnabled && unwrap(import("./playwright-ywSmTTAR.js")),
488
489
  isStorybookEnabled && unwrap(import("./storybook-BO4plVPp.js")),
489
490
  isNextjsEnabled && unwrap(import("./nextjs-X6g9xH_I.js"))
490
491
  ]);
@@ -23,6 +23,7 @@ const jestRules = async () => {
23
23
  "jest/no-restricted-matchers": "off",
24
24
  "jest/no-test-return-statement": "error",
25
25
  "jest/no-untyped-mock-factory": "off",
26
+ "jest/padding-around-all": "error",
26
27
  "jest/prefer-called-with": "error",
27
28
  "jest/prefer-comparison-matcher": "error",
28
29
  "jest/prefer-each": "error",
@@ -31,6 +32,7 @@ const jestRules = async () => {
31
32
  "jest/prefer-expect-resolves": "error",
32
33
  "jest/prefer-hooks-in-order": "error",
33
34
  "jest/prefer-hooks-on-top": "error",
35
+ "jest/prefer-jest-mocked": "error",
34
36
  "jest/prefer-lowercase-title": "off",
35
37
  "jest/prefer-mock-promise-shorthand": "error",
36
38
  "jest/prefer-snapshot-hint": "error",
@@ -21,6 +21,12 @@ const playwrightRules = async () => {
21
21
  "playwright/no-useless-not": "error",
22
22
  "playwright/no-wait-for-selector": "error",
23
23
  "playwright/no-wait-for-timeout": "error",
24
+ "playwright/prefer-strict-equal": "error",
25
+ "playwright/prefer-to-be": "error",
26
+ "playwright/prefer-to-contain": "error",
27
+ "playwright/prefer-to-have-count": "error",
28
+ "playwright/prefer-to-have-length": "error",
29
+ "playwright/require-to-throw-message": "error",
24
30
  "playwright/valid-title": "off"
25
31
  };
26
32
  };
@@ -28,6 +28,7 @@ const vitestRules = async () => {
28
28
  "vitest/no-standalone-expect": "error",
29
29
  "vitest/no-test-prefixes": "error",
30
30
  "vitest/no-test-return-statement": "error",
31
+ "vitest/padding-around-all": "error",
31
32
  "vitest/prefer-called-once": "error",
32
33
  "vitest/prefer-called-times": "off",
33
34
  "vitest/prefer-called-with": "error",
@@ -49,6 +50,7 @@ const vitestRules = async () => {
49
50
  "vitest/prefer-to-contain": "error",
50
51
  "vitest/prefer-to-have-length": "error",
51
52
  "vitest/prefer-todo": "warn",
53
+ "vitest/prefer-vi-mocked": "error",
52
54
  "vitest/require-hook": "error",
53
55
  "vitest/require-to-throw-message": "error",
54
56
  "vitest/require-top-level-describe": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "6.7.0",
3
+ "version": "6.9.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -40,15 +40,15 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
43
- "@eslint-react/eslint-plugin": "2.0.0-next.153",
44
- "@eslint/js": "^9.34.0",
43
+ "@eslint-react/eslint-plugin": "2.0.0-next.166",
44
+ "@eslint/js": "^9.35.0",
45
45
  "@next/eslint-plugin-next": "^15.5.2",
46
46
  "@stylistic/eslint-plugin": "^5.3.1",
47
- "@tanstack/eslint-plugin-query": "^5.83.1",
47
+ "@tanstack/eslint-plugin-query": "^5.86.0",
48
48
  "@types/eslint": "9.6.1",
49
49
  "@typescript-eslint/parser": "^8.42.0",
50
50
  "@typescript-eslint/utils": "^8.42.0",
51
- "@vitest/eslint-plugin": "^1.3.8",
51
+ "@vitest/eslint-plugin": "^1.3.9",
52
52
  "astro-eslint-parser": "^1.2.2",
53
53
  "eslint-config-flat-gitignore": "^2.1.0",
54
54
  "eslint-config-prettier": "^10.1.8",
@@ -57,7 +57,7 @@
57
57
  "eslint-plugin-import-x": "^4.16.1",
58
58
  "eslint-plugin-jest": "^29.0.1",
59
59
  "eslint-plugin-jest-dom": "^5.5.0",
60
- "eslint-plugin-jsdoc": "^54.3.1",
60
+ "eslint-plugin-jsdoc": "^54.4.0",
61
61
  "eslint-plugin-jsx-a11y": "^6.10.2",
62
62
  "eslint-plugin-n": "^17.21.3",
63
63
  "eslint-plugin-perfectionist": "^4.15.0",
@@ -68,7 +68,7 @@
68
68
  "eslint-plugin-regexp": "^2.10.0",
69
69
  "eslint-plugin-storybook": "0.12.0",
70
70
  "eslint-plugin-testing-library": "^7.6.8",
71
- "eslint-plugin-unicorn": "^60.0.0",
71
+ "eslint-plugin-unicorn": "^61.0.1",
72
72
  "globals": "^16.3.0",
73
73
  "local-pkg": "^1.1.2",
74
74
  "typescript-eslint": "^8.42.0"