Use "latest"
for ESLint ecmaVersion
#5715
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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...