diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..c9cdc63 --- /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 100755 index 0000000..6e0690f --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,3 @@ +#!/bin/sh + +npx --no-install commitlint --edit "${1}" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..51e52de --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,3 @@ +#!/bin/sh + +npx --no-install lint-staged diff --git a/package.json b/package.json index b70a97a..e45afd5 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "private": true, "main": "run.js", "scripts": { + "postinstall": "husky install", "test": "NODE_PATH=./node_modules jest", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "lint": "eslint --ignore-path .gitignore ." @@ -57,11 +58,5 @@ "standard-version": "^9.1.0", "testdouble": "^3.16.1", "yaml": "^1.10.0" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } } }