diff --git a/.eslint-doc-generatorrc.js b/.eslint-doc-generatorrc.js index 684d15167d..38b298f4ea 100644 --- a/.eslint-doc-generatorrc.js +++ b/.eslint-doc-generatorrc.js @@ -2,6 +2,10 @@ /** @type {import('eslint-doc-generator').GenerateOptions} */ const config = { + configEmoji: [ + ['recommended', 'βœ…'], + ['unopinionated', 'β˜‘οΈ'], + ], ignoreConfig: [ 'all', 'flat/all', diff --git a/docs/rules/better-regex.md b/docs/rules/better-regex.md index 2c38b6b1a0..68f524ca36 100644 --- a/docs/rules/better-regex.md +++ b/docs/rules/better-regex.md @@ -1,6 +1,6 @@ # Improve regexes by making them shorter, consistent, and safer -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/catch-error-name.md b/docs/rules/catch-error-name.md index 240140fa92..70e3c6651a 100644 --- a/docs/rules/catch-error-name.md +++ b/docs/rules/catch-error-name.md @@ -1,6 +1,6 @@ # Enforce a specific parameter name in catch clauses -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/consistent-assert.md b/docs/rules/consistent-assert.md index 4cdee8471c..6e6a9591f8 100644 --- a/docs/rules/consistent-assert.md +++ b/docs/rules/consistent-assert.md @@ -1,6 +1,6 @@ # Enforce consistent assertion style with `node:assert` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/consistent-date-clone.md b/docs/rules/consistent-date-clone.md index 86c99ae812..3143a31114 100644 --- a/docs/rules/consistent-date-clone.md +++ b/docs/rules/consistent-date-clone.md @@ -1,6 +1,6 @@ # Prefer passing `Date` directly to the constructor when cloning -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/consistent-destructuring.md b/docs/rules/consistent-destructuring.md index f702b6f5e1..7df48c50f6 100644 --- a/docs/rules/consistent-destructuring.md +++ b/docs/rules/consistent-destructuring.md @@ -1,6 +1,6 @@ # Use destructured variables over properties -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/consistent-empty-array-spread.md b/docs/rules/consistent-empty-array-spread.md index e97441ad0a..ed98ee85c4 100644 --- a/docs/rules/consistent-empty-array-spread.md +++ b/docs/rules/consistent-empty-array-spread.md @@ -1,6 +1,6 @@ # Prefer consistent types when spreading a ternary in an array literal -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/consistent-existence-index-check.md b/docs/rules/consistent-existence-index-check.md index c5be9c3af1..aab625bea5 100644 --- a/docs/rules/consistent-existence-index-check.md +++ b/docs/rules/consistent-existence-index-check.md @@ -1,6 +1,6 @@ # Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/consistent-function-scoping.md b/docs/rules/consistent-function-scoping.md index a7d5e4e705..71f3837912 100644 --- a/docs/rules/consistent-function-scoping.md +++ b/docs/rules/consistent-function-scoping.md @@ -1,6 +1,6 @@ # Move function definitions to the highest possible scope -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). diff --git a/docs/rules/custom-error-definition.md b/docs/rules/custom-error-definition.md index 20ca3eba43..25e13900b3 100644 --- a/docs/rules/custom-error-definition.md +++ b/docs/rules/custom-error-definition.md @@ -1,6 +1,6 @@ # Enforce correct `Error` subclassing -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/empty-brace-spaces.md b/docs/rules/empty-brace-spaces.md index 37b78fcdc8..67b8a7a11c 100644 --- a/docs/rules/empty-brace-spaces.md +++ b/docs/rules/empty-brace-spaces.md @@ -1,6 +1,6 @@ # Enforce no spaces between braces -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/error-message.md b/docs/rules/error-message.md index a23a43e5f1..8ee195b504 100644 --- a/docs/rules/error-message.md +++ b/docs/rules/error-message.md @@ -1,6 +1,6 @@ # Enforce passing a `message` value when creating a built-in error -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/escape-case.md b/docs/rules/escape-case.md index c169b83092..f5bc149d4b 100644 --- a/docs/rules/escape-case.md +++ b/docs/rules/escape-case.md @@ -1,6 +1,6 @@ # Require escape sequences to use uppercase or lowercase values -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/expiring-todo-comments.md b/docs/rules/expiring-todo-comments.md index 86db8b6e4c..ede72ee44a 100644 --- a/docs/rules/expiring-todo-comments.md +++ b/docs/rules/expiring-todo-comments.md @@ -1,6 +1,6 @@ # Add expiration conditions to TODO comments -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/explicit-length-check.md b/docs/rules/explicit-length-check.md index 9bd979209e..ae8b2e0630 100644 --- a/docs/rules/explicit-length-check.md +++ b/docs/rules/explicit-length-check.md @@ -1,6 +1,6 @@ # Enforce explicitly comparing the `length` or `size` property of a value -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/filename-case.md b/docs/rules/filename-case.md index 8de7b35382..c6e440e578 100644 --- a/docs/rules/filename-case.md +++ b/docs/rules/filename-case.md @@ -1,6 +1,6 @@ # Enforce a case style for filenames -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). diff --git a/docs/rules/import-style.md b/docs/rules/import-style.md index 7de0b86929..0c5c2f80c6 100644 --- a/docs/rules/import-style.md +++ b/docs/rules/import-style.md @@ -1,6 +1,6 @@ # Enforce specific import styles per module -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/new-for-builtins.md b/docs/rules/new-for-builtins.md index e4ee3d252e..d30ecc117c 100644 --- a/docs/rules/new-for-builtins.md +++ b/docs/rules/new-for-builtins.md @@ -1,6 +1,6 @@ # Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-abusive-eslint-disable.md b/docs/rules/no-abusive-eslint-disable.md index 06c4d358ed..706c49bd49 100644 --- a/docs/rules/no-abusive-eslint-disable.md +++ b/docs/rules/no-abusive-eslint-disable.md @@ -1,6 +1,6 @@ # Enforce specifying rules to disable in `eslint-disable` comments -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-accessor-recursion.md b/docs/rules/no-accessor-recursion.md index 9a05bbe868..70fb881d8c 100644 --- a/docs/rules/no-accessor-recursion.md +++ b/docs/rules/no-accessor-recursion.md @@ -1,6 +1,6 @@ # Disallow recursive access to `this` within getters and setters -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-anonymous-default-export.md b/docs/rules/no-anonymous-default-export.md index 0c0a115a22..4e7e14d40e 100644 --- a/docs/rules/no-anonymous-default-export.md +++ b/docs/rules/no-anonymous-default-export.md @@ -1,6 +1,6 @@ # Disallow anonymous functions and classes as the default export -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-array-callback-reference.md b/docs/rules/no-array-callback-reference.md index 6f7ba2c2c9..601abcb40e 100644 --- a/docs/rules/no-array-callback-reference.md +++ b/docs/rules/no-array-callback-reference.md @@ -1,6 +1,6 @@ # Prevent passing a function reference directly to iterator methods -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-array-for-each.md b/docs/rules/no-array-for-each.md index 26b951e351..540d4e9b2c 100644 --- a/docs/rules/no-array-for-each.md +++ b/docs/rules/no-array-for-each.md @@ -1,6 +1,6 @@ # Prefer `for…of` over the `forEach` method -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-array-method-this-argument.md b/docs/rules/no-array-method-this-argument.md index cd38b45474..3d7e5db106 100644 --- a/docs/rules/no-array-method-this-argument.md +++ b/docs/rules/no-array-method-this-argument.md @@ -1,6 +1,6 @@ # Disallow using the `this` argument in array methods -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-array-reduce.md b/docs/rules/no-array-reduce.md index 586db67fb3..6b1815fb1b 100644 --- a/docs/rules/no-array-reduce.md +++ b/docs/rules/no-array-reduce.md @@ -1,6 +1,6 @@ # Disallow `Array#reduce()` and `Array#reduceRight()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). diff --git a/docs/rules/no-array-reverse.md b/docs/rules/no-array-reverse.md index 3154fdf64a..8a327dde98 100644 --- a/docs/rules/no-array-reverse.md +++ b/docs/rules/no-array-reverse.md @@ -1,6 +1,6 @@ # Prefer `Array#toReversed()` over `Array#reverse()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-await-expression-member.md b/docs/rules/no-await-expression-member.md index 900b2fbc2d..c863e51cd0 100644 --- a/docs/rules/no-await-expression-member.md +++ b/docs/rules/no-await-expression-member.md @@ -1,6 +1,6 @@ # Disallow member access from await expression -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-await-in-promise-methods.md b/docs/rules/no-await-in-promise-methods.md index fd338e5f92..f76e90c49c 100644 --- a/docs/rules/no-await-in-promise-methods.md +++ b/docs/rules/no-await-in-promise-methods.md @@ -1,6 +1,6 @@ # Disallow using `await` in `Promise` method parameters -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-console-spaces.md b/docs/rules/no-console-spaces.md index 7479c4a47f..442101c4c6 100644 --- a/docs/rules/no-console-spaces.md +++ b/docs/rules/no-console-spaces.md @@ -1,6 +1,6 @@ # Do not use leading/trailing space between `console.log` parameters -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-document-cookie.md b/docs/rules/no-document-cookie.md index 2b0ce2c708..099b64af4e 100644 --- a/docs/rules/no-document-cookie.md +++ b/docs/rules/no-document-cookie.md @@ -1,6 +1,6 @@ # Do not use `document.cookie` directly -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-empty-file.md b/docs/rules/no-empty-file.md index 43bd15be29..8cdfd11625 100644 --- a/docs/rules/no-empty-file.md +++ b/docs/rules/no-empty-file.md @@ -1,6 +1,6 @@ # Disallow empty files -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-for-loop.md b/docs/rules/no-for-loop.md index be96700c7f..3e3e6c56b9 100644 --- a/docs/rules/no-for-loop.md +++ b/docs/rules/no-for-loop.md @@ -1,6 +1,6 @@ # Do not use a `for` loop that can be replaced with a `for-of` loop -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-hex-escape.md b/docs/rules/no-hex-escape.md index 098b0cdf3b..6396b4720d 100644 --- a/docs/rules/no-hex-escape.md +++ b/docs/rules/no-hex-escape.md @@ -1,6 +1,6 @@ # Enforce the use of Unicode escapes instead of hexadecimal escapes -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-instanceof-builtins.md b/docs/rules/no-instanceof-builtins.md index 24cbeb7dd6..c94c724821 100644 --- a/docs/rules/no-instanceof-builtins.md +++ b/docs/rules/no-instanceof-builtins.md @@ -1,6 +1,6 @@ # Disallow `instanceof` with built-in objects -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-invalid-fetch-options.md b/docs/rules/no-invalid-fetch-options.md index 0a8ad4a586..2963a3ea96 100644 --- a/docs/rules/no-invalid-fetch-options.md +++ b/docs/rules/no-invalid-fetch-options.md @@ -1,6 +1,6 @@ # Disallow invalid options in `fetch()` and `new Request()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-invalid-remove-event-listener.md b/docs/rules/no-invalid-remove-event-listener.md index fa91e37d89..a635548300 100644 --- a/docs/rules/no-invalid-remove-event-listener.md +++ b/docs/rules/no-invalid-remove-event-listener.md @@ -1,6 +1,6 @@ # Prevent calling `EventTarget#removeEventListener()` with the result of an expression -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-keyword-prefix.md b/docs/rules/no-keyword-prefix.md index e02abd4284..ed957a0baf 100644 --- a/docs/rules/no-keyword-prefix.md +++ b/docs/rules/no-keyword-prefix.md @@ -1,6 +1,6 @@ # Disallow identifiers starting with `new` or `class` -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-lonely-if.md b/docs/rules/no-lonely-if.md index c2b7516606..ea46fdb5e6 100644 --- a/docs/rules/no-lonely-if.md +++ b/docs/rules/no-lonely-if.md @@ -1,6 +1,6 @@ # Disallow `if` statements as the only statement in `if` blocks without `else` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-magic-array-flat-depth.md b/docs/rules/no-magic-array-flat-depth.md index 415ac24804..7275123efb 100644 --- a/docs/rules/no-magic-array-flat-depth.md +++ b/docs/rules/no-magic-array-flat-depth.md @@ -1,6 +1,6 @@ # Disallow a magic number as the `depth` argument in `Array#flat(…).` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-named-default.md b/docs/rules/no-named-default.md index 1258dc2dd4..8b211fe156 100644 --- a/docs/rules/no-named-default.md +++ b/docs/rules/no-named-default.md @@ -1,6 +1,6 @@ # Disallow named usage of default import and export -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-negated-condition.md b/docs/rules/no-negated-condition.md index 29105e854f..833a4c65f8 100644 --- a/docs/rules/no-negated-condition.md +++ b/docs/rules/no-negated-condition.md @@ -1,6 +1,6 @@ # Disallow negated conditions -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-negation-in-equality-check.md b/docs/rules/no-negation-in-equality-check.md index 50f023d753..f9ac8e4479 100644 --- a/docs/rules/no-negation-in-equality-check.md +++ b/docs/rules/no-negation-in-equality-check.md @@ -1,6 +1,6 @@ # Disallow negated expression in equality check -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-nested-ternary.md b/docs/rules/no-nested-ternary.md index b45726f8ee..39ce32a719 100644 --- a/docs/rules/no-nested-ternary.md +++ b/docs/rules/no-nested-ternary.md @@ -1,6 +1,6 @@ # Disallow nested ternary expressions -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-new-array.md b/docs/rules/no-new-array.md index 19e07e7747..f12d9b259d 100644 --- a/docs/rules/no-new-array.md +++ b/docs/rules/no-new-array.md @@ -1,6 +1,6 @@ # Disallow `new Array()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-new-buffer.md b/docs/rules/no-new-buffer.md index 775970c4a6..785a54f31c 100644 --- a/docs/rules/no-new-buffer.md +++ b/docs/rules/no-new-buffer.md @@ -1,6 +1,6 @@ # Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-null.md b/docs/rules/no-null.md index d1008b6d78..9d4c51b821 100644 --- a/docs/rules/no-null.md +++ b/docs/rules/no-null.md @@ -1,6 +1,6 @@ # Disallow the use of the `null` literal -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-object-as-default-parameter.md b/docs/rules/no-object-as-default-parameter.md index 6c515e0418..94a7b62ac2 100644 --- a/docs/rules/no-object-as-default-parameter.md +++ b/docs/rules/no-object-as-default-parameter.md @@ -1,6 +1,6 @@ # Disallow the use of objects as default parameters -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-process-exit.md b/docs/rules/no-process-exit.md index 751b1d5a93..b71e361a3f 100644 --- a/docs/rules/no-process-exit.md +++ b/docs/rules/no-process-exit.md @@ -1,6 +1,6 @@ # Disallow `process.exit()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-single-promise-in-promise-methods.md b/docs/rules/no-single-promise-in-promise-methods.md index 642b31f405..804e2ef60e 100644 --- a/docs/rules/no-single-promise-in-promise-methods.md +++ b/docs/rules/no-single-promise-in-promise-methods.md @@ -1,6 +1,6 @@ # Disallow passing single-element arrays to `Promise` methods -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-static-only-class.md b/docs/rules/no-static-only-class.md index 71a0441658..8f54bb58ed 100644 --- a/docs/rules/no-static-only-class.md +++ b/docs/rules/no-static-only-class.md @@ -1,6 +1,6 @@ # Disallow classes that only have static members -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-thenable.md b/docs/rules/no-thenable.md index 46a6c3f23a..041de89f93 100644 --- a/docs/rules/no-thenable.md +++ b/docs/rules/no-thenable.md @@ -1,6 +1,6 @@ # Disallow `then` property -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-this-assignment.md b/docs/rules/no-this-assignment.md index 25ec54396f..c2eaabbe55 100644 --- a/docs/rules/no-this-assignment.md +++ b/docs/rules/no-this-assignment.md @@ -1,6 +1,6 @@ # Disallow assigning `this` to a variable -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-typeof-undefined.md b/docs/rules/no-typeof-undefined.md index 8029e81903..84fd77536e 100644 --- a/docs/rules/no-typeof-undefined.md +++ b/docs/rules/no-typeof-undefined.md @@ -1,6 +1,6 @@ # Disallow comparing `undefined` using `typeof` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-unnecessary-array-flat-depth.md b/docs/rules/no-unnecessary-array-flat-depth.md index 3a4ed0e4f2..37d058f0cd 100644 --- a/docs/rules/no-unnecessary-array-flat-depth.md +++ b/docs/rules/no-unnecessary-array-flat-depth.md @@ -1,6 +1,6 @@ # Disallow using `1` as the `depth` argument of `Array#flat()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-unnecessary-array-splice-count.md b/docs/rules/no-unnecessary-array-splice-count.md index db540230af..b11b1ee366 100644 --- a/docs/rules/no-unnecessary-array-splice-count.md +++ b/docs/rules/no-unnecessary-array-splice-count.md @@ -1,6 +1,6 @@ # Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-unnecessary-await.md b/docs/rules/no-unnecessary-await.md index 0427953bfd..35fd92849e 100644 --- a/docs/rules/no-unnecessary-await.md +++ b/docs/rules/no-unnecessary-await.md @@ -1,6 +1,6 @@ # Disallow awaiting non-promise values -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-unnecessary-polyfills.md b/docs/rules/no-unnecessary-polyfills.md index 7ff1aefc81..98c3d8c708 100644 --- a/docs/rules/no-unnecessary-polyfills.md +++ b/docs/rules/no-unnecessary-polyfills.md @@ -1,6 +1,6 @@ # Enforce the use of built-in methods instead of unnecessary polyfills -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-unnecessary-slice-end.md b/docs/rules/no-unnecessary-slice-end.md index 3ff7b3fece..426f3fa2b9 100644 --- a/docs/rules/no-unnecessary-slice-end.md +++ b/docs/rules/no-unnecessary-slice-end.md @@ -1,6 +1,6 @@ # Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-unreadable-array-destructuring.md b/docs/rules/no-unreadable-array-destructuring.md index 249314b239..55dd35a5c7 100644 --- a/docs/rules/no-unreadable-array-destructuring.md +++ b/docs/rules/no-unreadable-array-destructuring.md @@ -1,6 +1,6 @@ # Disallow unreadable array destructuring -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-unreadable-iife.md b/docs/rules/no-unreadable-iife.md index 40e0653ee7..d179ac4df0 100644 --- a/docs/rules/no-unreadable-iife.md +++ b/docs/rules/no-unreadable-iife.md @@ -1,6 +1,6 @@ # Disallow unreadable IIFEs -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-unused-properties.md b/docs/rules/no-unused-properties.md index a4143920fe..b2c3e42547 100644 --- a/docs/rules/no-unused-properties.md +++ b/docs/rules/no-unused-properties.md @@ -1,6 +1,6 @@ # Disallow unused object properties -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/no-useless-error-capture-stack-trace.md b/docs/rules/no-useless-error-capture-stack-trace.md index 3c497555f1..bf300ac04b 100644 --- a/docs/rules/no-useless-error-capture-stack-trace.md +++ b/docs/rules/no-useless-error-capture-stack-trace.md @@ -1,6 +1,6 @@ # Disallow unnecessary `Error.captureStackTrace(…)` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-useless-fallback-in-spread.md b/docs/rules/no-useless-fallback-in-spread.md index d2fb0bc764..167cd25307 100644 --- a/docs/rules/no-useless-fallback-in-spread.md +++ b/docs/rules/no-useless-fallback-in-spread.md @@ -1,6 +1,6 @@ # Disallow useless fallback when spreading in object literals -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-useless-length-check.md b/docs/rules/no-useless-length-check.md index 7203cce609..5812b5aef5 100644 --- a/docs/rules/no-useless-length-check.md +++ b/docs/rules/no-useless-length-check.md @@ -1,6 +1,6 @@ # Disallow useless array length check -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-useless-promise-resolve-reject.md b/docs/rules/no-useless-promise-resolve-reject.md index e88f61b3e8..797034d6fc 100644 --- a/docs/rules/no-useless-promise-resolve-reject.md +++ b/docs/rules/no-useless-promise-resolve-reject.md @@ -1,6 +1,6 @@ # Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-useless-spread.md b/docs/rules/no-useless-spread.md index d97cae9fc0..79a08a4f2f 100644 --- a/docs/rules/no-useless-spread.md +++ b/docs/rules/no-useless-spread.md @@ -1,6 +1,6 @@ # Disallow unnecessary spread -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-useless-switch-case.md b/docs/rules/no-useless-switch-case.md index cd48eb8899..65bfdc9127 100644 --- a/docs/rules/no-useless-switch-case.md +++ b/docs/rules/no-useless-switch-case.md @@ -1,6 +1,6 @@ # Disallow useless case in switch statements -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-useless-undefined.md b/docs/rules/no-useless-undefined.md index 1d5608b41c..08e1cec946 100644 --- a/docs/rules/no-useless-undefined.md +++ b/docs/rules/no-useless-undefined.md @@ -1,6 +1,6 @@ # Disallow useless `undefined` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-zero-fractions.md b/docs/rules/no-zero-fractions.md index b84e2f9f2f..9ec0d1ed06 100644 --- a/docs/rules/no-zero-fractions.md +++ b/docs/rules/no-zero-fractions.md @@ -1,6 +1,6 @@ # Disallow number literals with zero fractions or dangling dots -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/number-literal-case.md b/docs/rules/number-literal-case.md index 1534e4c1b4..424ceddeff 100644 --- a/docs/rules/number-literal-case.md +++ b/docs/rules/number-literal-case.md @@ -1,6 +1,6 @@ # Enforce proper case for numeric literals -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/numeric-separators-style.md b/docs/rules/numeric-separators-style.md index 03a9353136..64e2b8600e 100644 --- a/docs/rules/numeric-separators-style.md +++ b/docs/rules/numeric-separators-style.md @@ -1,6 +1,6 @@ # Enforce the style of numeric separators by correctly grouping digits -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-add-event-listener.md b/docs/rules/prefer-add-event-listener.md index 0e591e8075..964fa50cf5 100644 --- a/docs/rules/prefer-add-event-listener.md +++ b/docs/rules/prefer-add-event-listener.md @@ -1,6 +1,6 @@ # Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-array-find.md b/docs/rules/prefer-array-find.md index 3519c45e18..4ce91809b4 100644 --- a/docs/rules/prefer-array-find.md +++ b/docs/rules/prefer-array-find.md @@ -1,6 +1,6 @@ # Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-array-flat-map.md b/docs/rules/prefer-array-flat-map.md index b2233ff2cb..72bfb8b9df 100644 --- a/docs/rules/prefer-array-flat-map.md +++ b/docs/rules/prefer-array-flat-map.md @@ -1,6 +1,6 @@ # Prefer `.flatMap(…)` over `.map(…).flat()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-array-flat.md b/docs/rules/prefer-array-flat.md index 2b173c45a2..95dbd25387 100644 --- a/docs/rules/prefer-array-flat.md +++ b/docs/rules/prefer-array-flat.md @@ -1,6 +1,6 @@ # Prefer `Array#flat()` over legacy techniques to flatten arrays -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-array-index-of.md b/docs/rules/prefer-array-index-of.md index 63fc1c9eb0..4dcc7793a1 100644 --- a/docs/rules/prefer-array-index-of.md +++ b/docs/rules/prefer-array-index-of.md @@ -1,6 +1,6 @@ # Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-array-some.md b/docs/rules/prefer-array-some.md index f51bce12cd..210d9f41c7 100644 --- a/docs/rules/prefer-array-some.md +++ b/docs/rules/prefer-array-some.md @@ -1,6 +1,6 @@ # Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-at.md b/docs/rules/prefer-at.md index 818cdd46b4..1e7c448a60 100644 --- a/docs/rules/prefer-at.md +++ b/docs/rules/prefer-at.md @@ -1,6 +1,6 @@ # Prefer `.at()` method for index access and `String#charAt()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-blob-reading-methods.md b/docs/rules/prefer-blob-reading-methods.md index a509a054c9..3b55cfa8ef 100644 --- a/docs/rules/prefer-blob-reading-methods.md +++ b/docs/rules/prefer-blob-reading-methods.md @@ -1,6 +1,6 @@ # Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/prefer-class-fields.md b/docs/rules/prefer-class-fields.md index 0e65dd26fc..fe6bc59d24 100644 --- a/docs/rules/prefer-class-fields.md +++ b/docs/rules/prefer-class-fields.md @@ -1,6 +1,6 @@ # Prefer class field declarations over `this` assignments in constructors -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-code-point.md b/docs/rules/prefer-code-point.md index 4d11a5208d..af0a50f848 100644 --- a/docs/rules/prefer-code-point.md +++ b/docs/rules/prefer-code-point.md @@ -1,6 +1,6 @@ # Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-date-now.md b/docs/rules/prefer-date-now.md index 0d0e46383c..5c41e677bc 100644 --- a/docs/rules/prefer-date-now.md +++ b/docs/rules/prefer-date-now.md @@ -1,6 +1,6 @@ # Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-default-parameters.md b/docs/rules/prefer-default-parameters.md index 4ada93d767..e059552cde 100644 --- a/docs/rules/prefer-default-parameters.md +++ b/docs/rules/prefer-default-parameters.md @@ -1,6 +1,6 @@ # Prefer default parameters over reassignment -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-dom-node-append.md b/docs/rules/prefer-dom-node-append.md index 96fa3ff48f..b80a0819ca 100644 --- a/docs/rules/prefer-dom-node-append.md +++ b/docs/rules/prefer-dom-node-append.md @@ -1,6 +1,6 @@ # Prefer `Node#append()` over `Node#appendChild()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-dom-node-dataset.md b/docs/rules/prefer-dom-node-dataset.md index d7d9d06b61..5eaa0ab9f0 100644 --- a/docs/rules/prefer-dom-node-dataset.md +++ b/docs/rules/prefer-dom-node-dataset.md @@ -1,6 +1,6 @@ # Prefer using `.dataset` on DOM elements over calling attribute methods -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-dom-node-remove.md b/docs/rules/prefer-dom-node-remove.md index 573e1ffd61..073b160b65 100644 --- a/docs/rules/prefer-dom-node-remove.md +++ b/docs/rules/prefer-dom-node-remove.md @@ -1,6 +1,6 @@ # Prefer `childNode.remove()` over `parentNode.removeChild(childNode)` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-dom-node-text-content.md b/docs/rules/prefer-dom-node-text-content.md index e15acd1f69..e9ec99adab 100644 --- a/docs/rules/prefer-dom-node-text-content.md +++ b/docs/rules/prefer-dom-node-text-content.md @@ -1,6 +1,6 @@ # Prefer `.textContent` over `.innerText` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-event-target.md b/docs/rules/prefer-event-target.md index cf79a9335d..2b4c80c37b 100644 --- a/docs/rules/prefer-event-target.md +++ b/docs/rules/prefer-event-target.md @@ -1,6 +1,6 @@ # Prefer `EventTarget` over `EventEmitter` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. diff --git a/docs/rules/prefer-export-from.md b/docs/rules/prefer-export-from.md index 30b2141e2e..86c3405a0e 100644 --- a/docs/rules/prefer-export-from.md +++ b/docs/rules/prefer-export-from.md @@ -1,6 +1,6 @@ # Prefer `export…from` when re-exporting -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-global-this.md b/docs/rules/prefer-global-this.md index e3a46d1335..df9c22e968 100644 --- a/docs/rules/prefer-global-this.md +++ b/docs/rules/prefer-global-this.md @@ -1,6 +1,6 @@ # Prefer `globalThis` over `window`, `self`, and `global` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-import-meta-properties.md b/docs/rules/prefer-import-meta-properties.md index 01f6e44647..8d087b3791 100644 --- a/docs/rules/prefer-import-meta-properties.md +++ b/docs/rules/prefer-import-meta-properties.md @@ -1,6 +1,6 @@ # Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-includes.md b/docs/rules/prefer-includes.md index 9782c8b912..0eac75105d 100644 --- a/docs/rules/prefer-includes.md +++ b/docs/rules/prefer-includes.md @@ -1,6 +1,6 @@ # Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-json-parse-buffer.md b/docs/rules/prefer-json-parse-buffer.md index 112ff0018b..87c969d2d9 100644 --- a/docs/rules/prefer-json-parse-buffer.md +++ b/docs/rules/prefer-json-parse-buffer.md @@ -1,6 +1,6 @@ # Prefer reading a JSON file as a buffer -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-keyboard-event-key.md b/docs/rules/prefer-keyboard-event-key.md index d2e9b754a4..5529ec067d 100644 --- a/docs/rules/prefer-keyboard-event-key.md +++ b/docs/rules/prefer-keyboard-event-key.md @@ -1,6 +1,6 @@ # Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-logical-operator-over-ternary.md b/docs/rules/prefer-logical-operator-over-ternary.md index 90ce71aa00..a95fb1754a 100644 --- a/docs/rules/prefer-logical-operator-over-ternary.md +++ b/docs/rules/prefer-logical-operator-over-ternary.md @@ -1,6 +1,6 @@ # Prefer using a logical operator over a ternary -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-math-min-max.md b/docs/rules/prefer-math-min-max.md index f94275e0a3..cf627c3e5b 100644 --- a/docs/rules/prefer-math-min-max.md +++ b/docs/rules/prefer-math-min-max.md @@ -1,6 +1,6 @@ # Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-math-trunc.md b/docs/rules/prefer-math-trunc.md index da726529f4..606ca72262 100644 --- a/docs/rules/prefer-math-trunc.md +++ b/docs/rules/prefer-math-trunc.md @@ -1,6 +1,6 @@ # Enforce the use of `Math.trunc` instead of bitwise operators -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-modern-dom-apis.md b/docs/rules/prefer-modern-dom-apis.md index cb37c6d09f..f7c7448714 100644 --- a/docs/rules/prefer-modern-dom-apis.md +++ b/docs/rules/prefer-modern-dom-apis.md @@ -1,6 +1,6 @@ # Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-modern-math-apis.md b/docs/rules/prefer-modern-math-apis.md index d480e2dbbb..570afdb2cd 100644 --- a/docs/rules/prefer-modern-math-apis.md +++ b/docs/rules/prefer-modern-math-apis.md @@ -1,6 +1,6 @@ # Prefer modern `Math` APIs over legacy patterns -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-module.md b/docs/rules/prefer-module.md index a90f2b9886..b87301d2ad 100644 --- a/docs/rules/prefer-module.md +++ b/docs/rules/prefer-module.md @@ -1,6 +1,6 @@ # Prefer JavaScript modules (ESM) over CommonJS -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-native-coercion-functions.md b/docs/rules/prefer-native-coercion-functions.md index 7d42ae1e7c..6212fcdd44 100644 --- a/docs/rules/prefer-native-coercion-functions.md +++ b/docs/rules/prefer-native-coercion-functions.md @@ -1,6 +1,6 @@ # Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-negative-index.md b/docs/rules/prefer-negative-index.md index cf39a92458..7de7e61756 100644 --- a/docs/rules/prefer-negative-index.md +++ b/docs/rules/prefer-negative-index.md @@ -1,6 +1,6 @@ # Prefer negative index over `.length - index` when possible -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-node-protocol.md b/docs/rules/prefer-node-protocol.md index b3bc1c4cd8..280a950d62 100644 --- a/docs/rules/prefer-node-protocol.md +++ b/docs/rules/prefer-node-protocol.md @@ -1,6 +1,6 @@ # Prefer using the `node:` protocol when importing Node.js builtin modules -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-number-properties.md b/docs/rules/prefer-number-properties.md index b4e213d9aa..12b78f040a 100644 --- a/docs/rules/prefer-number-properties.md +++ b/docs/rules/prefer-number-properties.md @@ -1,6 +1,6 @@ # Prefer `Number` static properties over global ones -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-object-from-entries.md b/docs/rules/prefer-object-from-entries.md index 588f5fc352..27f2d69209 100644 --- a/docs/rules/prefer-object-from-entries.md +++ b/docs/rules/prefer-object-from-entries.md @@ -1,6 +1,6 @@ # Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-optional-catch-binding.md b/docs/rules/prefer-optional-catch-binding.md index 822a75f07e..d5975acb52 100644 --- a/docs/rules/prefer-optional-catch-binding.md +++ b/docs/rules/prefer-optional-catch-binding.md @@ -1,6 +1,6 @@ # Prefer omitting the `catch` binding parameter -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-prototype-methods.md b/docs/rules/prefer-prototype-methods.md index 1c95b02b4b..9b95b02bfd 100644 --- a/docs/rules/prefer-prototype-methods.md +++ b/docs/rules/prefer-prototype-methods.md @@ -1,6 +1,6 @@ # Prefer borrowing methods from the prototype instead of the instance -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-query-selector.md b/docs/rules/prefer-query-selector.md index 24c5152ab4..70f228307c 100644 --- a/docs/rules/prefer-query-selector.md +++ b/docs/rules/prefer-query-selector.md @@ -1,6 +1,6 @@ # Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-reflect-apply.md b/docs/rules/prefer-reflect-apply.md index 518f4e4a75..c6c6d233af 100644 --- a/docs/rules/prefer-reflect-apply.md +++ b/docs/rules/prefer-reflect-apply.md @@ -1,6 +1,6 @@ # Prefer `Reflect.apply()` over `Function#apply()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-regexp-test.md b/docs/rules/prefer-regexp-test.md index 9e07ece597..7a16a16def 100644 --- a/docs/rules/prefer-regexp-test.md +++ b/docs/rules/prefer-regexp-test.md @@ -1,6 +1,6 @@ # Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-set-has.md b/docs/rules/prefer-set-has.md index 3ceec458aa..f818114f45 100644 --- a/docs/rules/prefer-set-has.md +++ b/docs/rules/prefer-set-has.md @@ -1,6 +1,6 @@ # Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-set-size.md b/docs/rules/prefer-set-size.md index a94c1f2ce0..5dcf889f88 100644 --- a/docs/rules/prefer-set-size.md +++ b/docs/rules/prefer-set-size.md @@ -1,6 +1,6 @@ # Prefer using `Set#size` instead of `Array#length` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-single-call.md b/docs/rules/prefer-single-call.md index 3d55d8b5db..62dac7facb 100644 --- a/docs/rules/prefer-single-call.md +++ b/docs/rules/prefer-single-call.md @@ -1,6 +1,6 @@ # Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-spread.md b/docs/rules/prefer-spread.md index f0f2b239d7..d7ff4b9288 100644 --- a/docs/rules/prefer-spread.md +++ b/docs/rules/prefer-spread.md @@ -1,6 +1,6 @@ # Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-string-raw.md b/docs/rules/prefer-string-raw.md index 2f8b608bb1..8738267df9 100644 --- a/docs/rules/prefer-string-raw.md +++ b/docs/rules/prefer-string-raw.md @@ -1,6 +1,6 @@ # Prefer using the `String.raw` tag to avoid escaping `\` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-string-replace-all.md b/docs/rules/prefer-string-replace-all.md index 0b18951f5e..a5080dc98f 100644 --- a/docs/rules/prefer-string-replace-all.md +++ b/docs/rules/prefer-string-replace-all.md @@ -1,6 +1,6 @@ # Prefer `String#replaceAll()` over regex searches with the global flag -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-string-slice.md b/docs/rules/prefer-string-slice.md index f3bdabdafe..a13059106e 100644 --- a/docs/rules/prefer-string-slice.md +++ b/docs/rules/prefer-string-slice.md @@ -1,6 +1,6 @@ # Prefer `String#slice()` over `String#substr()` and `String#substring()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-string-starts-ends-with.md b/docs/rules/prefer-string-starts-ends-with.md index 52bb784f34..5a69ec7310 100644 --- a/docs/rules/prefer-string-starts-ends-with.md +++ b/docs/rules/prefer-string-starts-ends-with.md @@ -1,6 +1,6 @@ # Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-string-trim-start-end.md b/docs/rules/prefer-string-trim-start-end.md index 7c2c0bb6c2..182ef9f044 100644 --- a/docs/rules/prefer-string-trim-start-end.md +++ b/docs/rules/prefer-string-trim-start-end.md @@ -1,6 +1,6 @@ # Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-structured-clone.md b/docs/rules/prefer-structured-clone.md index 7f5108e0ed..0d728cdab6 100644 --- a/docs/rules/prefer-structured-clone.md +++ b/docs/rules/prefer-structured-clone.md @@ -1,6 +1,6 @@ # Prefer using `structuredClone` to create a deep clone -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-switch.md b/docs/rules/prefer-switch.md index 5df7824758..f6ed74e24a 100644 --- a/docs/rules/prefer-switch.md +++ b/docs/rules/prefer-switch.md @@ -1,6 +1,6 @@ # Prefer `switch` over multiple `else-if` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-ternary.md b/docs/rules/prefer-ternary.md index 75ea1fb832..a68047c4a1 100644 --- a/docs/rules/prefer-ternary.md +++ b/docs/rules/prefer-ternary.md @@ -1,6 +1,6 @@ # Prefer ternary expressions over simple `if-else` statements -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-top-level-await.md b/docs/rules/prefer-top-level-await.md index 0325d234b3..aee758a97d 100644 --- a/docs/rules/prefer-top-level-await.md +++ b/docs/rules/prefer-top-level-await.md @@ -1,6 +1,6 @@ # Prefer top-level await over top-level promises and async function calls -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-type-error.md b/docs/rules/prefer-type-error.md index 8059b47453..a9c63dc33e 100644 --- a/docs/rules/prefer-type-error.md +++ b/docs/rules/prefer-type-error.md @@ -1,6 +1,6 @@ # Enforce throwing `TypeError` in type checking conditions -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prevent-abbreviations.md b/docs/rules/prevent-abbreviations.md index 1f9009414c..375f045056 100644 --- a/docs/rules/prevent-abbreviations.md +++ b/docs/rules/prevent-abbreviations.md @@ -1,6 +1,6 @@ # Prevent abbreviations -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/relative-url-style.md b/docs/rules/relative-url-style.md index 439ebf4736..253106fe32 100644 --- a/docs/rules/relative-url-style.md +++ b/docs/rules/relative-url-style.md @@ -1,6 +1,6 @@ # Enforce consistent relative URL style -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/require-array-join-separator.md b/docs/rules/require-array-join-separator.md index b77c36dec3..a833aec77e 100644 --- a/docs/rules/require-array-join-separator.md +++ b/docs/rules/require-array-join-separator.md @@ -1,6 +1,6 @@ # Enforce using the separator argument with `Array#join()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/require-module-specifiers.md b/docs/rules/require-module-specifiers.md index 4fa686d4b9..e890cbd626 100644 --- a/docs/rules/require-module-specifiers.md +++ b/docs/rules/require-module-specifiers.md @@ -1,6 +1,6 @@ # Require non-empty specifier list in import and export statements -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/require-number-to-fixed-digits-argument.md b/docs/rules/require-number-to-fixed-digits-argument.md index d8632aa0e2..f5f9b13898 100644 --- a/docs/rules/require-number-to-fixed-digits-argument.md +++ b/docs/rules/require-number-to-fixed-digits-argument.md @@ -1,6 +1,6 @@ # Enforce using the digits argument with `Number#toFixed()` -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/require-post-message-target-origin.md b/docs/rules/require-post-message-target-origin.md index 0d2dd635b9..faf20f1cf9 100644 --- a/docs/rules/require-post-message-target-origin.md +++ b/docs/rules/require-post-message-target-origin.md @@ -1,6 +1,6 @@ # Enforce using the `targetOrigin` argument with `window.postMessage()` -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ’‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/string-content.md b/docs/rules/string-content.md index 1337f8eab3..4a1c5d3eae 100644 --- a/docs/rules/string-content.md +++ b/docs/rules/string-content.md @@ -1,6 +1,6 @@ # Enforce better string content -🚫 This rule is _disabled_ in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +🚫 This rule is _disabled_ in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/switch-case-braces.md b/docs/rules/switch-case-braces.md index 553fea49ce..17d7af6906 100644 --- a/docs/rules/switch-case-braces.md +++ b/docs/rules/switch-case-braces.md @@ -1,6 +1,6 @@ # Enforce consistent brace style for `case` clauses -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/template-indent.md b/docs/rules/template-indent.md index f6de832145..1ba33a3501 100644 --- a/docs/rules/template-indent.md +++ b/docs/rules/template-indent.md @@ -1,6 +1,6 @@ # Fix whitespace-insensitive template indentation -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). @@ -65,7 +65,7 @@ function foo() { } ``` -Under the hood, [strip-indent](https://npmjs.com/package/strip-indent) is used to determine how the template "should" look. Then a common indent is added to each line based on the margin of the line the template started at. This rule will *not* alter the relative whitespace between significant lines, it will only shift the content right or left so that it aligns sensibly with the surrounding code. +Under the hood, [strip-indent](https://npmjs.com/package/strip-indent) is used to determine how the template "should" look. Then a common indent is added to each line based on the margin of the line the template started at. This rule will _not_ alter the relative whitespace between significant lines, it will only shift the content right or left so that it aligns sensibly with the surrounding code. ## Options @@ -100,7 +100,7 @@ Default configuration: } ``` -You can use a selector for custom use-cases, like indenting *all* template literals, even those without template tags or function callers: +You can use a selector for custom use-cases, like indenting _all_ template literals, even those without template tags or function callers: ```js { diff --git a/docs/rules/text-encoding-identifier-case.md b/docs/rules/text-encoding-identifier-case.md index 816b8893ad..521bd5e070 100644 --- a/docs/rules/text-encoding-identifier-case.md +++ b/docs/rules/text-encoding-identifier-case.md @@ -1,6 +1,6 @@ # Enforce consistent case for text encoding identifiers -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/throw-new-error.md b/docs/rules/throw-new-error.md index 27890085fa..a2adc12c62 100644 --- a/docs/rules/throw-new-error.md +++ b/docs/rules/throw-new-error.md @@ -1,6 +1,6 @@ # Require `new` when creating an error -πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). +πŸ’Ό This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): βœ… `recommended`, β˜‘οΈ `unopinionated`. πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/eslint.config.js b/eslint.config.js index 8274290566..dbf6e46f46 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -59,6 +59,12 @@ const config = [ pattern: '.+', }, ], + 'eslint-plugin/require-meta-docs-recommended': [ + 'error', + { + allowNonBoolean: true, + }, + ], 'eslint-plugin/require-meta-docs-url': 'off', 'eslint-plugin/require-meta-has-suggestions': 'off', 'eslint-plugin/require-meta-schema': 'off', diff --git a/index.d.ts b/index.d.ts index f23258f060..c0e7a0fa62 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,6 +3,7 @@ import type {ESLint, Linter} from 'eslint'; declare const eslintPluginUnicorn: ESLint.Plugin & { configs: { recommended: Linter.FlatConfig; + unopinionated: Linter.FlatConfig; all: Linter.FlatConfig; /** @deprecated Use `all` instead. The `flat/` prefix is no longer needed. */ diff --git a/index.js b/index.js index fb612c0429..36f5e4431f 100644 --- a/index.js +++ b/index.js @@ -36,6 +36,13 @@ const recommendedRules = Object.fromEntries( ]), ); +const unopinionatedRules = Object.fromEntries( + Object.entries(rules).map(([id, rule]) => [ + `unicorn/${id}`, + rule.meta.docs.recommended === 'unopinionated' ? 'error' : 'off', + ]), +); + const allRules = Object.fromEntries( Object.keys(rules).map(id => [ `unicorn/${id}`, @@ -68,6 +75,7 @@ const unicorn = { const configs = { recommended: createConfig(recommendedRules, 'unicorn/recommended'), + unopinionated: createConfig(unopinionatedRules, 'unicorn/unopinionated'), all: createConfig(allRules, 'unicorn/all'), // TODO: Remove this at some point. Kept for now to avoid breaking users. diff --git a/readme.md b/readme.md index d1f8b686de..195e904774 100644 --- a/readme.md +++ b/readme.md @@ -51,145 +51,146 @@ export default [ πŸ’Ό [Configurations](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config) enabled in.\ βœ… Set in the `recommended` [configuration](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\ +β˜‘οΈ Set in the `unopinionated` [configuration](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\ πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\ πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). -| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | πŸ”§ | πŸ’‘ | -| :----------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :- | :- | :- | -| [better-regex](docs/rules/better-regex.md) | Improve regexes by making them shorter, consistent, and safer. | | πŸ”§ | | -| [catch-error-name](docs/rules/catch-error-name.md) | Enforce a specific parameter name in catch clauses. | βœ… | πŸ”§ | | -| [consistent-assert](docs/rules/consistent-assert.md) | Enforce consistent assertion style with `node:assert`. | βœ… | πŸ”§ | | -| [consistent-date-clone](docs/rules/consistent-date-clone.md) | Prefer passing `Date` directly to the constructor when cloning. | βœ… | πŸ”§ | | -| [consistent-destructuring](docs/rules/consistent-destructuring.md) | Use destructured variables over properties. | | | πŸ’‘ | -| [consistent-empty-array-spread](docs/rules/consistent-empty-array-spread.md) | Prefer consistent types when spreading a ternary in an array literal. | βœ… | πŸ”§ | | -| [consistent-existence-index-check](docs/rules/consistent-existence-index-check.md) | Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`. | βœ… | πŸ”§ | | -| [consistent-function-scoping](docs/rules/consistent-function-scoping.md) | Move function definitions to the highest possible scope. | βœ… | | | -| [custom-error-definition](docs/rules/custom-error-definition.md) | Enforce correct `Error` subclassing. | | πŸ”§ | | -| [empty-brace-spaces](docs/rules/empty-brace-spaces.md) | Enforce no spaces between braces. | βœ… | πŸ”§ | | -| [error-message](docs/rules/error-message.md) | Enforce passing a `message` value when creating a built-in error. | βœ… | | | -| [escape-case](docs/rules/escape-case.md) | Require escape sequences to use uppercase or lowercase values. | βœ… | πŸ”§ | | -| [expiring-todo-comments](docs/rules/expiring-todo-comments.md) | Add expiration conditions to TODO comments. | βœ… | | | -| [explicit-length-check](docs/rules/explicit-length-check.md) | Enforce explicitly comparing the `length` or `size` property of a value. | βœ… | πŸ”§ | πŸ’‘ | -| [filename-case](docs/rules/filename-case.md) | Enforce a case style for filenames. | βœ… | | | -| [import-style](docs/rules/import-style.md) | Enforce specific import styles per module. | βœ… | | | -| [new-for-builtins](docs/rules/new-for-builtins.md) | Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. | βœ… | πŸ”§ | πŸ’‘ | -| [no-abusive-eslint-disable](docs/rules/no-abusive-eslint-disable.md) | Enforce specifying rules to disable in `eslint-disable` comments. | βœ… | | | -| [no-accessor-recursion](docs/rules/no-accessor-recursion.md) | Disallow recursive access to `this` within getters and setters. | βœ… | | | -| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Disallow anonymous functions and classes as the default export. | βœ… | | πŸ’‘ | -| [no-array-callback-reference](docs/rules/no-array-callback-reference.md) | Prevent passing a function reference directly to iterator methods. | βœ… | | πŸ’‘ | -| [no-array-for-each](docs/rules/no-array-for-each.md) | Prefer `for…of` over the `forEach` method. | βœ… | πŸ”§ | πŸ’‘ | -| [no-array-method-this-argument](docs/rules/no-array-method-this-argument.md) | Disallow using the `this` argument in array methods. | βœ… | πŸ”§ | πŸ’‘ | -| [no-array-reduce](docs/rules/no-array-reduce.md) | Disallow `Array#reduce()` and `Array#reduceRight()`. | βœ… | | | -| [no-array-reverse](docs/rules/no-array-reverse.md) | Prefer `Array#toReversed()` over `Array#reverse()`. | βœ… | | πŸ’‘ | -| [no-await-expression-member](docs/rules/no-await-expression-member.md) | Disallow member access from await expression. | βœ… | πŸ”§ | | -| [no-await-in-promise-methods](docs/rules/no-await-in-promise-methods.md) | Disallow using `await` in `Promise` method parameters. | βœ… | | πŸ’‘ | -| [no-console-spaces](docs/rules/no-console-spaces.md) | Do not use leading/trailing space between `console.log` parameters. | βœ… | πŸ”§ | | -| [no-document-cookie](docs/rules/no-document-cookie.md) | Do not use `document.cookie` directly. | βœ… | | | -| [no-empty-file](docs/rules/no-empty-file.md) | Disallow empty files. | βœ… | | | -| [no-for-loop](docs/rules/no-for-loop.md) | Do not use a `for` loop that can be replaced with a `for-of` loop. | βœ… | πŸ”§ | πŸ’‘ | -| [no-hex-escape](docs/rules/no-hex-escape.md) | Enforce the use of Unicode escapes instead of hexadecimal escapes. | βœ… | πŸ”§ | | -| [no-instanceof-builtins](docs/rules/no-instanceof-builtins.md) | Disallow `instanceof` with built-in objects | βœ… | πŸ”§ | πŸ’‘ | -| [no-invalid-fetch-options](docs/rules/no-invalid-fetch-options.md) | Disallow invalid options in `fetch()` and `new Request()`. | βœ… | | | -| [no-invalid-remove-event-listener](docs/rules/no-invalid-remove-event-listener.md) | Prevent calling `EventTarget#removeEventListener()` with the result of an expression. | βœ… | | | -| [no-keyword-prefix](docs/rules/no-keyword-prefix.md) | Disallow identifiers starting with `new` or `class`. | | | | -| [no-lonely-if](docs/rules/no-lonely-if.md) | Disallow `if` statements as the only statement in `if` blocks without `else`. | βœ… | πŸ”§ | | -| [no-magic-array-flat-depth](docs/rules/no-magic-array-flat-depth.md) | Disallow a magic number as the `depth` argument in `Array#flat(…).` | βœ… | | | -| [no-named-default](docs/rules/no-named-default.md) | Disallow named usage of default import and export. | βœ… | πŸ”§ | | -| [no-negated-condition](docs/rules/no-negated-condition.md) | Disallow negated conditions. | βœ… | πŸ”§ | | -| [no-negation-in-equality-check](docs/rules/no-negation-in-equality-check.md) | Disallow negated expression in equality check. | βœ… | | πŸ’‘ | -| [no-nested-ternary](docs/rules/no-nested-ternary.md) | Disallow nested ternary expressions. | βœ… | πŸ”§ | | -| [no-new-array](docs/rules/no-new-array.md) | Disallow `new Array()`. | βœ… | πŸ”§ | πŸ’‘ | -| [no-new-buffer](docs/rules/no-new-buffer.md) | Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. | βœ… | πŸ”§ | πŸ’‘ | -| [no-null](docs/rules/no-null.md) | Disallow the use of the `null` literal. | βœ… | πŸ”§ | πŸ’‘ | -| [no-object-as-default-parameter](docs/rules/no-object-as-default-parameter.md) | Disallow the use of objects as default parameters. | βœ… | | | -| [no-process-exit](docs/rules/no-process-exit.md) | Disallow `process.exit()`. | βœ… | | | -| [no-single-promise-in-promise-methods](docs/rules/no-single-promise-in-promise-methods.md) | Disallow passing single-element arrays to `Promise` methods. | βœ… | πŸ”§ | πŸ’‘ | -| [no-static-only-class](docs/rules/no-static-only-class.md) | Disallow classes that only have static members. | βœ… | πŸ”§ | | -| [no-thenable](docs/rules/no-thenable.md) | Disallow `then` property. | βœ… | | | -| [no-this-assignment](docs/rules/no-this-assignment.md) | Disallow assigning `this` to a variable. | βœ… | | | -| [no-typeof-undefined](docs/rules/no-typeof-undefined.md) | Disallow comparing `undefined` using `typeof`. | βœ… | πŸ”§ | πŸ’‘ | -| [no-unnecessary-array-flat-depth](docs/rules/no-unnecessary-array-flat-depth.md) | Disallow using `1` as the `depth` argument of `Array#flat()`. | βœ… | πŸ”§ | | -| [no-unnecessary-array-splice-count](docs/rules/no-unnecessary-array-splice-count.md) | Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`. | βœ… | πŸ”§ | | -| [no-unnecessary-await](docs/rules/no-unnecessary-await.md) | Disallow awaiting non-promise values. | βœ… | πŸ”§ | | -| [no-unnecessary-polyfills](docs/rules/no-unnecessary-polyfills.md) | Enforce the use of built-in methods instead of unnecessary polyfills. | βœ… | | | -| [no-unnecessary-slice-end](docs/rules/no-unnecessary-slice-end.md) | Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`. | βœ… | πŸ”§ | | -| [no-unreadable-array-destructuring](docs/rules/no-unreadable-array-destructuring.md) | Disallow unreadable array destructuring. | βœ… | πŸ”§ | | -| [no-unreadable-iife](docs/rules/no-unreadable-iife.md) | Disallow unreadable IIFEs. | βœ… | | | -| [no-unused-properties](docs/rules/no-unused-properties.md) | Disallow unused object properties. | | | | -| [no-useless-error-capture-stack-trace](docs/rules/no-useless-error-capture-stack-trace.md) | Disallow unnecessary `Error.captureStackTrace(…)`. | βœ… | πŸ”§ | | -| [no-useless-fallback-in-spread](docs/rules/no-useless-fallback-in-spread.md) | Disallow useless fallback when spreading in object literals. | βœ… | πŸ”§ | | -| [no-useless-length-check](docs/rules/no-useless-length-check.md) | Disallow useless array length check. | βœ… | πŸ”§ | | -| [no-useless-promise-resolve-reject](docs/rules/no-useless-promise-resolve-reject.md) | Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks | βœ… | πŸ”§ | | -| [no-useless-spread](docs/rules/no-useless-spread.md) | Disallow unnecessary spread. | βœ… | πŸ”§ | | -| [no-useless-switch-case](docs/rules/no-useless-switch-case.md) | Disallow useless case in switch statements. | βœ… | | πŸ’‘ | -| [no-useless-undefined](docs/rules/no-useless-undefined.md) | Disallow useless `undefined`. | βœ… | πŸ”§ | | -| [no-zero-fractions](docs/rules/no-zero-fractions.md) | Disallow number literals with zero fractions or dangling dots. | βœ… | πŸ”§ | | -| [number-literal-case](docs/rules/number-literal-case.md) | Enforce proper case for numeric literals. | βœ… | πŸ”§ | | -| [numeric-separators-style](docs/rules/numeric-separators-style.md) | Enforce the style of numeric separators by correctly grouping digits. | βœ… | πŸ”§ | | -| [prefer-add-event-listener](docs/rules/prefer-add-event-listener.md) | Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. | βœ… | πŸ”§ | | -| [prefer-array-find](docs/rules/prefer-array-find.md) | Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-array-flat](docs/rules/prefer-array-flat.md) | Prefer `Array#flat()` over legacy techniques to flatten arrays. | βœ… | πŸ”§ | | -| [prefer-array-flat-map](docs/rules/prefer-array-flat-map.md) | Prefer `.flatMap(…)` over `.map(…).flat()`. | βœ… | πŸ”§ | | -| [prefer-array-index-of](docs/rules/prefer-array-index-of.md) | Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-array-some](docs/rules/prefer-array-some.md) | Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-at](docs/rules/prefer-at.md) | Prefer `.at()` method for index access and `String#charAt()`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-blob-reading-methods](docs/rules/prefer-blob-reading-methods.md) | Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. | βœ… | | | -| [prefer-class-fields](docs/rules/prefer-class-fields.md) | Prefer class field declarations over `this` assignments in constructors. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-code-point](docs/rules/prefer-code-point.md) | Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. | βœ… | | πŸ’‘ | -| [prefer-date-now](docs/rules/prefer-date-now.md) | Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. | βœ… | πŸ”§ | | -| [prefer-default-parameters](docs/rules/prefer-default-parameters.md) | Prefer default parameters over reassignment. | βœ… | | πŸ’‘ | -| [prefer-dom-node-append](docs/rules/prefer-dom-node-append.md) | Prefer `Node#append()` over `Node#appendChild()`. | βœ… | πŸ”§ | | -| [prefer-dom-node-dataset](docs/rules/prefer-dom-node-dataset.md) | Prefer using `.dataset` on DOM elements over calling attribute methods. | βœ… | πŸ”§ | | -| [prefer-dom-node-remove](docs/rules/prefer-dom-node-remove.md) | Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-dom-node-text-content](docs/rules/prefer-dom-node-text-content.md) | Prefer `.textContent` over `.innerText`. | βœ… | | πŸ’‘ | -| [prefer-event-target](docs/rules/prefer-event-target.md) | Prefer `EventTarget` over `EventEmitter`. | βœ… | | | -| [prefer-export-from](docs/rules/prefer-export-from.md) | Prefer `export…from` when re-exporting. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-global-this](docs/rules/prefer-global-this.md) | Prefer `globalThis` over `window`, `self`, and `global`. | βœ… | πŸ”§ | | -| [prefer-import-meta-properties](docs/rules/prefer-import-meta-properties.md) | Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths. | | πŸ”§ | | -| [prefer-includes](docs/rules/prefer-includes.md) | Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-json-parse-buffer](docs/rules/prefer-json-parse-buffer.md) | Prefer reading a JSON file as a buffer. | | πŸ”§ | | -| [prefer-keyboard-event-key](docs/rules/prefer-keyboard-event-key.md) | Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. | βœ… | πŸ”§ | | -| [prefer-logical-operator-over-ternary](docs/rules/prefer-logical-operator-over-ternary.md) | Prefer using a logical operator over a ternary. | βœ… | | πŸ’‘ | -| [prefer-math-min-max](docs/rules/prefer-math-min-max.md) | Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons. | βœ… | πŸ”§ | | -| [prefer-math-trunc](docs/rules/prefer-math-trunc.md) | Enforce the use of `Math.trunc` instead of bitwise operators. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-modern-dom-apis](docs/rules/prefer-modern-dom-apis.md) | Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. | βœ… | πŸ”§ | | -| [prefer-modern-math-apis](docs/rules/prefer-modern-math-apis.md) | Prefer modern `Math` APIs over legacy patterns. | βœ… | πŸ”§ | | -| [prefer-module](docs/rules/prefer-module.md) | Prefer JavaScript modules (ESM) over CommonJS. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-native-coercion-functions](docs/rules/prefer-native-coercion-functions.md) | Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. | βœ… | πŸ”§ | | -| [prefer-negative-index](docs/rules/prefer-negative-index.md) | Prefer negative index over `.length - index` when possible. | βœ… | πŸ”§ | | -| [prefer-node-protocol](docs/rules/prefer-node-protocol.md) | Prefer using the `node:` protocol when importing Node.js builtin modules. | βœ… | πŸ”§ | | -| [prefer-number-properties](docs/rules/prefer-number-properties.md) | Prefer `Number` static properties over global ones. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-object-from-entries](docs/rules/prefer-object-from-entries.md) | Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. | βœ… | πŸ”§ | | -| [prefer-optional-catch-binding](docs/rules/prefer-optional-catch-binding.md) | Prefer omitting the `catch` binding parameter. | βœ… | πŸ”§ | | -| [prefer-prototype-methods](docs/rules/prefer-prototype-methods.md) | Prefer borrowing methods from the prototype instead of the instance. | βœ… | πŸ”§ | | -| [prefer-query-selector](docs/rules/prefer-query-selector.md) | Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`. | βœ… | πŸ”§ | | -| [prefer-reflect-apply](docs/rules/prefer-reflect-apply.md) | Prefer `Reflect.apply()` over `Function#apply()`. | βœ… | πŸ”§ | | -| [prefer-regexp-test](docs/rules/prefer-regexp-test.md) | Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-set-has](docs/rules/prefer-set-has.md) | Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-set-size](docs/rules/prefer-set-size.md) | Prefer using `Set#size` instead of `Array#length`. | βœ… | πŸ”§ | | -| [prefer-single-call](docs/rules/prefer-single-call.md) | Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-spread](docs/rules/prefer-spread.md) | Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-string-raw](docs/rules/prefer-string-raw.md) | Prefer using the `String.raw` tag to avoid escaping `\`. | βœ… | πŸ”§ | | -| [prefer-string-replace-all](docs/rules/prefer-string-replace-all.md) | Prefer `String#replaceAll()` over regex searches with the global flag. | βœ… | πŸ”§ | | -| [prefer-string-slice](docs/rules/prefer-string-slice.md) | Prefer `String#slice()` over `String#substr()` and `String#substring()`. | βœ… | πŸ”§ | | -| [prefer-string-starts-ends-with](docs/rules/prefer-string-starts-ends-with.md) | Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. | βœ… | πŸ”§ | πŸ’‘ | -| [prefer-string-trim-start-end](docs/rules/prefer-string-trim-start-end.md) | Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. | βœ… | πŸ”§ | | -| [prefer-structured-clone](docs/rules/prefer-structured-clone.md) | Prefer using `structuredClone` to create a deep clone. | βœ… | | πŸ’‘ | -| [prefer-switch](docs/rules/prefer-switch.md) | Prefer `switch` over multiple `else-if`. | βœ… | πŸ”§ | | -| [prefer-ternary](docs/rules/prefer-ternary.md) | Prefer ternary expressions over simple `if-else` statements. | βœ… | πŸ”§ | | -| [prefer-top-level-await](docs/rules/prefer-top-level-await.md) | Prefer top-level await over top-level promises and async function calls. | βœ… | | πŸ’‘ | -| [prefer-type-error](docs/rules/prefer-type-error.md) | Enforce throwing `TypeError` in type checking conditions. | βœ… | πŸ”§ | | -| [prevent-abbreviations](docs/rules/prevent-abbreviations.md) | Prevent abbreviations. | βœ… | πŸ”§ | | -| [relative-url-style](docs/rules/relative-url-style.md) | Enforce consistent relative URL style. | βœ… | πŸ”§ | πŸ’‘ | -| [require-array-join-separator](docs/rules/require-array-join-separator.md) | Enforce using the separator argument with `Array#join()`. | βœ… | πŸ”§ | | -| [require-module-specifiers](docs/rules/require-module-specifiers.md) | Require non-empty specifier list in import and export statements. | βœ… | πŸ”§ | πŸ’‘ | -| [require-number-to-fixed-digits-argument](docs/rules/require-number-to-fixed-digits-argument.md) | Enforce using the digits argument with `Number#toFixed()`. | βœ… | πŸ”§ | | -| [require-post-message-target-origin](docs/rules/require-post-message-target-origin.md) | Enforce using the `targetOrigin` argument with `window.postMessage()`. | | | πŸ’‘ | -| [string-content](docs/rules/string-content.md) | Enforce better string content. | | πŸ”§ | πŸ’‘ | -| [switch-case-braces](docs/rules/switch-case-braces.md) | Enforce consistent brace style for `case` clauses. | βœ… | πŸ”§ | | -| [template-indent](docs/rules/template-indent.md) | Fix whitespace-insensitive template indentation. | βœ… | πŸ”§ | | -| [text-encoding-identifier-case](docs/rules/text-encoding-identifier-case.md) | Enforce consistent case for text encoding identifiers. | βœ… | πŸ”§ | πŸ’‘ | -| [throw-new-error](docs/rules/throw-new-error.md) | Require `new` when creating an error. | βœ… | πŸ”§ | | +| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | πŸ”§ | πŸ’‘ | +| :----------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--- | :- | :- | +| [better-regex](docs/rules/better-regex.md) | Improve regexes by making them shorter, consistent, and safer. | | πŸ”§ | | +| [catch-error-name](docs/rules/catch-error-name.md) | Enforce a specific parameter name in catch clauses. | βœ… | πŸ”§ | | +| [consistent-assert](docs/rules/consistent-assert.md) | Enforce consistent assertion style with `node:assert`. | βœ… | πŸ”§ | | +| [consistent-date-clone](docs/rules/consistent-date-clone.md) | Prefer passing `Date` directly to the constructor when cloning. | βœ… β˜‘οΈ | πŸ”§ | | +| [consistent-destructuring](docs/rules/consistent-destructuring.md) | Use destructured variables over properties. | | | πŸ’‘ | +| [consistent-empty-array-spread](docs/rules/consistent-empty-array-spread.md) | Prefer consistent types when spreading a ternary in an array literal. | βœ… | πŸ”§ | | +| [consistent-existence-index-check](docs/rules/consistent-existence-index-check.md) | Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [consistent-function-scoping](docs/rules/consistent-function-scoping.md) | Move function definitions to the highest possible scope. | βœ… | | | +| [custom-error-definition](docs/rules/custom-error-definition.md) | Enforce correct `Error` subclassing. | | πŸ”§ | | +| [empty-brace-spaces](docs/rules/empty-brace-spaces.md) | Enforce no spaces between braces. | βœ… | πŸ”§ | | +| [error-message](docs/rules/error-message.md) | Enforce passing a `message` value when creating a built-in error. | βœ… β˜‘οΈ | | | +| [escape-case](docs/rules/escape-case.md) | Require escape sequences to use uppercase or lowercase values. | βœ… β˜‘οΈ | πŸ”§ | | +| [expiring-todo-comments](docs/rules/expiring-todo-comments.md) | Add expiration conditions to TODO comments. | βœ… β˜‘οΈ | | | +| [explicit-length-check](docs/rules/explicit-length-check.md) | Enforce explicitly comparing the `length` or `size` property of a value. | βœ… | πŸ”§ | πŸ’‘ | +| [filename-case](docs/rules/filename-case.md) | Enforce a case style for filenames. | βœ… | | | +| [import-style](docs/rules/import-style.md) | Enforce specific import styles per module. | βœ… β˜‘οΈ | | | +| [new-for-builtins](docs/rules/new-for-builtins.md) | Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-abusive-eslint-disable](docs/rules/no-abusive-eslint-disable.md) | Enforce specifying rules to disable in `eslint-disable` comments. | βœ… β˜‘οΈ | | | +| [no-accessor-recursion](docs/rules/no-accessor-recursion.md) | Disallow recursive access to `this` within getters and setters. | βœ… β˜‘οΈ | | | +| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Disallow anonymous functions and classes as the default export. | βœ… β˜‘οΈ | | πŸ’‘ | +| [no-array-callback-reference](docs/rules/no-array-callback-reference.md) | Prevent passing a function reference directly to iterator methods. | βœ… | | πŸ’‘ | +| [no-array-for-each](docs/rules/no-array-for-each.md) | Prefer `for…of` over the `forEach` method. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-array-method-this-argument](docs/rules/no-array-method-this-argument.md) | Disallow using the `this` argument in array methods. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-array-reduce](docs/rules/no-array-reduce.md) | Disallow `Array#reduce()` and `Array#reduceRight()`. | βœ… | | | +| [no-array-reverse](docs/rules/no-array-reverse.md) | Prefer `Array#toReversed()` over `Array#reverse()`. | βœ… β˜‘οΈ | | πŸ’‘ | +| [no-await-expression-member](docs/rules/no-await-expression-member.md) | Disallow member access from await expression. | βœ… | πŸ”§ | | +| [no-await-in-promise-methods](docs/rules/no-await-in-promise-methods.md) | Disallow using `await` in `Promise` method parameters. | βœ… β˜‘οΈ | | πŸ’‘ | +| [no-console-spaces](docs/rules/no-console-spaces.md) | Do not use leading/trailing space between `console.log` parameters. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-document-cookie](docs/rules/no-document-cookie.md) | Do not use `document.cookie` directly. | βœ… β˜‘οΈ | | | +| [no-empty-file](docs/rules/no-empty-file.md) | Disallow empty files. | βœ… β˜‘οΈ | | | +| [no-for-loop](docs/rules/no-for-loop.md) | Do not use a `for` loop that can be replaced with a `for-of` loop. | βœ… | πŸ”§ | πŸ’‘ | +| [no-hex-escape](docs/rules/no-hex-escape.md) | Enforce the use of Unicode escapes instead of hexadecimal escapes. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-instanceof-builtins](docs/rules/no-instanceof-builtins.md) | Disallow `instanceof` with built-in objects | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-invalid-fetch-options](docs/rules/no-invalid-fetch-options.md) | Disallow invalid options in `fetch()` and `new Request()`. | βœ… β˜‘οΈ | | | +| [no-invalid-remove-event-listener](docs/rules/no-invalid-remove-event-listener.md) | Prevent calling `EventTarget#removeEventListener()` with the result of an expression. | βœ… β˜‘οΈ | | | +| [no-keyword-prefix](docs/rules/no-keyword-prefix.md) | Disallow identifiers starting with `new` or `class`. | | | | +| [no-lonely-if](docs/rules/no-lonely-if.md) | Disallow `if` statements as the only statement in `if` blocks without `else`. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-magic-array-flat-depth](docs/rules/no-magic-array-flat-depth.md) | Disallow a magic number as the `depth` argument in `Array#flat(…).` | βœ… β˜‘οΈ | | | +| [no-named-default](docs/rules/no-named-default.md) | Disallow named usage of default import and export. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-negated-condition](docs/rules/no-negated-condition.md) | Disallow negated conditions. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-negation-in-equality-check](docs/rules/no-negation-in-equality-check.md) | Disallow negated expression in equality check. | βœ… β˜‘οΈ | | πŸ’‘ | +| [no-nested-ternary](docs/rules/no-nested-ternary.md) | Disallow nested ternary expressions. | βœ… | πŸ”§ | | +| [no-new-array](docs/rules/no-new-array.md) | Disallow `new Array()`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-new-buffer](docs/rules/no-new-buffer.md) | Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-null](docs/rules/no-null.md) | Disallow the use of the `null` literal. | βœ… | πŸ”§ | πŸ’‘ | +| [no-object-as-default-parameter](docs/rules/no-object-as-default-parameter.md) | Disallow the use of objects as default parameters. | βœ… β˜‘οΈ | | | +| [no-process-exit](docs/rules/no-process-exit.md) | Disallow `process.exit()`. | βœ… β˜‘οΈ | | | +| [no-single-promise-in-promise-methods](docs/rules/no-single-promise-in-promise-methods.md) | Disallow passing single-element arrays to `Promise` methods. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-static-only-class](docs/rules/no-static-only-class.md) | Disallow classes that only have static members. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-thenable](docs/rules/no-thenable.md) | Disallow `then` property. | βœ… β˜‘οΈ | | | +| [no-this-assignment](docs/rules/no-this-assignment.md) | Disallow assigning `this` to a variable. | βœ… β˜‘οΈ | | | +| [no-typeof-undefined](docs/rules/no-typeof-undefined.md) | Disallow comparing `undefined` using `typeof`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [no-unnecessary-array-flat-depth](docs/rules/no-unnecessary-array-flat-depth.md) | Disallow using `1` as the `depth` argument of `Array#flat()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-unnecessary-array-splice-count](docs/rules/no-unnecessary-array-splice-count.md) | Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-unnecessary-await](docs/rules/no-unnecessary-await.md) | Disallow awaiting non-promise values. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-unnecessary-polyfills](docs/rules/no-unnecessary-polyfills.md) | Enforce the use of built-in methods instead of unnecessary polyfills. | βœ… β˜‘οΈ | | | +| [no-unnecessary-slice-end](docs/rules/no-unnecessary-slice-end.md) | Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-unreadable-array-destructuring](docs/rules/no-unreadable-array-destructuring.md) | Disallow unreadable array destructuring. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-unreadable-iife](docs/rules/no-unreadable-iife.md) | Disallow unreadable IIFEs. | βœ… β˜‘οΈ | | | +| [no-unused-properties](docs/rules/no-unused-properties.md) | Disallow unused object properties. | | | | +| [no-useless-error-capture-stack-trace](docs/rules/no-useless-error-capture-stack-trace.md) | Disallow unnecessary `Error.captureStackTrace(…)`. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-useless-fallback-in-spread](docs/rules/no-useless-fallback-in-spread.md) | Disallow useless fallback when spreading in object literals. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-useless-length-check](docs/rules/no-useless-length-check.md) | Disallow useless array length check. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-useless-promise-resolve-reject](docs/rules/no-useless-promise-resolve-reject.md) | Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks | βœ… β˜‘οΈ | πŸ”§ | | +| [no-useless-spread](docs/rules/no-useless-spread.md) | Disallow unnecessary spread. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-useless-switch-case](docs/rules/no-useless-switch-case.md) | Disallow useless case in switch statements. | βœ… β˜‘οΈ | | πŸ’‘ | +| [no-useless-undefined](docs/rules/no-useless-undefined.md) | Disallow useless `undefined`. | βœ… β˜‘οΈ | πŸ”§ | | +| [no-zero-fractions](docs/rules/no-zero-fractions.md) | Disallow number literals with zero fractions or dangling dots. | βœ… β˜‘οΈ | πŸ”§ | | +| [number-literal-case](docs/rules/number-literal-case.md) | Enforce proper case for numeric literals. | βœ… β˜‘οΈ | πŸ”§ | | +| [numeric-separators-style](docs/rules/numeric-separators-style.md) | Enforce the style of numeric separators by correctly grouping digits. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-add-event-listener](docs/rules/prefer-add-event-listener.md) | Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-array-find](docs/rules/prefer-array-find.md) | Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-array-flat](docs/rules/prefer-array-flat.md) | Prefer `Array#flat()` over legacy techniques to flatten arrays. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-array-flat-map](docs/rules/prefer-array-flat-map.md) | Prefer `.flatMap(…)` over `.map(…).flat()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-array-index-of](docs/rules/prefer-array-index-of.md) | Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-array-some](docs/rules/prefer-array-some.md) | Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-at](docs/rules/prefer-at.md) | Prefer `.at()` method for index access and `String#charAt()`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-blob-reading-methods](docs/rules/prefer-blob-reading-methods.md) | Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. | βœ… β˜‘οΈ | | | +| [prefer-class-fields](docs/rules/prefer-class-fields.md) | Prefer class field declarations over `this` assignments in constructors. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-code-point](docs/rules/prefer-code-point.md) | Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. | βœ… β˜‘οΈ | | πŸ’‘ | +| [prefer-date-now](docs/rules/prefer-date-now.md) | Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-default-parameters](docs/rules/prefer-default-parameters.md) | Prefer default parameters over reassignment. | βœ… β˜‘οΈ | | πŸ’‘ | +| [prefer-dom-node-append](docs/rules/prefer-dom-node-append.md) | Prefer `Node#append()` over `Node#appendChild()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-dom-node-dataset](docs/rules/prefer-dom-node-dataset.md) | Prefer using `.dataset` on DOM elements over calling attribute methods. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-dom-node-remove](docs/rules/prefer-dom-node-remove.md) | Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-dom-node-text-content](docs/rules/prefer-dom-node-text-content.md) | Prefer `.textContent` over `.innerText`. | βœ… β˜‘οΈ | | πŸ’‘ | +| [prefer-event-target](docs/rules/prefer-event-target.md) | Prefer `EventTarget` over `EventEmitter`. | βœ… β˜‘οΈ | | | +| [prefer-export-from](docs/rules/prefer-export-from.md) | Prefer `export…from` when re-exporting. | βœ… | πŸ”§ | πŸ’‘ | +| [prefer-global-this](docs/rules/prefer-global-this.md) | Prefer `globalThis` over `window`, `self`, and `global`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-import-meta-properties](docs/rules/prefer-import-meta-properties.md) | Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths. | | πŸ”§ | | +| [prefer-includes](docs/rules/prefer-includes.md) | Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-json-parse-buffer](docs/rules/prefer-json-parse-buffer.md) | Prefer reading a JSON file as a buffer. | | πŸ”§ | | +| [prefer-keyboard-event-key](docs/rules/prefer-keyboard-event-key.md) | Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-logical-operator-over-ternary](docs/rules/prefer-logical-operator-over-ternary.md) | Prefer using a logical operator over a ternary. | βœ… β˜‘οΈ | | πŸ’‘ | +| [prefer-math-min-max](docs/rules/prefer-math-min-max.md) | Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-math-trunc](docs/rules/prefer-math-trunc.md) | Enforce the use of `Math.trunc` instead of bitwise operators. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-modern-dom-apis](docs/rules/prefer-modern-dom-apis.md) | Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-modern-math-apis](docs/rules/prefer-modern-math-apis.md) | Prefer modern `Math` APIs over legacy patterns. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-module](docs/rules/prefer-module.md) | Prefer JavaScript modules (ESM) over CommonJS. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-native-coercion-functions](docs/rules/prefer-native-coercion-functions.md) | Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-negative-index](docs/rules/prefer-negative-index.md) | Prefer negative index over `.length - index` when possible. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-node-protocol](docs/rules/prefer-node-protocol.md) | Prefer using the `node:` protocol when importing Node.js builtin modules. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-number-properties](docs/rules/prefer-number-properties.md) | Prefer `Number` static properties over global ones. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-object-from-entries](docs/rules/prefer-object-from-entries.md) | Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-optional-catch-binding](docs/rules/prefer-optional-catch-binding.md) | Prefer omitting the `catch` binding parameter. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-prototype-methods](docs/rules/prefer-prototype-methods.md) | Prefer borrowing methods from the prototype instead of the instance. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-query-selector](docs/rules/prefer-query-selector.md) | Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`. | βœ… | πŸ”§ | | +| [prefer-reflect-apply](docs/rules/prefer-reflect-apply.md) | Prefer `Reflect.apply()` over `Function#apply()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-regexp-test](docs/rules/prefer-regexp-test.md) | Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-set-has](docs/rules/prefer-set-has.md) | Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-set-size](docs/rules/prefer-set-size.md) | Prefer using `Set#size` instead of `Array#length`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-single-call](docs/rules/prefer-single-call.md) | Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-spread](docs/rules/prefer-spread.md) | Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. | βœ… | πŸ”§ | πŸ’‘ | +| [prefer-string-raw](docs/rules/prefer-string-raw.md) | Prefer using the `String.raw` tag to avoid escaping `\`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-string-replace-all](docs/rules/prefer-string-replace-all.md) | Prefer `String#replaceAll()` over regex searches with the global flag. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-string-slice](docs/rules/prefer-string-slice.md) | Prefer `String#slice()` over `String#substr()` and `String#substring()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-string-starts-ends-with](docs/rules/prefer-string-starts-ends-with.md) | Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [prefer-string-trim-start-end](docs/rules/prefer-string-trim-start-end.md) | Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-structured-clone](docs/rules/prefer-structured-clone.md) | Prefer using `structuredClone` to create a deep clone. | βœ… β˜‘οΈ | | πŸ’‘ | +| [prefer-switch](docs/rules/prefer-switch.md) | Prefer `switch` over multiple `else-if`. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-ternary](docs/rules/prefer-ternary.md) | Prefer ternary expressions over simple `if-else` statements. | βœ… β˜‘οΈ | πŸ”§ | | +| [prefer-top-level-await](docs/rules/prefer-top-level-await.md) | Prefer top-level await over top-level promises and async function calls. | βœ… β˜‘οΈ | | πŸ’‘ | +| [prefer-type-error](docs/rules/prefer-type-error.md) | Enforce throwing `TypeError` in type checking conditions. | βœ… β˜‘οΈ | πŸ”§ | | +| [prevent-abbreviations](docs/rules/prevent-abbreviations.md) | Prevent abbreviations. | βœ… | πŸ”§ | | +| [relative-url-style](docs/rules/relative-url-style.md) | Enforce consistent relative URL style. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [require-array-join-separator](docs/rules/require-array-join-separator.md) | Enforce using the separator argument with `Array#join()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [require-module-specifiers](docs/rules/require-module-specifiers.md) | Require non-empty specifier list in import and export statements. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [require-number-to-fixed-digits-argument](docs/rules/require-number-to-fixed-digits-argument.md) | Enforce using the digits argument with `Number#toFixed()`. | βœ… β˜‘οΈ | πŸ”§ | | +| [require-post-message-target-origin](docs/rules/require-post-message-target-origin.md) | Enforce using the `targetOrigin` argument with `window.postMessage()`. | | | πŸ’‘ | +| [string-content](docs/rules/string-content.md) | Enforce better string content. | | πŸ”§ | πŸ’‘ | +| [switch-case-braces](docs/rules/switch-case-braces.md) | Enforce consistent brace style for `case` clauses. | βœ… | πŸ”§ | | +| [template-indent](docs/rules/template-indent.md) | Fix whitespace-insensitive template indentation. | βœ… | πŸ”§ | | +| [text-encoding-identifier-case](docs/rules/text-encoding-identifier-case.md) | Enforce consistent case for text encoding identifiers. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | +| [throw-new-error](docs/rules/throw-new-error.md) | Require `new` when creating an error. | βœ… β˜‘οΈ | πŸ”§ | | @@ -221,6 +222,20 @@ export default [ ]; ``` +### Unopinionated config + +This plugin also exports a `unopinionated` config removes rules from `recommended` which enforce subjective opinions. + +```js +import eslintPluginUnicorn from 'eslint-plugin-unicorn'; + +export default [ + // … + eslintPluginUnicorn.configs.unopinionated, + // … +]; +``` + ### All config This plugin exports an `all` that makes use of all rules (except for deprecated ones). diff --git a/rules/consistent-date-clone.js b/rules/consistent-date-clone.js index bf0e1e8118..78e32b32d8 100644 --- a/rules/consistent-date-clone.js +++ b/rules/consistent-date-clone.js @@ -44,7 +44,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer passing `Date` directly to the constructor when cloning.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/consistent-existence-index-check.js b/rules/consistent-existence-index-check.js index 56bacfdac2..ff8b4c1c17 100644 --- a/rules/consistent-existence-index-check.js +++ b/rules/consistent-existence-index-check.js @@ -127,7 +127,7 @@ const config = { docs: { description: 'Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/error-message.js b/rules/error-message.js index dadbdb8f96..b51de36ab5 100644 --- a/rules/error-message.js +++ b/rules/error-message.js @@ -89,7 +89,7 @@ const config = { type: 'problem', docs: { description: 'Enforce passing a `message` value when creating a built-in error.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/escape-case.js b/rules/escape-case.js index 90c1a5e120..135289f2e5 100644 --- a/rules/escape-case.js +++ b/rules/escape-case.js @@ -74,7 +74,7 @@ const config = { type: 'suggestion', docs: { description: 'Require escape sequences to use uppercase or lowercase values.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/expiring-todo-comments.js b/rules/expiring-todo-comments.js index 11de1c6a2e..da4f3d4725 100644 --- a/rules/expiring-todo-comments.js +++ b/rules/expiring-todo-comments.js @@ -573,7 +573,7 @@ const config = { type: 'suggestion', docs: { description: 'Add expiration conditions to TODO comments.', - recommended: true, + recommended: 'unopinionated', }, schema, defaultOptions: [{...DEFAULT_OPTIONS}], diff --git a/rules/import-style.js b/rules/import-style.js index 934a085e4b..27a877258c 100644 --- a/rules/import-style.js +++ b/rules/import-style.js @@ -365,7 +365,7 @@ const config = { type: 'problem', docs: { description: 'Enforce specific import styles per module.', - recommended: true, + recommended: 'unopinionated', }, schema, defaultOptions: [{}], diff --git a/rules/new-for-builtins.js b/rules/new-for-builtins.js index c4d3e6dda9..cf0d35c6e5 100644 --- a/rules/new-for-builtins.js +++ b/rules/new-for-builtins.js @@ -110,7 +110,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-abusive-eslint-disable.js b/rules/no-abusive-eslint-disable.js index e3dca07d06..1ad22d2052 100644 --- a/rules/no-abusive-eslint-disable.js +++ b/rules/no-abusive-eslint-disable.js @@ -54,7 +54,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce specifying rules to disable in `eslint-disable` comments.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-accessor-recursion.js b/rules/no-accessor-recursion.js index 215f12ea40..85c984ceb2 100644 --- a/rules/no-accessor-recursion.js +++ b/rules/no-accessor-recursion.js @@ -150,7 +150,7 @@ const config = { type: 'problem', docs: { description: 'Disallow recursive access to `this` within getters and setters.', - recommended: true, + recommended: 'unopinionated', }, defaultOptions: [], messages, diff --git a/rules/no-anonymous-default-export.js b/rules/no-anonymous-default-export.js index 6386bb2c7a..b5237546b3 100644 --- a/rules/no-anonymous-default-export.js +++ b/rules/no-anonymous-default-export.js @@ -199,7 +199,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow anonymous functions and classes as the default export.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages, diff --git a/rules/no-array-for-each.js b/rules/no-array-for-each.js index a376e50b1a..8192efb5fc 100644 --- a/rules/no-array-for-each.js +++ b/rules/no-array-for-each.js @@ -483,7 +483,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `for…of` over the `forEach` method.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-array-method-this-argument.js b/rules/no-array-method-this-argument.js index a26aeacdb0..f58f2f914f 100644 --- a/rules/no-array-method-this-argument.js +++ b/rules/no-array-method-this-argument.js @@ -215,7 +215,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow using the `this` argument in array methods.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-array-reverse.js b/rules/no-array-reverse.js index 5321c6b665..814acbe119 100644 --- a/rules/no-array-reverse.js +++ b/rules/no-array-reverse.js @@ -97,7 +97,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Array#toReversed()` over `Array#reverse()`.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, schema, diff --git a/rules/no-await-in-promise-methods.js b/rules/no-await-in-promise-methods.js index 54ab245392..5149857fb0 100644 --- a/rules/no-await-in-promise-methods.js +++ b/rules/no-await-in-promise-methods.js @@ -60,7 +60,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow using `await` in `Promise` method parameters.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages, diff --git a/rules/no-console-spaces.js b/rules/no-console-spaces.js index 044ee62433..f64659edad 100644 --- a/rules/no-console-spaces.js +++ b/rules/no-console-spaces.js @@ -79,7 +79,7 @@ const config = { type: 'suggestion', docs: { description: 'Do not use leading/trailing space between `console.log` parameters.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-document-cookie.js b/rules/no-document-cookie.js index 34c20412c2..78a25c023c 100644 --- a/rules/no-document-cookie.js +++ b/rules/no-document-cookie.js @@ -18,7 +18,7 @@ const config = { type: 'problem', docs: { description: 'Do not use `document.cookie` directly.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-empty-file.js b/rules/no-empty-file.js index 3ae89162ff..5e61026456 100644 --- a/rules/no-empty-file.js +++ b/rules/no-empty-file.js @@ -49,7 +49,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow empty files.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-hex-escape.js b/rules/no-hex-escape.js index 7058b7b75a..565942fa7d 100644 --- a/rules/no-hex-escape.js +++ b/rules/no-hex-escape.js @@ -44,7 +44,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce the use of Unicode escapes instead of hexadecimal escapes.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-instanceof-builtins.js b/rules/no-instanceof-builtins.js index 5e915aef3b..fbfc9c0306 100644 --- a/rules/no-instanceof-builtins.js +++ b/rules/no-instanceof-builtins.js @@ -207,7 +207,7 @@ const config = { type: 'problem', docs: { description: 'Disallow `instanceof` with built-in objects', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/no-invalid-fetch-options.js b/rules/no-invalid-fetch-options.js index 377d82c220..127bcf09dd 100644 --- a/rules/no-invalid-fetch-options.js +++ b/rules/no-invalid-fetch-options.js @@ -103,7 +103,7 @@ const config = { type: 'problem', docs: { description: 'Disallow invalid options in `fetch()` and `new Request()`.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-invalid-remove-event-listener.js b/rules/no-invalid-remove-event-listener.js index f342c9a7b3..47fba2bbe3 100644 --- a/rules/no-invalid-remove-event-listener.js +++ b/rules/no-invalid-remove-event-listener.js @@ -53,7 +53,7 @@ const config = { type: 'problem', docs: { description: 'Prevent calling `EventTarget#removeEventListener()` with the result of an expression.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-lonely-if.js b/rules/no-lonely-if.js index 87a2cce7c0..a5b11d9b7d 100644 --- a/rules/no-lonely-if.js +++ b/rules/no-lonely-if.js @@ -143,7 +143,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow `if` statements as the only statement in `if` blocks without `else`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-magic-array-flat-depth.js b/rules/no-magic-array-flat-depth.js index e0e27e3d77..9b166457a4 100644 --- a/rules/no-magic-array-flat-depth.js +++ b/rules/no-magic-array-flat-depth.js @@ -46,7 +46,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow a magic number as the `depth` argument in `Array#flat(…).`', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-named-default.js b/rules/no-named-default.js index 3bb533a8a9..3dc93e0578 100644 --- a/rules/no-named-default.js +++ b/rules/no-named-default.js @@ -90,7 +90,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow named usage of default import and export.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-negated-condition.js b/rules/no-negated-condition.js index ff2fd79ab1..b23717e94c 100644 --- a/rules/no-negated-condition.js +++ b/rules/no-negated-condition.js @@ -133,7 +133,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow negated conditions.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-negation-in-equality-check.js b/rules/no-negation-in-equality-check.js index fcbd78ec5a..cafce2e8dc 100644 --- a/rules/no-negation-in-equality-check.js +++ b/rules/no-negation-in-equality-check.js @@ -88,7 +88,7 @@ const config = { type: 'problem', docs: { description: 'Disallow negated expression in equality check.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, diff --git a/rules/no-new-array.js b/rules/no-new-array.js index 1a1c911c67..53397aedd1 100644 --- a/rules/no-new-array.js +++ b/rules/no-new-array.js @@ -95,7 +95,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow `new Array()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-new-buffer.js b/rules/no-new-buffer.js index e30ceecb9b..d75094ff22 100644 --- a/rules/no-new-buffer.js +++ b/rules/no-new-buffer.js @@ -89,7 +89,7 @@ const config = { type: 'problem', docs: { description: 'Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-object-as-default-parameter.js b/rules/no-object-as-default-parameter.js index 138273a5e0..699e59f1c6 100644 --- a/rules/no-object-as-default-parameter.js +++ b/rules/no-object-as-default-parameter.js @@ -43,7 +43,7 @@ const config = { type: 'problem', docs: { description: 'Disallow the use of objects as default parameters.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-process-exit.js b/rules/no-process-exit.js index 4fa4ad07b7..4676cf548c 100644 --- a/rules/no-process-exit.js +++ b/rules/no-process-exit.js @@ -97,7 +97,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow `process.exit()`.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-single-promise-in-promise-methods.js b/rules/no-single-promise-in-promise-methods.js index 8896a07170..d6d84749e2 100644 --- a/rules/no-single-promise-in-promise-methods.js +++ b/rules/no-single-promise-in-promise-methods.js @@ -166,7 +166,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow passing single-element arrays to `Promise` methods.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-static-only-class.js b/rules/no-static-only-class.js index 68a52597d0..ff02c37a45 100644 --- a/rules/no-static-only-class.js +++ b/rules/no-static-only-class.js @@ -216,7 +216,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow classes that only have static members.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-thenable.js b/rules/no-thenable.js index 5ee4c8177f..ad551cf149 100644 --- a/rules/no-thenable.js +++ b/rules/no-thenable.js @@ -185,7 +185,7 @@ const config = { type: 'problem', docs: { description: 'Disallow `then` property.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-this-assignment.js b/rules/no-this-assignment.js index a99b69a40d..247707a906 100644 --- a/rules/no-this-assignment.js +++ b/rules/no-this-assignment.js @@ -31,7 +31,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow assigning `this` to a variable.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/no-typeof-undefined.js b/rules/no-typeof-undefined.js index 0e28b72015..a7db35d308 100644 --- a/rules/no-typeof-undefined.js +++ b/rules/no-typeof-undefined.js @@ -133,7 +133,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow comparing `undefined` using `typeof`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/no-unnecessary-array-flat-depth.js b/rules/no-unnecessary-array-flat-depth.js index c9a2229786..b0e428d6b4 100644 --- a/rules/no-unnecessary-array-flat-depth.js +++ b/rules/no-unnecessary-array-flat-depth.js @@ -38,7 +38,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow using `1` as the `depth` argument of `Array#flat()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', diff --git a/rules/no-unnecessary-array-splice-count.js b/rules/no-unnecessary-array-splice-count.js index 06132708af..a6f9d12167 100644 --- a/rules/no-unnecessary-array-splice-count.js +++ b/rules/no-unnecessary-array-splice-count.js @@ -12,7 +12,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', diff --git a/rules/no-unnecessary-await.js b/rules/no-unnecessary-await.js index e150f7fb50..02c36fe924 100644 --- a/rules/no-unnecessary-await.js +++ b/rules/no-unnecessary-await.js @@ -99,7 +99,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow awaiting non-promise values.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', diff --git a/rules/no-unnecessary-polyfills.js b/rules/no-unnecessary-polyfills.js index b58183018e..210054ac2e 100644 --- a/rules/no-unnecessary-polyfills.js +++ b/rules/no-unnecessary-polyfills.js @@ -162,7 +162,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce the use of built-in methods instead of unnecessary polyfills.', - recommended: true, + recommended: 'unopinionated', }, schema, // eslint-disable-next-line eslint-plugin/require-meta-default-options diff --git a/rules/no-unnecessary-slice-end.js b/rules/no-unnecessary-slice-end.js index 92eb3c5906..5624f45b28 100644 --- a/rules/no-unnecessary-slice-end.js +++ b/rules/no-unnecessary-slice-end.js @@ -12,7 +12,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-unreadable-array-destructuring.js b/rules/no-unreadable-array-destructuring.js index a06cce5357..eab6feaeba 100644 --- a/rules/no-unreadable-array-destructuring.js +++ b/rules/no-unreadable-array-destructuring.js @@ -75,7 +75,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow unreadable array destructuring.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-unreadable-iife.js b/rules/no-unreadable-iife.js index e7755c105f..a0e09cc4ba 100644 --- a/rules/no-unreadable-iife.js +++ b/rules/no-unreadable-iife.js @@ -33,7 +33,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow unreadable IIFEs.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: false, messages, diff --git a/rules/no-useless-error-capture-stack-trace.js b/rules/no-useless-error-capture-stack-trace.js index 3aab75c382..2aef4fe2e5 100644 --- a/rules/no-useless-error-capture-stack-trace.js +++ b/rules/no-useless-error-capture-stack-trace.js @@ -136,7 +136,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow unnecessary `Error.captureStackTrace(…)`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-useless-fallback-in-spread.js b/rules/no-useless-fallback-in-spread.js index 027829c97c..f5c31f8b42 100644 --- a/rules/no-useless-fallback-in-spread.js +++ b/rules/no-useless-fallback-in-spread.js @@ -56,7 +56,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow useless fallback when spreading in object literals.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-useless-length-check.js b/rules/no-useless-length-check.js index 49c0463e91..70b70f411a 100644 --- a/rules/no-useless-length-check.js +++ b/rules/no-useless-length-check.js @@ -140,7 +140,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow useless array length check.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-useless-promise-resolve-reject.js b/rules/no-useless-promise-resolve-reject.js index 521a0f542e..6e3daf7628 100644 --- a/rules/no-useless-promise-resolve-reject.js +++ b/rules/no-useless-promise-resolve-reject.js @@ -204,7 +204,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-useless-spread.js b/rules/no-useless-spread.js index 6b9093f170..ecb19c5b44 100644 --- a/rules/no-useless-spread.js +++ b/rules/no-useless-spread.js @@ -366,7 +366,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow unnecessary spread.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/no-useless-switch-case.js b/rules/no-useless-switch-case.js index cd01a09729..2136cd17f7 100644 --- a/rules/no-useless-switch-case.js +++ b/rules/no-useless-switch-case.js @@ -49,7 +49,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow useless case in switch statements.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages, diff --git a/rules/no-useless-undefined.js b/rules/no-useless-undefined.js index b9c7296437..28cffecf74 100644 --- a/rules/no-useless-undefined.js +++ b/rules/no-useless-undefined.js @@ -298,7 +298,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow useless `undefined`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/no-zero-fractions.js b/rules/no-zero-fractions.js index 904df26eb2..227d494bc1 100644 --- a/rules/no-zero-fractions.js +++ b/rules/no-zero-fractions.js @@ -71,7 +71,7 @@ const config = { type: 'suggestion', docs: { description: 'Disallow number literals with zero fractions or dangling dots.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/number-literal-case.js b/rules/number-literal-case.js index 44175ef315..c44467fcfb 100644 --- a/rules/number-literal-case.js +++ b/rules/number-literal-case.js @@ -68,7 +68,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce proper case for numeric literals.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/numeric-separators-style.js b/rules/numeric-separators-style.js index 971fccd356..e137fda406 100644 --- a/rules/numeric-separators-style.js +++ b/rules/numeric-separators-style.js @@ -169,7 +169,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce the style of numeric separators by correctly grouping digits.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/prefer-add-event-listener.js b/rules/prefer-add-event-listener.js index 6ebd07ac48..5bdc56c469 100644 --- a/rules/prefer-add-event-listener.js +++ b/rules/prefer-add-event-listener.js @@ -179,7 +179,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/prefer-array-find.js b/rules/prefer-array-find.js index ac83f8b210..d49baca340 100644 --- a/rules/prefer-array-find.js +++ b/rules/prefer-array-find.js @@ -439,7 +439,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-array-flat-map.js b/rules/prefer-array-flat-map.js index 16b2df5fd9..55db51c51b 100644 --- a/rules/prefer-array-flat-map.js +++ b/rules/prefer-array-flat-map.js @@ -77,7 +77,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.flatMap(…)` over `.map(…).flat()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-array-flat.js b/rules/prefer-array-flat.js index d231af53d2..28915a96c3 100644 --- a/rules/prefer-array-flat.js +++ b/rules/prefer-array-flat.js @@ -267,7 +267,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Array#flat()` over legacy techniques to flatten arrays.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/prefer-array-index-of.js b/rules/prefer-array-index-of.js index def95791c0..2ff1b84518 100644 --- a/rules/prefer-array-index-of.js +++ b/rules/prefer-array-index-of.js @@ -20,7 +20,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-array-some.js b/rules/prefer-array-some.js index ecd1c966d6..971eaa76a6 100644 --- a/rules/prefer-array-some.js +++ b/rules/prefer-array-some.js @@ -208,7 +208,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-at.js b/rules/prefer-at.js index a657dcf4c3..16c9650540 100644 --- a/rules/prefer-at.js +++ b/rules/prefer-at.js @@ -369,7 +369,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.at()` method for index access and `String#charAt()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-blob-reading-methods.js b/rules/prefer-blob-reading-methods.js index 393c0a56bb..c41bdc635e 100644 --- a/rules/prefer-blob-reading-methods.js +++ b/rules/prefer-blob-reading-methods.js @@ -38,7 +38,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/prefer-class-fields.js b/rules/prefer-class-fields.js index c55a2a9248..c6e5ebb48c 100644 --- a/rules/prefer-class-fields.js +++ b/rules/prefer-class-fields.js @@ -147,7 +147,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer class field declarations over `this` assignments in constructors.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-code-point.js b/rules/prefer-code-point.js index 6760112cfb..55cb227e15 100644 --- a/rules/prefer-code-point.js +++ b/rules/prefer-code-point.js @@ -59,7 +59,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages, diff --git a/rules/prefer-date-now.js b/rules/prefer-date-now.js index 12e2f7b32c..e2d4d6484e 100644 --- a/rules/prefer-date-now.js +++ b/rules/prefer-date-now.js @@ -123,7 +123,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-default-parameters.js b/rules/prefer-default-parameters.js index efe3c7e840..a424972984 100644 --- a/rules/prefer-default-parameters.js +++ b/rules/prefer-default-parameters.js @@ -205,7 +205,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer default parameters over reassignment.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages: { diff --git a/rules/prefer-dom-node-append.js b/rules/prefer-dom-node-append.js index 389dca2ef6..9e3808493d 100644 --- a/rules/prefer-dom-node-append.js +++ b/rules/prefer-dom-node-append.js @@ -40,7 +40,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Node#append()` over `Node#appendChild()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-dom-node-dataset.js b/rules/prefer-dom-node-dataset.js index 972a7073c5..85b5083ea2 100644 --- a/rules/prefer-dom-node-dataset.js +++ b/rules/prefer-dom-node-dataset.js @@ -120,7 +120,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using `.dataset` on DOM elements over calling attribute methods.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-dom-node-remove.js b/rules/prefer-dom-node-remove.js index 6081e1d21f..c2038f503e 100644 --- a/rules/prefer-dom-node-remove.js +++ b/rules/prefer-dom-node-remove.js @@ -113,7 +113,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-dom-node-text-content.js b/rules/prefer-dom-node-text-content.js index 1fa85a1617..5990f9f0a4 100644 --- a/rules/prefer-dom-node-text-content.js +++ b/rules/prefer-dom-node-text-content.js @@ -67,7 +67,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.textContent` over `.innerText`.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages, diff --git a/rules/prefer-event-target.js b/rules/prefer-event-target.js index 15d2678077..8e822cb37f 100644 --- a/rules/prefer-event-target.js +++ b/rules/prefer-event-target.js @@ -110,7 +110,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `EventTarget` over `EventEmitter`.', - recommended: true, + recommended: 'unopinionated', }, messages, }, diff --git a/rules/prefer-global-this.js b/rules/prefer-global-this.js index ce3addacab..e24bffde6e 100644 --- a/rules/prefer-global-this.js +++ b/rules/prefer-global-this.js @@ -210,7 +210,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `globalThis` over `window`, `self`, and `global`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: false, diff --git a/rules/prefer-includes.js b/rules/prefer-includes.js index 18954181aa..4fb3796c88 100644 --- a/rules/prefer-includes.js +++ b/rules/prefer-includes.js @@ -94,7 +94,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-keyboard-event-key.js b/rules/prefer-keyboard-event-key.js index 59c515641a..023e4463a7 100644 --- a/rules/prefer-keyboard-event-key.js +++ b/rules/prefer-keyboard-event-key.js @@ -178,7 +178,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-logical-operator-over-ternary.js b/rules/prefer-logical-operator-over-ternary.js index d9d0f66870..6958978b6d 100644 --- a/rules/prefer-logical-operator-over-ternary.js +++ b/rules/prefer-logical-operator-over-ternary.js @@ -150,7 +150,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using a logical operator over a ternary.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, diff --git a/rules/prefer-math-min-max.js b/rules/prefer-math-min-max.js index db4b57856a..ddaeb97dfd 100644 --- a/rules/prefer-math-min-max.js +++ b/rules/prefer-math-min-max.js @@ -195,7 +195,7 @@ const config = { type: 'problem', docs: { description: 'Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-math-trunc.js b/rules/prefer-math-trunc.js index 4df74111ac..c6e7af8ce0 100644 --- a/rules/prefer-math-trunc.js +++ b/rules/prefer-math-trunc.js @@ -100,7 +100,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce the use of `Math.trunc` instead of bitwise operators.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-modern-dom-apis.js b/rules/prefer-modern-dom-apis.js index d14d80a15f..78bd2818bc 100644 --- a/rules/prefer-modern-dom-apis.js +++ b/rules/prefer-modern-dom-apis.js @@ -135,7 +135,7 @@ const config = { description: // eslint-disable-next-line @stylistic/max-len 'Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-modern-math-apis.js b/rules/prefer-modern-math-apis.js index 5b4a06a780..2e58ccc0c4 100644 --- a/rules/prefer-modern-math-apis.js +++ b/rules/prefer-modern-math-apis.js @@ -200,7 +200,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer modern `Math` APIs over legacy patterns.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-module.js b/rules/prefer-module.js index b5097d4179..a9971a63bf 100644 --- a/rules/prefer-module.js +++ b/rules/prefer-module.js @@ -365,7 +365,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer JavaScript modules (ESM) over CommonJS.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-native-coercion-functions.js b/rules/prefer-native-coercion-functions.js index 785751fb65..73d4f73b3e 100644 --- a/rules/prefer-native-coercion-functions.js +++ b/rules/prefer-native-coercion-functions.js @@ -177,7 +177,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-negative-index.js b/rules/prefer-negative-index.js index e93d42bdf6..9f3753d627 100644 --- a/rules/prefer-negative-index.js +++ b/rules/prefer-negative-index.js @@ -202,7 +202,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer negative index over `.length - index` when possible.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-node-protocol.js b/rules/prefer-node-protocol.js index 7fdf9ac03d..dc9cbb86da 100644 --- a/rules/prefer-node-protocol.js +++ b/rules/prefer-node-protocol.js @@ -67,7 +67,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using the `node:` protocol when importing Node.js builtin modules.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-number-properties.js b/rules/prefer-number-properties.js index 3597cae7c8..bcd5fda5bf 100644 --- a/rules/prefer-number-properties.js +++ b/rules/prefer-number-properties.js @@ -126,7 +126,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Number` static properties over global ones.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-object-from-entries.js b/rules/prefer-object-from-entries.js index e3fbb4eec0..446aa75c36 100644 --- a/rules/prefer-object-from-entries.js +++ b/rules/prefer-object-from-entries.js @@ -243,7 +243,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/prefer-optional-catch-binding.js b/rules/prefer-optional-catch-binding.js index 6c4d593935..5c4e9f89c1 100644 --- a/rules/prefer-optional-catch-binding.js +++ b/rules/prefer-optional-catch-binding.js @@ -67,7 +67,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer omitting the `catch` binding parameter.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-prototype-methods.js b/rules/prefer-prototype-methods.js index 04eb835a1b..81c938d118 100644 --- a/rules/prefer-prototype-methods.js +++ b/rules/prefer-prototype-methods.js @@ -152,7 +152,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer borrowing methods from the prototype instead of the instance.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-reflect-apply.js b/rules/prefer-reflect-apply.js index 0c92b7eb41..8bc5981cf8 100644 --- a/rules/prefer-reflect-apply.js +++ b/rules/prefer-reflect-apply.js @@ -89,7 +89,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Reflect.apply()` over `Function#apply()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-regexp-test.js b/rules/prefer-regexp-test.js index 2e60efb635..212025c194 100644 --- a/rules/prefer-regexp-test.js +++ b/rules/prefer-regexp-test.js @@ -144,7 +144,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-set-has.js b/rules/prefer-set-has.js index a06d89a40e..76b728213b 100644 --- a/rules/prefer-set-has.js +++ b/rules/prefer-set-has.js @@ -170,7 +170,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-set-size.js b/rules/prefer-set-size.js index 4e6769d0cb..09863e457f 100644 --- a/rules/prefer-set-size.js +++ b/rules/prefer-set-size.js @@ -95,7 +95,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using `Set#size` instead of `Array#length`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-single-call.js b/rules/prefer-single-call.js index 54391c9176..3e2e1f4a2f 100644 --- a/rules/prefer-single-call.js +++ b/rules/prefer-single-call.js @@ -166,7 +166,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-string-raw.js b/rules/prefer-string-raw.js index 32ea732218..e0cd7db2c5 100644 --- a/rules/prefer-string-raw.js +++ b/rules/prefer-string-raw.js @@ -73,7 +73,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using the `String.raw` tag to avoid escaping `\\`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-string-replace-all.js b/rules/prefer-string-replace-all.js index 226a879141..5219a5a3b7 100644 --- a/rules/prefer-string-replace-all.js +++ b/rules/prefer-string-replace-all.js @@ -171,7 +171,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `String#replaceAll()` over regex searches with the global flag.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-string-slice.js b/rules/prefer-string-slice.js index 9755c56578..9a42fb22a1 100644 --- a/rules/prefer-string-slice.js +++ b/rules/prefer-string-slice.js @@ -171,7 +171,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `String#slice()` over `String#substr()` and `String#substring()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-string-starts-ends-with.js b/rules/prefer-string-starts-ends-with.js index 477adb290f..e9f41ae58c 100644 --- a/rules/prefer-string-starts-ends-with.js +++ b/rules/prefer-string-starts-ends-with.js @@ -190,7 +190,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/prefer-string-trim-start-end.js b/rules/prefer-string-trim-start-end.js index 4faa07eb6b..d9a2b9f5a3 100644 --- a/rules/prefer-string-trim-start-end.js +++ b/rules/prefer-string-trim-start-end.js @@ -36,7 +36,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/prefer-structured-clone.js b/rules/prefer-structured-clone.js index d49b488a91..c7faa40494 100644 --- a/rules/prefer-structured-clone.js +++ b/rules/prefer-structured-clone.js @@ -137,7 +137,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer using `structuredClone` to create a deep clone.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, schema, diff --git a/rules/prefer-switch.js b/rules/prefer-switch.js index b5bf16e7bb..efda258c5a 100644 --- a/rules/prefer-switch.js +++ b/rules/prefer-switch.js @@ -90,7 +90,7 @@ const breakAbleNodeTypes = new Set([ 'SwitchStatement', ]); const getBreakTarget = node => { - for (;node.parent; node = node.parent) { + for (; node.parent; node = node.parent) { if (breakAbleNodeTypes.has(node.type)) { return node; } @@ -337,7 +337,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer `switch` over multiple `else-if`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/prefer-ternary.js b/rules/prefer-ternary.js index 86782f2ce4..865fe87cb9 100644 --- a/rules/prefer-ternary.js +++ b/rules/prefer-ternary.js @@ -274,7 +274,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer ternary expressions over simple `if-else` statements.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', schema, diff --git a/rules/prefer-top-level-await.js b/rules/prefer-top-level-await.js index 3cd8be73f3..b03b48dc01 100644 --- a/rules/prefer-top-level-await.js +++ b/rules/prefer-top-level-await.js @@ -144,7 +144,7 @@ const config = { type: 'suggestion', docs: { description: 'Prefer top-level await over top-level promises and async function calls.', - recommended: true, + recommended: 'unopinionated', }, hasSuggestions: true, messages, diff --git a/rules/prefer-type-error.js b/rules/prefer-type-error.js index 2670a89978..8a8f052b59 100644 --- a/rules/prefer-type-error.js +++ b/rules/prefer-type-error.js @@ -143,7 +143,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce throwing `TypeError` in type checking conditions.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/relative-url-style.js b/rules/relative-url-style.js index 384733b38a..bde29727ad 100644 --- a/rules/relative-url-style.js +++ b/rules/relative-url-style.js @@ -158,7 +158,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce consistent relative URL style.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/require-array-join-separator.js b/rules/require-array-join-separator.js index 00719a9c3e..79c39f2b3a 100644 --- a/rules/require-array-join-separator.js +++ b/rules/require-array-join-separator.js @@ -55,7 +55,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce using the separator argument with `Array#join()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/require-module-specifiers.js b/rules/require-module-specifiers.js index 05609b1a6b..59458ed7ca 100644 --- a/rules/require-module-specifiers.js +++ b/rules/require-module-specifiers.js @@ -147,7 +147,7 @@ const config = { type: 'suggestion', docs: { description: 'Require non-empty specifier list in import and export statements.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/require-number-to-fixed-digits-argument.js b/rules/require-number-to-fixed-digits-argument.js index 6218760abb..8736b9eebd 100644 --- a/rules/require-number-to-fixed-digits-argument.js +++ b/rules/require-number-to-fixed-digits-argument.js @@ -46,7 +46,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce using the digits argument with `Number#toFixed()`.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/rules/text-encoding-identifier-case.js b/rules/text-encoding-identifier-case.js index c059a03a6e..5f2b7818fd 100644 --- a/rules/text-encoding-identifier-case.js +++ b/rules/text-encoding-identifier-case.js @@ -98,7 +98,7 @@ const config = { type: 'suggestion', docs: { description: 'Enforce consistent case for text encoding identifiers.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', hasSuggestions: true, diff --git a/rules/throw-new-error.js b/rules/throw-new-error.js index aef87cd325..2b4a679613 100644 --- a/rules/throw-new-error.js +++ b/rules/throw-new-error.js @@ -38,7 +38,7 @@ const config = { type: 'suggestion', docs: { description: 'Require `new` when creating an error.', - recommended: true, + recommended: 'unopinionated', }, fixable: 'code', messages, diff --git a/scripts/template/rule.js.jst b/scripts/template/rule.js.jst index 7fdae93f09..ce2babcb3d 100644 --- a/scripts/template/rule.js.jst +++ b/scripts/template/rule.js.jst @@ -61,7 +61,7 @@ const config = { type: '<%= type %>', docs: { description: '<%= description %>', - recommended: true, + recommended: 'unopinionated', }, <% if (fixableType) { %>fixable: '<%= fixableType %>',<% } %> <% if (hasSuggestions) { %>hasSuggestions: true,<% } %> diff --git a/test/package.js b/test/package.js index f555d81483..dfa2eaedcc 100644 --- a/test/package.js +++ b/test/package.js @@ -210,7 +210,7 @@ test('rule.meta.docs.recommended should be synchronized with presets', t => { } const {recommended} = rule.meta.docs; - t.is(typeof recommended, 'boolean', `meta.docs.recommended in '${name}' rule should be a boolean.`); + t.true(typeof recommended === 'boolean' || recommended === 'unopinionated', `meta.docs.recommended in '${name}' rule should be a boolean or 'unopinionated'.`); const severity = eslintPluginUnicorn.configs.recommended.rules[`unicorn/${name}`]; if (recommended) {