Skip to content

Commit 4aa14b4

Browse files
committed
fix: filter pre-commit hook to formattable file types
1 parent d2f6baa commit 4aa14b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FILES=$(git diff --cached --name-only --diff-filter=ACMR)
1+
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(ts|js|json|html|css|scss)$' || true)
22
[ -z "$FILES" ] && exit 0
33
echo "$FILES" | xargs npx --no-install oxfmt
44
echo "$FILES" | xargs git add

0 commit comments

Comments
 (0)