This repository contains a collection of codemod scripts for use with JSCodeshift.
npm install -g jscodeshiftgit clone https://github.com/nikgraf/js-codemod.gitjscodeshift -t <codemod-script> <file>- Use the
-doption for a dry-run and use-pto print the output for comparison
For development I recommend using the ASTExplorer e.g. http://astexplorer.net/#/Obk6NXAm1g
Special thanks to @cpojer for introducing me to codemods and helping out with getting started. Checkout his collection of codemods.