-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Incorrect ecmaVersion suggests only the old-style ES versions #7405
Comments
Thanks, I can reproduce this. We should probably mention the 2015-2017 options as well, although I'm not sure of the best way to do that (something like |
We are printing the error message coming from |
At the moment, ESLint modifies the version number here before sending it to espree, so we would have to make a change to that logic as well to avoid confusing errors (e.g. if |
Is there any reason why this algorithm is so generic? I understand mapping 6 to 2015 and 7 to 2016 but why not use the years only going forward? |
I actually don't think we should be outputting the possible version numbers at all. It should be fine to just say "Invalid ecmaVersion", otherwise we'll be stuck updating that message every year. And if this is coming from Espree, then it would have to be changed there, not here. |
@nzakas would like to take this on if that's ok. Correct me if I am wrong, but looks like the error message needs to be changed in espree to Thanks |
@sstern6 yes, you are correct. |
@nzakas thanks! Should have a PR open for this late today PST and will ref this issue when I do. |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
eslint .
What did you expect to happen?
An error message that would mention the 2015, 2016 & 2017 options.
What actually happened? Please include the actual, raw output from ESLint.
It prints:
The text was updated successfully, but these errors were encountered: