diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 000000000..31354ec13 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 000000000..d71a03b9f --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d2ae35e84 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/package.json b/package.json index 066f6cc19..e48da6902 100644 --- a/package.json +++ b/package.json @@ -49,12 +49,6 @@ "git add" ] }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, "scripts": { "test": "yarn --cwd packages/mongodb-memory-server-core run test", "lint": "lerna run lint --stream --npm-client=yarn --no-prefix", @@ -64,6 +58,6 @@ "build": "tsc --build tsconfig.build.json", "semantic-release": "semantic-release", "readme:toc": "doctoc ./README.md", - "postinstall": "yarn build" + "postinstall": "husky install" } }