maggioni.xyz/hooks/pre-commit

10 lines
169 B
Text
Raw Normal View History

#!/bin/sh
2021-02-03 12:09:30 +00:00
files="`git diff --staged --name-only --diff-filter=ACMR | tr \"\\n\" \" \"`"
for f in $files; do
$(npm bin)/prettier --write "$f"
git add -f "$f"
done