Skip to content

Commit 6d89961

Browse files
committed
chore: husky precommit hook
1 parent aae5de2 commit 6d89961

File tree

3 files changed

+443
-14
lines changed

3 files changed

+443
-14
lines changed

.husky/pre-commit

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 lint-staged

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"lint": "biome check",
1111
"format": "biome format --write",
1212
"test": "vitest",
13-
"type-check": "tsc --noEmit"
13+
"type-check": "tsc --noEmit",
14+
"prepare": "husky"
1415
},
1516
"dependencies": {
1617
"next": "16.0.3",
@@ -27,10 +28,17 @@
2728
"@types/react-dom": "^19",
2829
"@vitejs/plugin-react": "^5.1.1",
2930
"babel-plugin-react-compiler": "1.0.0",
31+
"husky": "^9.1.7",
3032
"jsdom": "^27.2.0",
33+
"lint-staged": "^15.2.11",
3134
"tailwindcss": "^4",
3235
"typescript": "^5",
3336
"vite-tsconfig-paths": "^5.1.4",
3437
"vitest": "^4.0.8"
38+
},
39+
"lint-staged": {
40+
"*.{ts,tsx,js,jsx,json,css}": [
41+
"biome check --write --no-errors-on-unmatched"
42+
]
3543
}
3644
}

0 commit comments

Comments
 (0)