Navigation Menu

Skip to content

Commit

Permalink
fix: setup husky properly (#7727)
Browse files Browse the repository at this point in the history
This change addresses breaking changes that happened in husky which, as a result, didn't run properly since the update.
Closes #7726
  • Loading branch information
jschfflr committed Oct 27, 2021
1 parent 5b792de commit 8b712e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-comit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run eslint
4 changes: 4 additions & 0 deletions .husky/pre-push
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run tsc && npm run eslint && npm run doc && npm run ensure-pinned-deps
9 changes: 1 addition & 8 deletions package.json
Expand Up @@ -17,7 +17,7 @@
"assert-unit-coverage": "cross-env COVERAGE=1 mocha --config mocha-config/coverage-tests.js",
"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",
"prepare": "node typescript-if-required.js",
"prepare": "node typescript-if-required.js && husky install",
"prepublishOnly": "npm run build",
"dev-install": "npm run tsc && node install.js",
"install": "node install.js",
Expand Down Expand Up @@ -113,12 +113,5 @@
"text-diff": "1.0.1",
"ts-node": "10.3.0",
"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"
}
}
}

0 comments on commit 8b712e7

Please sign in to comment.