2020-03-23 20:21:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-05-12 13:18:33 +00:00
|
|
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
2020-03-23 20:21:15 +00:00
|
|
|
|
|
|
|
# Prettify all selected files
|
2020-05-12 13:18:33 +00:00
|
|
|
cd $(git rev-parse --show-toplevel)/smart-hut
|
|
|
|
npm run eslint-fix
|
|
|
|
cd ..
|
2020-03-23 20:21:15 +00:00
|
|
|
|
|
|
|
# Add back the modified/prettified files to staging
|
|
|
|
echo "$FILES" | xargs git add
|
|
|
|
|
|
|
|
exit 0
|