Files
tkmind_go/.husky/pre-commit
T
2025-05-29 12:29:21 -07:00

22 lines
656 B
Bash
Executable File

#!/usr/bin/env sh
# Only auto-format desktop TS code if relevant files are modified
if git diff --cached --name-only | grep -q "^ui/desktop/"; then
if [ -d "ui/desktop" ]; then
. "$(dirname -- "$0")/_/husky.sh"
cd ui/desktop && npx lint-staged
else
echo "Warning: ui/desktop directory does not exist, skipping lint-staged"
fi
fi
# Only auto-format ui-v2 TS code if relevant files are modified
if git diff --cached --name-only | grep -q "^ui-v2/"; then
if [ -d "ui-v2" ]; then
. "$(dirname -- "$0")/_/husky.sh"
cd ui-v2 && npx lint-staged
else
echo "Warning: ui-v2 directory does not exist, skipping lint-staged"
fi
fi