ulthar-framework/.husky/pre-commit

9 lines
176 B
Plaintext

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