Add hermes-parser
as a supported parser for flow code
#13818
Labels
lang:flow
Issues affecting Flow-specific constructs (not general JS issues)
status:needs discussion
Issues needing discussion and a decision to be made before action can be taken
type:enhancement
A potential new feature to be added, or an improvement to how we print something
hermes
is a JavaScript engine optimized originally designed for react native usecases.hermes-parser
is wrapper around hermes' parser compiled to wasm and built to output EITHER a babel or estree compatible AST.Over the past year we on the flow team have been pushing to make
hermes-parser
the gold-standard for parsing flow code outside of flow itself. We've done so by switching our parsing cases away from alternatives (like babel/babel-eslint orflow-parser
) and ontohermes-parser
.At this point most of our web infra is powered by it - including prettier, eslint, and code transforms!
In July we decided to give
hermes-parser
a go in prettier. We did this via the below patch file used in conjunction withpatch-package
. For the past ~3 months internally at metahermes-parser
has been powering all prettier formatting on our largest codebase (>>>500k files). We have not (as of yet) found any issues - so I'm happy to call it working perfectly!Patch File used to patch support
cc @pieterv
The text was updated successfully, but these errors were encountered: