Skip to content

Switch from pre-push to pre-commit

Frank Tackitt requested to merge kageurufu/exosphere:pre-commit into master

Overview

This changes husky from pre-push to pre-commit.

I feel this improves the developer experience, failing faster when changes are broken instead of waiting until you think you're done and go to push.

I placed the "autostash" functionality in a .husky/_/common.sh file to allow reuse in future hooks as well (commit-msg if we add commitlint, etc)

This will also be useful for #878 (closed)

How to Test

Make some changes, stage them, and run git commit

Your changes should be tested, and any unstaged changes should be ignored and restored after the pre-commit hook runs

Screenshots

N/A

Edited by Frank Tackitt

Merge request reports