From de95acd352620e64bec03dc8478bb6f2a15cd573 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 15 Apr 2024 08:47:32 +0200 Subject: [PATCH] feat: add pre-push hook --- .husky/pre-commit | 6 +++++- .husky/pre-push | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .husky/pre-push diff --git a/.husky/pre-commit b/.husky/pre-commit index 80b6cdb..da759d5 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,5 @@ -npm run lint:affected +#!/bin/bash + +if [ -z "$HUSKY_HOOK" ] || [ "$HUSKY_HOOK" = "pre-commit" ]; then + npm run lint:affected +fi diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 0000000..63a7e85 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ "$HUSKY_HOOK" = "pre-push" ]; then + npm run lint:affected +fi