Skip to content

Commit 9404bc0

Browse files
committed
chore(): update husky script
1 parent af42193 commit 9404bc0

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-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+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

package-lock.json

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

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"test": "npm run clean && NODE_ENV=test jest -w 1 --no-cache --config jest.json",
2424
"test:dev": "NODE_ENV=test npm run -s test -- --watchAll",
2525
"prerelease": "npm run build",
26-
"release": "release-it"
26+
"release": "release-it",
27+
"prepare": "husky install"
2728
},
2829
"repository": {
2930
"type": "git",
@@ -72,11 +73,6 @@
7273
"typescript": "^3.4.5 || ^4.3.5"
7374
},
7475
"schematics": "./dist/collection.json",
75-
"husky": {
76-
"hooks": {
77-
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
78-
}
79-
},
8076
"nyc": {
8177
"include": [
8278
"src"

0 commit comments

Comments
 (0)