-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Rest operator in function argument declaration throws "Parsing error Invalid left-hand side in formals list" #243
Comments
What version are you using? |
The flag name is actually |
@ilyavolodin I actually typo'd in the issue here, I've got the correct flag name in my |
Okay, this might be fixed in 3.0.0. Can you check the master branch of ESLint to see if you're still having the problem? |
When I install the master branch of eslint using
Which is reported on the first I have no idea why this is, and I can't find any documentation on I'm not sure this actually fixes the problem though, as eslint seems to crap out directly after seeing a Parsing error. So it might be that the error still persists, but eslint just doesn't get to the line with the spread operator. |
2.0.0 has different options, see http://eslint.org/docs/2.0.0/user-guide/migrating-to-2.0.0#language-options. I'd also suggest using |
Ok, I followed the guide and moved my config to the 2.0.0 options.
So the problem exists, but it's a different error message now, it still points to the When running with |
OK thanks, I'll take a look. |
I've tried this a couple of times and I'm unable to reproduce. I added your exact code as a test and it parses fine: #244 Is it possible you have a typo in your config file? For ESLint 2.0.0, you'd need a config that looks like this: {
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
}
} |
Thanks, I'm not sure if I have the correct config then for eslint 2.0.0. I'll check later when I get back to my laptop. |
This was definitely broken in Espree 2.x. In Espree 3.x, it was also broken, but was fixed in #249. |
When I run
eslint
on code like this:I get the error: "Parsing error: Invalid left-hand side in formals list".
This was already reported on eslint, but there it was mentioned that this should be reported on espree, and I cannot find any issue on this project about this so I created this one.
I have
experimentalObjectSpread: true
in my.eslintrc
.The text was updated successfully, but these errors were encountered: