This repository is an use case set up for the article:
It shows how to work with jscodeshift.
You can find:
src/HelloWorld.js: Source filecodemod/transform.js: Codemod
yarn
# or
npm installTransform the code runing:
npx jscodeshift -t codemod/transform.js src/HelloWorld.js-t codemod/refactor.jsis for the path to the transformation file.src/HelloWorld.jsis the file we want to transform (you can use)
Tada, your file has been transformed 🎉