4 ms·
For JavaScript we have https://github.com/estree/estree https://github.com/estree/estree as our JS AST spec for parsers like esprima, acorn, babylon (under a co
by hzoo 10y ago
For JavaScript we have https://github.com/estree/estree https://github.com/estree/estree as our JS AST spec for parsers like esprima, acorn, babylon (under a config flag), etc.
JSCS (https://github.com/jscs-dev/node-jscs https://github.com/jscs-dev/node-jscs) (now merged with ESLint) started a CST project as well https://github.com/cst/cst https://github.com/cst/cst to help deal with autoformatting by adding whitespace type nodes.
Currently the community has a lot of interest in https://github.com/jlongster/prettier https://github.com/jlongster/prettier which just simply reprints the file from scratch in a consistent way (posted in https://news.ycombinator.com/item?id=13365470 https://news.ycombinator.com/item?id=13365470).
We also have https://github.com/benjamn/recast https://github.com/benjamn/recast to help source to source transformations and https://github.com/facebook/jscodeshift https://github.com/facebook/jscodeshift.