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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Babel AST to Prettier rather than re-parsing #1312

Open
bvaughn opened this issue Aug 14, 2017 · 0 comments
Open

Pass Babel AST to Prettier rather than re-parsing #1312

bvaughn opened this issue Aug 14, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Aug 14, 2017

See TODO comments in js/repl/src/compile.

It would be more efficient to pass Prettier the AST Babel has already created. However we can't do this until we upgrade to Babel 7 (since that's what Prettier uses).

It also seems suboptimal that Prettier only exposes this functionality behind a __debug property (prettier.__debug.formatAST). Maybe we could reach out to the Prettier team about a more formal API for this?

This is a follow-up item for PR #1297

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

No branches or pull requests

3 participants