Files
renovate/.husky/pre-commit
Michael Kriese 235cc20955 chore: run more linter on pre-commit (#41482)
* chore: run more linter on pre-commit

* chore: enable prettier experimental cli

* chore: run oxlint

* chore: simplify

* ci: fix prettier
2026-02-25 14:08:18 +00:00

23 lines
555 B
Bash
Executable File

#!/bin/sh
export PRETTIER_EXPERIMENTAL_CLI=1
ls-lint
lint-staged
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