mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-24 10:47:28 +01:00
ci: Migrate husky from v4 to v5
This commit is contained in:
2
.husky/post-merge
Normal file
2
.husky/post-merge
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
(git diff 'HEAD@{1}' --name-only | grep 'package-lock.json' > /dev/null) && npm ci || :
|
||||||
|
git remote prune origin
|
||||||
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
@@ -0,0 +1 @@
|
|||||||
|
npx lint-staged
|
||||||
10
package.json
10
package.json
@@ -16,15 +16,7 @@
|
|||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --write **/*.ts",
|
||||||
"format:check": "prettier --check **/*.ts",
|
"format:check": "prettier --check **/*.ts",
|
||||||
"release": "standard-version",
|
"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"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"{src,__tests__}/**/*.ts": [
|
"{src,__tests__}/**/*.ts": [
|
||||||
|
|||||||
Reference in New Issue
Block a user