diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000..7fcbabb2 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx commitlint --edit "" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..36af2198 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/.huskyrc.yml b/.huskyrc.yml deleted file mode 100644 index d47ff17b..00000000 --- a/.huskyrc.yml +++ /dev/null @@ -1,3 +0,0 @@ -hooks: - pre-commit: lint-staged - commit-msg: commitlint -E HUSKY_GIT_PARAMS diff --git a/package.json b/package.json index 794d733b..6995c6a0 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "clean": "rm -rf ./dist", "pretest": "npm run lint", "test": "jest --passWithNoTests", - "lint": "eslint ." + "lint": "eslint .", + "prepare": "husky install" }, "repository": { "type": "git", @@ -40,8 +41,8 @@ "typescript" ], "devDependencies": { - "@commitlint/cli": "^9.1.1", - "@commitlint/config-conventional": "^9.1.1", + "@commitlint/cli": "^13.2.0", + "@commitlint/config-conventional": "^13.2.0", "@types/archiver": "^5.1.1", "@types/fs-extra": "^9.0.1", "@types/jest": "^26.0.14", @@ -51,7 +52,7 @@ "@typescript-eslint/eslint-plugin": "^4.2.0", "@typescript-eslint/parser": "^4.2.0", "eslint": "^7.9.0", - "husky": "^4.2.5", + "husky": "^7.0.2", "jest": "^26.4.2", "lint-staged": "^11.1.2", "mock-fs": "^4.12.0",