Transpilation / Transformation
Transforming JSX and React to ES5 using Babel
Slide 12
Slide 12 text
ES6 to ES5
Converting one AST to another AST
Slide 13
Slide 13 text
Linting / Static Code Analysis
Applying lint rules using ESLint
Slide 14
Slide 14 text
Formatting
Format code using Prettier
Works by compiling code to an AST, and then pretty-printing the AST
Slide 15
Slide 15 text
What Can You Do with ASTs?
Examples
1. Create your own Babel plugin
2. Write custom ESLint rules
3. Generate codemods to refactor code quickly
4. Analyze your code by looking into AST parse times
5. Build your own AST parser