From ca1a808700ee9302a5fc09e7e99f87f2768eb2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Arturo=20Cabral=20Mej=C3=ADa?= Date: Sun, 20 Nov 2022 12:27:34 -0500 Subject: [PATCH] chore: add husky hooks --- .husky/pre-commit | 6 ++++++ package.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..6846960 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run lint +npm run build:check +npm run test:unit diff --git a/package.json b/package.json index 4d4a113..7603b9a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "docker:integration:run": "docker compose -f ./test/integration/docker-compose.yml run --rm tests", "docker:test:integration": "npm run docker:integration:run -- npm run test:integration", "docker:cover:integration": "npm run docker:integration:run -- npm run cover:integration", - "postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down" + "postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down", + "prepare": "husky install" }, "repository": { "type": "git",