diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 00000000..c9cdc63b --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ \ No newline at end of file diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 00000000..2bc97f07 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..41ae0d5c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --no lint-staged diff --git a/package.json b/package.json index 0310f2eb..c22189fb 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "prerelease": "npm run build", "release": "release-it", "test:e2e": "jest --config ./tests/jest-e2e.json --runInBand", - "test:e2e:dev": "jest --config ./tests/jest-e2e.json --runInBand --watch" + "test:e2e:dev": "jest --config ./tests/jest-e2e.json --runInBand --watch", + "prepare": "husky install" }, "devDependencies": { "@commitlint/cli": "17.1.2", @@ -55,14 +56,6 @@ "rxjs": "^7.0.0" }, "lint-staged": { - "*.ts": [ - "prettier --write" - ] - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS" - } + "**/*.{ts,json}": [] } }