eslint / espree

An Esprima-compatible JavaScript parser
BSD 2-Clause "Simplified" License
2.26k stars 189 forks source link

Breaking: Implement 'ecmaVersion: latest' (fixes #495) #499

Closed nzakas closed 3 years ago

nzakas commented 3 years ago

This is the implementation for #495, which:

  1. Allows ecmaVersion: "latest" as a valid value. Internally, this is just normalized to latestEcmaVersion, as that was the simplest way to validate this value.
  2. Sets the default ecmaVersion to latestEcmaVersion.
nzakas commented 3 years ago

Added the missing test.

nzakas commented 3 years ago

Please see my note on https://github.com/eslint/eslint/pull/14622#issuecomment-856162389 about keeping the default ecmaVersion for Espree at 5.

nzakas commented 3 years ago

OK, it looks like we are good to move forward with this based on the latest changes to eslint/eslint#14622. :tada: