-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ecmaVersion in recommended config is outdated #3085
Comments
Good question. When i was doing the flat config work, i was aiming for parity with the original configs, just with the new config structure. And the legacy configs had it defined that way. eslint-plugin-import/config/recommended.js Lines 24 to 27 in 67cc798
I can't think of a reason why that shouldn't be 'latest', though. |
Changing it would be a breaking change, unfortunately. |
I don't know nearly enough about this to understand why, are there features that are enabled with |
Because the inability of eslint to tolerate newer syntax is also a feature, and code could accidentally use syntax that isn't actually supported in their target environments if the ecmaVersion is bumped. |
This got me thinking, would there be value in having a checklist of things that we'd like to include whenever there is a need for a new major? I feel like there's been several of these kinds of small items that would be nice to have, but are breaking. Just a thought. |
I have various lists tracking them; including a local branch. |
Config
import/recommended
has a hardcodedparserOptions.ecmaVersion
of 2018This has the side effect of not being able to parse my
eslint.config.mjs
which uses nullish coalescing (Unless I override withlanguageOptions.ecmaVersion = latest
)Is there a technical reason for not setting it to
latest
(which is currently the ESLint default)?The text was updated successfully, but these errors were encountered: