From c1710709c7c57baf13add73fc34b6aabbf7d9029 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Tue, 24 Oct 2023 10:12:32 +0200 Subject: [PATCH] Align git hooks and order checks (#1258) Update git hooks as defined with husky so that: - different hooks check similar things - command ordering makes more semantic sense --- script/hooks/pre-commit | 8 +++++--- script/hooks/pre-push | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/script/hooks/pre-commit b/script/hooks/pre-commit index d68e66b8d..70be90c86 100755 --- a/script/hooks/pre-commit +++ b/script/hooks/pre-commit @@ -9,16 +9,18 @@ if [ -z "$(IS_MERGING)" ]; then fi # Checks -npm run vet npm run license-check npm run lint -npm run format -git update-index --again +npm run transpile +npm run vet if command -v gitleaks > /dev/null; then gitleaks protect fi +npm run format +git update-index --again + # Post if [ -n "$(DID_STASH)" ]; then git stash pop --quiet diff --git a/script/hooks/pre-push b/script/hooks/pre-push index 9e971418d..d39fe7870 100755 --- a/script/hooks/pre-push +++ b/script/hooks/pre-push @@ -8,11 +8,12 @@ if [ -z "$(IS_MERGING)" ]; then fi # Checks -npm run license-check npm run format:check +npm run license-check npm run lint npm run test:unit npm run transpile +npm run vet if command -v gitleaks > /dev/null; then gitleaks protect