Skip to content

Commit e5b6bed

Browse files
Merge pull request #1104 from Tony133/chore/fix-husky-script
chore(): fix husky script
2 parents 6099eff + 523bb6f commit e5b6bed

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
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 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 lint-staged

package.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"prepublish:npm": "npm run build",
1616
"publish:npm": "npm publish --access public",
1717
"prerelease": "npm run build",
18-
"release": "release-it"
18+
"release": "release-it",
19+
"prepare": "husky install"
1920
},
2021
"peerDependencies": {
2122
"@nestjs/common": "^8.0.0 || ^9.0.0"
@@ -47,15 +48,7 @@
4748
"jsonwebtoken": "8.5.1"
4849
},
4950
"lint-staged": {
50-
"*.ts": [
51-
"prettier --write"
52-
]
53-
},
54-
"husky": {
55-
"hooks": {
56-
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS",
57-
"pre-commit": "lint-staged"
58-
}
51+
"**/*.{ts,json}": []
5952
},
6053
"repository": {
6154
"type": "git",

0 commit comments

Comments
 (0)