-
Notifications
You must be signed in to change notification settings - Fork 854
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
sourceType: "module"
with ES5 target?
#459
Comments
I filed it in both places because this is an Acorn limitation that also requires some support on Espree's end. (I use ESLint.) |
Various source types is a feature that is present only in ES6. It would be a violation of grammar to just rip apart some features from various versions and concatenate together, and no one would really want to support such custom flavor of JavaScript. Please see #343, #241 and I believe there were few other related issues for previous discussions on this. |
I am trying to write a script validator which returns Seeing that this issue was closed two years ago, is there any way today to do this with acorn? |
@ryanelian Just walk the parsed AST, checking against a whitelist. |
It'd be helpful with Rollup, if you don't want to use Babel. Related to eslint/espree#289.
The text was updated successfully, but these errors were encountered: