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