ente/.husky/pre-commit
2023-11-28 13:33:06 +05:30

12 lines
198 B
Bash
Executable file

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't commit directly to main branch"
exit 1
fi
npx lint-staged