From 90752e1e7aa4388644fda13501c96288f998705c Mon Sep 17 00:00:00 2001 From: Tony133 Date: Mon, 3 Oct 2022 22:03:55 +0200 Subject: [PATCH] chore(): fix husky script --- .husky/.gitignore | 1 + .husky/commit-msg | 4 ++++ .husky/pre-commit | 4 ++++ package.json | 13 +++---------- 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 .husky/.gitignore create mode 100644 .husky/commit-msg create mode 100644 .husky/pre-commit 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}": [] } }