0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-11 05:39:10 +00:00
renovatebot_renovate/.husky/pre-commit
renovate[bot] b5d1f03845
chore(deps): update dependency husky to v9 (#27114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-02-07 13:16:16 +00:00

19 lines
512 B
Bash
Executable file

#!/bin/sh
pnpm ls-lint
BRANCH_NAME=$(git branch --show-current)
if [ "$BRANCH_NAME" = "main" ]; then
echo
echo "Aborting commit."
echo "You're committing to the main branch, usually this is not what you want to do."
echo "Did you forget to make a new feature branch to put your work on?"
echo
echo "Use git checkout -b <new_branch> to create a new feature branch."
echo
echo "If you're sure you want to commit to the main branch, run git commit with the --no-verify flag."
echo
exit 1
fi