Skip to content

Commit 50f9b06

Browse files
Tony133jmcdo29
authored andcommitted
chore(): fix husky script
1 parent 957d2f4 commit 50f9b06

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
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: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
4040
"test:e2e": "./setupPrismaDatabase.sh && pnpm prisma generate --schema apps/prisma-sample/prisma/schema.prisma && DATABASE_URL=postgres://postgres:postgres@localhost:5433/prisma nx run-many --target=e2e --all",
4141
"test:cov:total": "DATABASE_URL=postgres://postgres:postgres@localhost:5433/prisma jest -c jest.cov.js",
42-
"nx": "nx"
42+
"nx": "nx",
43+
"prepare": "husky install"
4344
},
4445
"dependencies": {
4546
"@nestjs/apollo": "10.1.3",
@@ -110,7 +111,7 @@
110111
"eslint": "^8.24.0",
111112
"eslint-config-prettier": "^8.1.0",
112113
"eslint-plugin-prettier": "^4.0.0",
113-
"husky": "^5.1.3",
114+
"husky": "8.0.1",
114115
"jest": "^27.5.1",
115116
"lint-staged": "^10.5.4",
116117
"nx": "^14.8.3",
@@ -125,12 +126,6 @@
125126
"typescript": "^4.7.4",
126127
"uuid": "^8.3.2"
127128
},
128-
"husky": {
129-
"hooks": {
130-
"pre-commit": "lint-staged",
131-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
132-
}
133-
},
134129
"lint-staged": {
135130
"*.ts": [
136131
"prettier --write",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)