Skip to content

Commit 435bd39

Browse files
committed
chore: added husky pre commit hook
1 parent 53b2934 commit 435bd39

File tree

4 files changed

+542
-1666
lines changed

4 files changed

+542
-1666
lines changed

.husky/pre-commit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
echo "⏳ Running pre-commit hook..."
5+
6+
pnpm lint
7+
# pnpm test
8+
9+
echo "✅ Done running pre-commit hook."
10+
11+
exit 0

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@
4141
"lint": "exec prettier . --write",
4242
"package": "pnpm build && pnpm pack",
4343
"publish:pkg": "pnpm build && pnpm publish --access public",
44-
"publish:dev": "pnpm build && npm link"
44+
"publish:dev": "pnpm build && npm link",
45+
"prepare": "husky"
4546
},
4647
"devDependencies": {
4748
"@changesets/cli": "^2.27.1",
4849
"@types/node": "18.15.5",
4950
"dotenv": "16.0.3",
51+
"husky": "^9.0.11",
5052
"prettier": "2.8.6",
5153
"tsup": "8.0.1",
5254
"typescript": "^5.0.2"

0 commit comments

Comments
 (0)