Created
July 23, 2017 05:31
-
-
Save AvraamMavridis/21852ccc92c031c5ea831418918e8b04 to your computer and use it in GitHub Desktop.
prt.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
for f in $(git diff --name-only); do | |
if [ ${f: -3} == '.js' ] || [ ${f: -4} == '.jsx' ]; then | |
$(npm bin)/prettier $f --print-width=120 --single-quote --write | |
$(npm bin)/eslint --fix $f | |
fi | |
if [ ${f: -5} == '.scss' ]; then | |
$(npm bin)/prettier $f --print-width=120 --single-quote --write | |
$(npm bin)/cssdeclsort $f | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment