Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useful changes from my setup which I think may be beneficial to others #506

Closed
wants to merge 18 commits into from
2 changes: 1 addition & 1 deletion lib/visitIdentifierNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function normalizeNode(node, context) {
}

const isAssignment = KEYS_USED_FOR_ASSIGNMENT.has(key) ||
(key === 'key' && parent.parent.type === 'ObjectPattern') ||
(key === 'key' && !parent.computed && parent.parent.type === 'ObjectPattern') ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you come up with a test case demonstrating what this is supposed to fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added tests

(key === 'left' && parent.type === 'AssignmentPattern') ||
(key === 'elements' && parent.type === 'ArrayPattern') ||
(key === 'value' &&
Expand Down