Skip to content
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

chore(): fix husky script #1104

Merged
merged 3 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --no-install option is deprecated, and will be converted to --no.

https://docs.npmjs.com/cli/v7/commands/npx

kamilmysliwiec marked this conversation as resolved.
Show resolved Hide resolved
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 lint-staged
kamilmysliwiec marked this conversation as resolved.
Show resolved Hide resolved
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"prepublish:npm": "npm run build",
"publish:npm": "npm publish --access public",
"prerelease": "npm run build",
"release": "release-it"
"release": "release-it",
"prepare": "husky install"
},
"peerDependencies": {
"@nestjs/common": "^8.0.0 || ^9.0.0"
Expand Down Expand Up @@ -47,15 +48,7 @@
"jsonwebtoken": "8.5.1"
},
"lint-staged": {
"*.ts": [
"prettier --write"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
"**/*.{ts,json}": []
},
"repository": {
"type": "git",
Expand Down