Files
openclaw/git-hooks/pre-commit
2026-02-12 09:44:30 +09:00

10 lines
255 B
Bash
Executable File

#!/bin/sh
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0
echo "$FILES" | xargs pnpm lint --fix
echo "$FILES" | xargs pnpm format --no-error-on-unmatched-pattern
echo "$FILES" | xargs git add
exit 0