Skip to content

chore: update husky config #998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install pretty-quick --staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint && npm run test
12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"lint:fix": "ng lint --fix hypertrace-ui",
"prettier:check": "prettier --check '**'",
"test:ci": "ng test hypertrace-ui --maxWorkers=2 --ci --coverage",
"docs": "compodoc -p tsconfig.json"
"docs": "compodoc -p tsconfig.json",
"prepare": "husky install"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -95,7 +96,7 @@
"codelyzer": "^6.0.2",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"husky": "^7.0.1",
"husky": "^7.0.0",
"jest": "^26.6.3",
"jest-config": "^27.0.4",
"jest-html-reporter": "^3.4.1",
Expand All @@ -121,12 +122,5 @@
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"pre-push": "npm run lint && npm run test",
"pre-commit": "pretty-quick --staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}