Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing parser options #316

Closed
jquense opened this issue Dec 17, 2018 · 1 comment
Closed

Allow passing parser options #316

jquense opened this issue Dec 17, 2018 · 1 comment

Comments

@jquense
Copy link
Collaborator

jquense commented Dec 17, 2018

Hey there 馃憢 Wondering if you'd be open to allowing babel/parser options to be passed through or respect the local babelrc. I'd love to write a typescript handler for react-docgen built off the v7 TS support but at the moment that's not as easy as it could be because the parser is defaulted to flow.

@danez
Copy link
Collaborator

danez commented Jan 25, 2019

The best option would be to use

require('@babel/core').parse(...)

As this will pickup the babel configuration that is present in the project. With some sane fallback config (basically what we have right now).
Exposing the config would be good I guess, I think I already do it for the decorators plugin.

Typescript support would be awesome.

@danez danez closed this as completed Apr 13, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
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

2 participants