Skip to content

Commit

Permalink
Husky: only pre-lint staged files, and only check
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Jan 30, 2024
1 parent a343874 commit 34e9609
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

. "$(dirname -- "$0")/_/husky.sh"

echo "Fixing changed files with lint violations..."
echo "*** Checking for lint violations in changed files ***************"
echo

yarn prettier --write --ignore-unknown $(git diff "$(git merge-base main HEAD)" --name-only --diff-filter=d) || exit $?
yarn prettier --check --ignore-unknown $(git diff --cached "$(git merge-base main HEAD)" --name-only --diff-filter=d) || exit $?

echo
echo "Auditing dependencies..."
echo "*** Auditing dependencies ***************"
echo

yarn audit || exit $?

Expand Down

0 comments on commit 34e9609

Please sign in to comment.