From 902ad943770e61cc6934bae05159169c8b0eaf06 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Tue, 2 Mar 2021 19:52:38 -0800 Subject: [PATCH] chore: husky 5 --- .husky/.gitignore | 1 + .husky/pre-commit | 4 ++++ package.json | 11 +++-------- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/pre-commit 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/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..36af21989 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/package.json b/package.json index 929f6a64a..2f1c59390 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "setup": "npm run clean && npm install", "setup:yarn": "yarn run clean && yarn", "setup:pnpm": "pnpm run clean && pnpm install", - "postinstall": "ts-patch install && nx run core:setup", + "postinstall": "ts-patch install && husky install && nx run core:setup", "start": "nps", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" }, @@ -44,9 +44,9 @@ "eslint-config-prettier": "~6.11.0", "eslint-plugin-prettier": "^3.3.1", "gonzales": "^1.0.7", - "husky": "^4.2.5", + "husky": "^5.1.3", "jest": "~26.2.2", - "lint-staged": "^10.2.11", + "lint-staged": "^10.5.0", "mocha": "^8.0.1", "mocha-typescript": "^1.1.17", "module-alias": "^2.2.2", @@ -67,11 +67,6 @@ "webpack": "~4.44.1", "webpack-cli": "~3.3.12" }, - "husky": { - "hooks": { - "pre-commit": "npx lint-staged" - } - }, "lint-staged": { "**/*": [ "nx format:write --files"