Skip to content

Commit

Permalink
Fix: prefer-const false positive with object spread (fixes #8187) (#8297
Browse files Browse the repository at this point in the history
)

* Fix: prefer-const false positive with object spread (fixes #8187)
  • Loading branch information
vitorbal committed Mar 30, 2017
1 parent 8569a90 commit 27616a8
Show file tree
Hide file tree
Showing 3 changed files with 1,756 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/prefer-const.js
Expand Up @@ -9,7 +9,7 @@
// Helpers
//------------------------------------------------------------------------------

const PATTERN_TYPE = /^(?:.+?Pattern|RestElement|Property)$/;
const PATTERN_TYPE = /^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/;
const DECLARATION_HOST_TYPE = /^(?:Program|BlockStatement|SwitchCase)$/;
const DESTRUCTURING_HOST_TYPE = /^(?:VariableDeclarator|AssignmentExpression)$/;

Expand Down

0 comments on commit 27616a8

Please sign in to comment.