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
Support for ecmaVersion: latest
#78
Comments
I found a duplicate issue #74. So I close this issue. |
I reopen this issue. I saw #74, but babel-parser seems to be using eslint-scope by calling it from the parser. |
As stated in #74 (comment), you can safely set ecmaVersion to 6 all the time. |
@nzakas Thank you for your reply. But I'm still not sure. Does that mean letting ESLint users use |
vue-eslint-parser, unlike babel and typescript-eslint, does not provide a scope manager from the parser. |
Oh I see, I misunderstood. ESLint doesn’t interpret parserOptions when Espree isn’t used because we can’t know what other parsers are expecting as values. “Latest” is understood only by Espree. For people using custom parsers, they should set parserOptions.ecmaVersion to a number and not “latest”. We expect custom parsers to validate their own parserOptions. |
Thank you for your reply. I could understand how eslint works. |
As additional information, vue-eslint-parser can understand and parse |
Hmmmm. In that case, maybe we can just change ESLint so it always passes ecmaVersion: 6 to eslint-scope. I don’t think it will cause any issues and will allow your use case to work. |
Thank you for your opinion! I will open an issue in ESLint repo later. |
I was wrong. There are some other differences between ecmaVersion 5 and 6, so we can't just set it to 6. However, this is a problem we should address in ESLint rather than on eslint-scope. Thanks! |
Currently ESLint resolves
ecmaVersion: latest
only when using espree, so"latest"
is passed to eslint-scope when using a different parser.https://github.com/eslint/eslint/blob/3630211c46f1ed691445231164e29e5cd6c87dff/lib/linter/linter.js#L449-L454
I want eslint-scope to support
ecmaVersion: "latest"
.(Should I open this issue in the ESLint repo?)
Related to vuejs/vue-eslint-parser#135
The text was updated successfully, but these errors were encountered: