benjamn/recast
View on GitHub ↗ ★ 5,257 TypeScript
JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator
8 mentions on Hacker News by 8 people: 1 story, 7 comments · first 2016-02-04 · latest 2024-06-16
20082026
-
…an AST (like how many newlines are after a particular stanza or function). Case in point: Recast ( https://github.com/benjamn/recast ) is of particular interest with regards to JS/TS in this vein, because it does preserve a lot of the…
comment by striking · 2024-06-16 · in Reformatting 100k Files at Google in 2011 -
…[3] https://github.com/acornjs/acorn [4] https://github.com/eslint/espree [5] https://github.com/benjamn/recast [6] https://github.com/facebook/jscodeshift [7] https://github.com/estools/escodegen
comment by kevlened · 2022-04-12 · in Show HN: Monocle – bidirectional code generation library -
This project is dead, but writing a Babel transform using something like https://github.com/benjamn/recast is easy and fun!
comment by hashkb · 2019-07-17 · in Sweet.js – Hygienic Macros for JavaScript -
…`jscodeshift` to support TypeScript, I think there would need to be some further work on `recast` ( https://github.com/benjamn/recast/issues/424 ). Hopefully the TypeScript team will continue to work closely with the Babel team, since this…
comment by lhnz · 2018-01-31 · in Announcing TypeScript 2.7 -
…Missing some style options, and not command line driven, but the general idea seems close: https://github.com/benjamn/recast/blob/master/README.md
comment by tyingq · 2017-04-13 · in Prettier 1.0 -
…in a consistent way (posted in https://news.ycombinator.com/item?id=13365470 ). We also have https://github.com/benjamn/recast to help source to source transformations and https://github.com/facebook/jscodeshift .
comment by hzoo · 2017-02-13 · in From AST to Lossless Syntax Tree -
…There are dedicated tools for this, such as https://github.com/millermedeiros/esformatter . [1]: https://github.com/benjamn/recast/blob/master/lib/options.js
comment by fkling · 2016-06-25 · in Write Code to Rewrite Your Code: jscodeshift