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
Update: ecmaVersion allows "latest" #14720
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall question: do we really need to detect if the parser is Espree anymore? The only change I think we need is to normalize “latest” if found.
4977ae0
to
7b757d9
Compare
7b757d9
to
0e3bbb5
Compare
0e3bbb5
to
fee5375
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Unfortunately, this new feature won't work with |
Yes, this feature is available only with the default parser (as noted in the release blog post). Specifying Parser Options in ESLint documentation describes parser options for the default parser. 3rd-party parsers have different options: |
Yeah, make sense, but isn't it possible to read this property no matter what parser is used? 🤔 |
https://eslint.org/docs/developer-guide/working-with-custom-parsers Only Espree (the default parser) provides latestEcmaVersion. |
Ok, I see, than maybe it might be possible to add property like |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ x] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
this is to reland 831f6b3.
I kept the ecmaVersion defaults to 5, in case we want to change espree's defaults later.
Is there anything you'd like reviewers to focus on?
but for linter/rule-tester, anything else needs to be updated?