diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index a38e783e1adb9..48149ffc4c43f 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,9 @@ ## Master +### New Features + +- The `prefer-const` rule included in the `recommended` and `esnext` rulesets has been relaxed to allow a `let` assignment if any of a [destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) are reassigned. + ## 4.0.0 (2020-02-10) ### Breaking Changes diff --git a/packages/eslint-plugin/configs/esnext.js b/packages/eslint-plugin/configs/esnext.js index 35a758449571f..4cdd60b0fa05b 100644 --- a/packages/eslint-plugin/configs/esnext.js +++ b/packages/eslint-plugin/configs/esnext.js @@ -22,7 +22,12 @@ module.exports = { 'no-useless-constructor': 'error', 'no-var': 'error', 'object-shorthand': 'error', - 'prefer-const': 'error', + 'prefer-const': [ + 'error', + { + destructuring: 'all', + }, + ], quotes: [ 'error', 'single',