Skip to content

Commit 20c1136

Browse files
chore: update husky config
1 parent e61e612 commit 20c1136

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install pretty-quick --staged

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint && npm run test

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"lint:fix": "ng lint --fix hypertrace-ui",
2121
"prettier:check": "prettier --check '**'",
2222
"test:ci": "ng test hypertrace-ui --maxWorkers=2 --ci --coverage",
23-
"docs": "compodoc -p tsconfig.json"
23+
"docs": "compodoc -p tsconfig.json",
24+
"prepare": "husky install"
2425
},
2526
"private": true,
2627
"dependencies": {
@@ -95,7 +96,7 @@
9596
"codelyzer": "^6.0.2",
9697
"commitizen": "^4.2.4",
9798
"cz-conventional-changelog": "^3.3.0",
98-
"husky": "^7.0.1",
99+
"husky": "^7.0.0",
99100
"jest": "^26.6.3",
100101
"jest-config": "^27.0.4",
101102
"jest-html-reporter": "^3.4.1",
@@ -121,12 +122,5 @@
121122
"extends": [
122123
"@commitlint/config-conventional"
123124
]
124-
},
125-
"husky": {
126-
"hooks": {
127-
"pre-push": "npm run lint && npm run test",
128-
"pre-commit": "pretty-quick --staged",
129-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
130-
}
131125
}
132126
}

0 commit comments

Comments
 (0)