-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Adding parserOptions to babel-core transform result #6332
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5075/ |
I'm 100% behind enabling the usecase of resolving configs for We currently expose |
Yeah I'd love to expose a real way to do this, I can take that route, it just seemed a little difficult because we'd have to re-create some of the logic in the |
cc @hzoo; this is related to the babel-eslint stuff we talked about this week :-) |
I'm going to see if I can expose this in a better way with some refactoring, but I'll report back. |
What should happen if you run try to lint a file that has been ignored either via |
I would assume either, is treated the same as "env targets + no transforms", or falls back to the default parser, or falls back to ES5. Ignoring that dir is definitely not that useful; eslintignore should be the only place files can be ignored. |
Closing since this is making progress in babel/babel-eslint#594 |
This adds
parserOptions
to the transform result frombabel-core
. The intent here is to be able to run a no-op throughbabel.transform()
and get the resulting babylon options. These could then be used in something likebabel-eslint
to automatically have it configured based on the result of your babel plugins.