Skip to content

Commit

Permalink
🧑‍💻 use husky for pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Jan 21, 2025
1 parent 04687c7 commit 90c691c
Show file tree
Hide file tree
Showing 5 changed files with 736 additions and 62 deletions.
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bash <<EOF
if [[ "$(git branch --show-current)" == "main" ]]; then
echo "❌ Do not commit to the main branch" >&2
exit 0
fi
EOF

npx lint-staged
36 changes: 0 additions & 36 deletions .pre-commit-config.yaml

This file was deleted.

Loading

0 comments on commit 90c691c

Please sign in to comment.