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

Fix: raise error for trailing commas after rest properties (fixes #310) #323

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

not-an-aardvark
Copy link
Member

This updates the rest property parser to raise an error if it encounters a trailing comma. The lack of an error here has caused a lot of confusion in eslint issues (see #310 for a list of invalid bug reports).

This fixes incorrect behavior, but we should consider whether we want to treat it as a breaking change (see #310).

@nzakas
Copy link
Member

nzakas commented Mar 24, 2017

If this change is due to a spec update, it should be breaking. If this was just a long-existing bug we didn't notice, then it's just a patch.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM.

@not-an-aardvark
Copy link
Member Author

The spec has been consistent on this -- it's just a long-existing bug.

@ilyavolodin ilyavolodin merged commit 652990a into master Mar 24, 2017
@not-an-aardvark not-an-aardvark deleted the rest-trailing-commas, branch April 28, 2017 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants