mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: setup husky properly (#7727)
This change addresses breaking changes that happened in husky which, as a result, didn't run properly since the update. Closes #7726
This commit is contained in:
parent
5b792de7a9
commit
8b712e7b64
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no-install commitlint --edit "$1"
|
4
.husky/pre-comit
Executable file
4
.husky/pre-comit
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npm run eslint
|
4
.husky/pre-push
Executable file
4
.husky/pre-push
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npm run tsc && npm run eslint && npm run doc && npm run ensure-pinned-deps
|
@ -17,7 +17,7 @@
|
|||||||
"assert-unit-coverage": "cross-env COVERAGE=1 mocha --config mocha-config/coverage-tests.js",
|
"assert-unit-coverage": "cross-env COVERAGE=1 mocha --config mocha-config/coverage-tests.js",
|
||||||
"funit": "cross-env PUPPETEER_PRODUCT=firefox npm run unit",
|
"funit": "cross-env PUPPETEER_PRODUCT=firefox npm run unit",
|
||||||
"test": "npm run tsc && npm run lint --silent && npm run unit-with-coverage && npm run test-browser",
|
"test": "npm run tsc && npm run lint --silent && npm run unit-with-coverage && npm run test-browser",
|
||||||
"prepare": "node typescript-if-required.js",
|
"prepare": "node typescript-if-required.js && husky install",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"dev-install": "npm run tsc && node install.js",
|
"dev-install": "npm run tsc && node install.js",
|
||||||
"install": "node install.js",
|
"install": "node install.js",
|
||||||
@ -113,12 +113,5 @@
|
|||||||
"text-diff": "1.0.1",
|
"text-diff": "1.0.1",
|
||||||
"ts-node": "10.3.0",
|
"ts-node": "10.3.0",
|
||||||
"typescript": "4.4.4"
|
"typescript": "4.4.4"
|
||||||
},
|
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "npm run eslint",
|
|
||||||
"commit-msg": "commitlint --env HUSKY_GIT_PARAMS",
|
|
||||||
"pre-push": "npm run tsc && npm run eslint && npm run doc && npm run ensure-pinned-deps"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user