-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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 rest operator syntax errors #10200
Conversation
These are caused by new syntax checking introduced by babylon: https://github.com/babel/babylon/blob/1285131e3eb28ab6f5f62a7c5fd3ffd7ce1e5eb8/CHANGELOG.md#v6113-2016-10-01 Issue #10199
By analyzing the blame information on this pull request, we identified @javache and @hedgerwang to be potential reviewers. |
Thank you for your pull request. As you may know, we require contributors to sign our Contributor License Agreement, and we don't seem to have you on file and listed as active anymore. In order for us to review and merge your code, please email [email protected] with your details so we can update your status. |
Update: the offending commit has been temporarily reverted: babel/babylon#154 |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Closing since this is a bug in Babylon to my knowledge and has been fixed upstream. |
Well, this is not a bug in Babylon. They decided to postpone this syntax check until major release as it's essentially a breaking change, but it will be there. I guess you are closing because even if this gets merged nothing will prevent people from making this syntax error in new code? |
Reopening because it's actually not clear to me how the trailing comma spec and the rest spec work together. |
@facebook-github-bot shipit |
Thanks for importing. If you are a Facebook employee, you can view this diff on Phabricator. |
These are caused by new syntax checking introduced by babylon.
"The single rest at the end only applies to binding
let { x, ...y } = obj;
and assignment({ x, ...y } = obj).
"I'd say this really should be cherry picked into the stable branch.
Test plan
\.\.\..*,.*\n.*=
in IntelliJ regex format—find all ... followed by newline followed by =)Issue #10199