Skip to content

Commit 4d00dda

Browse files
Merge pull request #2305 from Tony133/chore/update-husky
chore(): update husky scripts
2 parents a35eec4 + f0ced30 commit 4d00dda

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.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 lint-staged

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"lint": "ng lint",
1717
"e2e": "ng e2e",
1818
"docs": "npm run docs-only",
19-
"docs-only": "ts-node -P tools/tsconfig.json tools/dgeni-cli.ts tools/transforms/nestjs-package/index"
19+
"docs-only": "ts-node -P tools/tsconfig.json tools/dgeni-cli.ts tools/transforms/nestjs-package/index",
20+
"prepare": "husky install"
2021
},
2122
"private": true,
2223
"dependencies": {
@@ -76,10 +77,5 @@
7677
"typescript": "4.6.3",
7778
"uuid": "8.3.2",
7879
"yargs": "17.4.0"
79-
},
80-
"husky": {
81-
"hooks": {
82-
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
83-
}
8480
}
8581
}

0 commit comments

Comments
 (0)