maggioni.xyz/hooks/pre-commit
Claudio Maggioni (maggicl) 6bcd6b927b Fixed beautifier
2021-02-03 13:09:30 +01:00

9 lines
169 B
Bash
Executable file

#!/bin/sh
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