Pass Babel AST to Prettier rather than re-parsing
Open
repl
- Dominant language
- TypeScript
- Stars
- 777
- Forks
- 1.4k
- Avg merge
- 16h 45m
- Merged PRs (30d)
- 3
Description
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.