Created
August 12, 2016 10:06
-
-
Save SebastienElet/ae4d2f37d09a8e18a55b97864b590609 to your computer and use it in GitHub Desktop.
es5-to-es6.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CODEMOD_PATH="/tmp/js-codemod" | |
npm i -g eslint jscodeshift | |
git clone https://github.com/cpojer/js-codemod.git | |
# Run eslint fix | |
npm run cli eslint --fix "$1" | |
# Run es6 codemod | |
for codemod in no-vars template-literals object-shorthand unchain-variables unquote-properties updated-computed-props; | |
do | |
jscodeshift -t $CODEMOD_PATH/$codemod.js "$1" | |
done | |
jscodeshift -t $CODEMOD_PATH/arrow-function.js --inline-single-expressions=true "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment