Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

[Feature request] Entering a wrong ES version should fail #66

Closed
AlexandreBonneau opened this issue Sep 12, 2018 · 0 comments
Closed

[Feature request] Entering a wrong ES version should fail #66

AlexandreBonneau opened this issue Sep 12, 2018 · 0 comments

Comments

@AlexandreBonneau
Copy link

AlexandreBonneau commented Sep 12, 2018

Requested Update

Currently, using es-check foo dist/*.js returns ES-Check: there were no ES version matching errors! 馃帀

However you could assume that if the dev mistyped foo instead of es4, he could also mistype se7 instead of es7.
I think es-check should throw an error when it does not recognize a valid ecmaVersion argument (see the default behavior in

switch (v) {
).

Why Is This Update Needed?

Devs that check their ES version do not need to be handled; lets tell them the harsh truth; they made a typo!

Are There Examples Of This Requested Update Elsewhere?

Nope, but issue #40 could have been avoided perhaps?
Specially if when such an error is detected, you could display a usage info with all the possible ecmaVersion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant