Skip to content
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

Use "latest" for ESLint ecmaVersion #5715

Merged
merged 1 commit into from
Sep 15, 2022
Merged

Conversation

jeffwidman
Copy link
Member

Previously we were at 9, which is from back in 2018...

You can see the map of node versions to Ecma versions here: https://node.green/ Currently we're shipping node 16, which has solid support through ES2021.

We could just bump the pin to a version, but then we have to remember to manually keep bumping it (Dependabot doesn't yet support bumping this option).

Instead, by switching to "latest" we don't have to continue to maintain the pin.

Admittedly, this is a little YOLO'ish, since it will default to Ecma 2023 soon, but OTOH we will probably bump to Node 18 at the end of next month [when it goes to Active status[(https://nodejs.org/en/about/releases/). And Node 18 currently has good support for Ecma 2023.

I suspect overall the risk of "latest" diverging from what's actually supported in our node version is less than the risk of us simply forgetting and not bumping the pin at all for several years.

Plus this is just a linter, so it's not going to immediately break production...

@jeffwidman jeffwidman requested a review from a team as a code owner September 13, 2022 23:38
@jeffwidman
Copy link
Member Author

I'm not super knowledgable about the node/JS ecosystem, so very open to discussion re: whether it's better to pin to explicit versions vs "latest"...

Previously we were at 9, which is from back in 2018...

You can see the map of node versions to Ecma versions here: https://node.green/
Currently we're shipping `node` `16`, which has solid support through ES2021.

We could just bump the pin to a version, but then we have to remember to manually
keep bumping it (Dependabot doesn't _yet_ support bumping this option).

Instead, by switching to [`"latest"`](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options) we don't have to continue to maintain the pin.

Admittedly, this is a little YOLO'ish, since it will default to Ecma 2023 soon, but OTOH
we will probably bump to Node 18 at the end of next month [when it goes to `Active` status[(https://nodejs.org/en/about/releases/).
And Node 18 currently has good support for Ecma 2023.

I suspect overall the risk of `"latest"` diverging from what's actually supported in our node 
version is less than the risk of us simply forgetting and _not_ bumping the pin at all for several years.

Plus this is just a linter, so it's not going to immediately break production...
@jeffwidman jeffwidman force-pushed the jeff/use-latest-for-eslint branch from 882d859 to b71efbc Compare September 15, 2022 19:55
@jeffwidman jeffwidman merged commit 218f0af into main Sep 15, 2022
@jeffwidman jeffwidman deleted the jeff/use-latest-for-eslint branch September 15, 2022 20:07
@pavera pavera mentioned this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants