Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Get the current branch
branch="$(git rev-parse --abbrev-ref HEAD)"

case $branch in
# If the branch starts with "changeset-release/*", run `check:fix` to auto
# format code generated by changesets.
#
# Note: For better developer experience, format-on-save is handled by each
# individual's IDE. We run `check` on pre-push to ensure the code is
# formatted.
"changeset-release/"*)
pnpm check:fix
git add .
;;
esac