Skip to content

Commit 95e407c

Browse files
committed
chore(git): update git hooks & husky
1 parent f08752e commit 95e407c

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.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+
npm run lint:fix

.husky/prepare-commit-msg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
if [ $2 == "template" ]; then
5+
exec </dev/tty && npx cz --hook || true
6+
fi

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"scripts": {
1212
"lint": "eslint --ext .js,.ts,.tsx .",
13-
"lint:fix": "eslint --fix .",
13+
"lint:fix": "eslint --ext .js,.ts,.tsx --fix .",
1414
"build": "rimraf dist && pnpm build:js",
1515
"build:ci": "npm run build:all",
1616
"build:all": "run-p -n build:js docs:build",
@@ -112,11 +112,5 @@
112112
},
113113
"publishConfig": {
114114
"access": "public"
115-
},
116-
"husky": {
117-
"hooks": {
118-
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
119-
"pre-commit": "npm run lint:fix && npm test"
120-
}
121115
}
122116
}

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)