Commit 816f964c authored by Derek Knox's avatar Derek Knox
Browse files

Add new file

parent 65274546
# Code Transformation and Linting by Kent C. Dodds
- Codemods can automate transpilation upgrades of framework versions, API refactors, language versions, etc.
- As opposed to created custom regex to update a codebase, a codemod may exist to automate the process
- JavaScript AST visualizers
- Tree & Json =
- Node Graph =
- The "Transform" toggle allows real-time transpiling/conversion of the source to a target output
- When creating an eslint rule (use you simply define a method name that matches the AST node types of interest. This way you query via their API (and the Visitor pattern) without manually having to do so. For example:
create(context) {
return {
IfStatement(node) { // `IfStatement` allows you the hook into the AST for all nodes of that type
- eslint plugin dev uses a `node` object where babel dev uses a rich `path` object that has a `node` object
- `jscodeshift` is a CLI tool for running codemods []( for a rich and automated find/replace/refactor over a codebase, files, or file
- ASTs enable mass transformation with greater ease and power
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment