ASTs, or abstract syntax trees, are tree-like representations of your code. Once your code is represented as an abstract syntax tree, you can perform all sorts of tasks on it, such as analyzing your code for problems or transforming it. It fact, many tools that you use today, such as Babel, Prettier and ESLint leverage ASTs to perform their work.
In this talk, I’ll talk about what ASTs are, and we’ll look at some examples using AST Explorer. Additionally, I’ll show how you can use jscodeshift and recast to automate code changes on your existing code base, including examples that I have done on my own code base. Why take hours performing tedious and error-prone manual changes, when you can automate them in minutes?
I am a principal engineer at Jane.com. Although I've worked in several languages, my current passion is JavaScript. I love learning, sharing what I learn, and trying to write clean, well-tested code. I'm only doing this until my comedy career takes off.