Skip to content

Commit fef514f

Browse files
feat(repo): add husky
1 parent a5f6ad1 commit fef514f

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.czrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "./node_modules/cz-conventional-changelog"
3+
}

.husky/commit-msg

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
npx --no -- commitlint --edit ${1}
1+
npx --no -- commitlint --edit $1

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
"copy": "npx cap copy",
1616
"update": "npx cap update",
1717
"sync": "npx cap sync",
18-
"prepare": "husky"
18+
"prepare": "husky",
19+
"pre-commit": "cz"
20+
},
21+
"hooks": {
22+
"prepare-commit-msg": "exec < /dev/tty && npx cz --hook || true"
1923
},
2024
"dependencies": {
2125
"@capacitor-community/admob": "^6.1.0",
@@ -33,6 +37,7 @@
3337
"@commitlint/config-conventional": "^19.6.0",
3438
"babel-plugin-transform-remove-console": "^6.9.4",
3539
"core-js": "^3.39.0",
40+
"cz-conventional-changelog": "^3.3.0",
3641
"husky": "^9.1.7",
3742
"typescript": "^5.7.2",
3843
"vite": "^5.4.2",

0 commit comments

Comments
 (0)