ente/.husky/pre-commit

12 lines
198 B
Plaintext
Raw Normal View History

2022-06-14 06:18:30 +00:00
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
2023-11-28 08:03:06 +00:00
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't commit directly to main branch"
exit 1
fi
2022-06-14 06:18:30 +00:00
npx lint-staged