From a1d78ed038f37843946ec1fabd94375e3bc5c758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20Vo=C3=9F?= <22179782+vossmalte@users.noreply.github.com> Date: Wed, 17 Jan 2024 09:30:41 +0100 Subject: [PATCH 1/2] do not recommend consistent destructuring See https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1230#issuecomment-828366222 !1230 --- configs/recommended.js | 2 +- docs/rules/consistent-destructuring.md | 2 +- package.json | 2 +- readme.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/recommended.js b/configs/recommended.js index 42ea8e9730..a807c50b02 100644 --- a/configs/recommended.js +++ b/configs/recommended.js @@ -2,7 +2,7 @@ module.exports = { 'unicorn/better-regex': 'error', 'unicorn/catch-error-name': 'error', - 'unicorn/consistent-destructuring': 'error', + 'unicorn/consistent-destructuring': 'off', 'unicorn/consistent-function-scoping': 'error', 'unicorn/custom-error-definition': 'off', 'unicorn/empty-brace-spaces': 'error', diff --git a/docs/rules/consistent-destructuring.md b/docs/rules/consistent-destructuring.md index 018304b0a1..235671e0ce 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 enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#preset-configs). +🚫 This rule is _disabled_ in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#preset-configs). 🔧💡 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/developer-guide/working-with-rules#providing-suggestions). diff --git a/package.json b/package.json index aa16719ebf..c2ebe2dec4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-unicorn", - "version": "50.0.1", + "version": "51.0.0", "description": "More than 100 powerful ESLint rules", "license": "MIT", "repository": "sindresorhus/eslint-plugin-unicorn", diff --git a/readme.md b/readme.md index e1a70df5a8..506f43f92f 100644 --- a/readme.md +++ b/readme.md @@ -112,7 +112,7 @@ If you don't use the preset, ensure you use the same `env` and `parserOptions` c | :----------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :- | :- | :- | | [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-destructuring](docs/rules/consistent-destructuring.md) | Use destructured variables over properties. | ✅ | 🔧 | 💡 | +| [consistent-destructuring](docs/rules/consistent-destructuring.md) | Use destructured variables over properties. | | 🔧 | 💡 | | [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. | ✅ | 🔧 | | From 54f55606effd1a60d7e40f6b79ab709b0545ec1a Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 23 Jan 2024 23:16:06 +0700 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c2ebe2dec4..aa16719ebf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-unicorn", - "version": "51.0.0", + "version": "50.0.1", "description": "More than 100 powerful ESLint rules", "license": "MIT", "repository": "sindresorhus/eslint-plugin-unicorn",