Skip to content

Commit

Permalink
ESLint Plugin: Relax prefer-const for destructuring assignment (#20737
Browse files Browse the repository at this point in the history
)
  • Loading branch information
aduth authored Mar 12, 2020
1 parent 3233009 commit 165365a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion packages/eslint-plugin/configs/esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 165365a

Please sign in to comment.