Skip to content

Commit ac46695

Browse files
committed
Add husky pre-push hook for linting
1 parent 7e80b2d commit ac46695

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn test

.husky/pre-push

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+
yarn lint

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"license": "MIT",
99
"private": true,
1010
"scripts": {
11-
"lint": "biome check --write ."
11+
"lint": "biome check --write .",
12+
"prepare": "husky"
1213
},
1314
"dependencies": {},
1415
"devDependencies": {
15-
"@biomejs/biome": "^2.0.6"
16+
"@biomejs/biome": "^2.0.6",
17+
"husky": "^9.1.7"
1618
}
1719
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@
5555
version "2.0.6"
5656
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.6.tgz#53acf543060bfda18853dfa81b34e6e95fb545a5"
5757
integrity sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw==
58+
59+
husky@^9.1.7:
60+
version "9.1.7"
61+
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
62+
integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==

0 commit comments

Comments
 (0)