eslint / js

Monorepo for the JS language tools.
BSD 2-Clause "Simplified" License
2.28k stars 197 forks source link

Adding experimental support for additional stage 3 features #309

Closed not-an-aardvark closed 7 years ago

not-an-aardvark commented 7 years ago

There are currently a few stage 3 proposals that introduce new syntax:

Given that these are stage 3, it's likely that they will eventually reach stage 4 in something very close to their current form. I think it would be a good idea for espree to support them under experimental flags similar to experimentalObjectRestSpread. This will make it easier to iron out any issues that might appear in ESLint rules with the new syntax.

I'm aware that we generally don't support experimental features, but I think stage 3 is an appropriate time to add a "use-at-your-own-risk beta" version of syntax so that we don't end up with a bunch of bugs in rules when these features reach stage 4.

nzakas commented 7 years ago

I'm sorry, our policy on this is to only support stage 4 for a reason: stage 3 proposals don't always make it into the next ecmascript release, so we can't assume it's okay to group them into the next ecmaVersion.

We also don't want to add more ecmaFeatures flags. We did that for object rest-spread only because it was the one feature React users needed that we didn't have (thus making them use babel-eslint, which was much slower).

Our policy is to point people to babel-ESLint for stage 3 and lower support, and we will initiate support as soon as features reach stage 4.