-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Report "Bad assignment." in destructuring
During destructuring, the return value of the internal `checkLeftSideAssign` function was discarded, so JSHint would fail to report invalid assignment targets in that context. Move the reporting of Error 031 ("Bad assignment.") into the `checkLeftSideAssign` to enhance consistency. Improve the implementation of that internal function by making it aware of the rest operator (the previous implementation considered this form "invalid" but failed to report that).
- Loading branch information
1 parent
08df19e
commit fe559ed
Showing
2 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters