From 47a5b8c83418c019949fa830ef42017018ae45cf Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Tue, 9 Feb 2021 19:23:10 +0900 Subject: [PATCH] ci: Migrate husky from v4 to v5 --- .husky/post-merge | 2 ++ .husky/pre-commit | 1 + package.json | 10 +--------- 3 files changed, 4 insertions(+), 9 deletions(-) create mode 100644 .husky/post-merge create mode 100644 .husky/pre-commit diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100644 index 0000000..b73a718 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,2 @@ +(git diff 'HEAD@{1}' --name-only | grep 'package-lock.json' > /dev/null) && npm ci || : +git remote prune origin diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..2312dc5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/package.json b/package.json index c597857..9ee8f64 100644 --- a/package.json +++ b/package.json @@ -16,15 +16,7 @@ "tsc": "tsc", "format": "prettier --write **/*.ts", "format:check": "prettier --check **/*.ts", - "release": "standard-version", - "update-deps": "(git diff 'HEAD@{1}' --name-only | grep 'package-lock.json' > /dev/null) && npm ci || :" - }, - "husky": { - "skipCI": true, - "hooks": { - "pre-commit": "lint-staged", - "post-merge": "npm run update-deps; git remote prune origin" - } + "release": "standard-version" }, "lint-staged": { "{src,__tests__}/**/*.ts": [