Always use Babylon for TypeScript and Flow
See original GitHub issueRemove the TypeScript and Flow parsers, and add a --language typescript
option that enables Babylon’s TypeScript option and disables its Flow option.
From https://github.com/prettier/prettier/issues/3503#issuecomment-359863688
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Babylon js typescript to flow - Questions
I've used babylon.d.ts to generate another library using ts-morph ( dsherret/ts-morph: TypeScript Compiler API wrapper for static analysis and ...
Read more >babel/parser
The Babel parser (previously Babylon) is a JavaScript parser used in Babel. ... Support for JSX, Flow, Typescript. ... When in doubt, use...
Read more >Options - Prettier
In other words, don't try to use printWidth as if it was ESLint's max-len ... TypeScript, and Flow because the distinction between string...
Read more >@babel/preset-typescript | Yarn - Package Manager
(@danez); #9132 Ensure we always use repository versions of babel dependencies in tests. (@danez); #9131 Update issue templates [skip ci]. (@hzoo).
Read more >Why We Chose Typescript - Hacker News
If you want runtime assertions with flow you can use flow-runtime [0]. Babylon merged TypeScript support yesterday [1].
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We could also create
@prettier/plugin-typescript-eslint-parser
and@prettier/plugin-flow-parser
packages to give people an alternative if they encounter bugs in Babylon’s implementation.I don’t think that is a valuable trade-off compared to TypeScript features getting to users sooner