AST à la Vista, Baby
summary
Shows how to parse JavaScript into an AST using Babel/babylon, walk it with a visitor object, and perform concrete transforms such as converting object spread to Object.assign and turning template-tagged HTML into direct string operations. Demonstrates writing an ESLint-style rule to flag mutations, extracting i18n messages, and testing transforms with AST Explorer and jscodeshift, including exact helper calls, node types inspected, argument construction, and the generated output so the plugin runs.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:16Babel and ESLint
- 8:02AST in detail
- 16:15AST transformations in Babel
- 19:48Babel plugin creation
- 23:59AST exploration tools
- 25:04AST in JS tools
- 26:07AST use cases
- 28:19Summary
- 29:45Resources
related talks
43mJavaScript ❤ binary data
29mAST: the Secret Weapon to Transform a Codebase
31mThe Different Transformation Stages of AOT Compilers
28mMaster the art of the AST and take control of your JS
38mThe magical land of AST's with babel, eslint and codemods
44mJavaScript AST programming: Introduction and beyond
22mHow Linters, Compilers & Other Cool Things Work
26mMagical land of AST's with babel plugins
