Skip to content

Commit 7e8301c

Browse files
nearestnaborsclaude
andcommitted
Add pre-commit hook for auto-formatting
- Add .hooks/pre-commit that runs bun format and check - Add prepare script to auto-install hooks on bun install - Teammates get hooks automatically when they install dependencies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3def8c7 commit 7e8301c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.hooks/pre-commit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
# Pre-commit hook: auto-fix lint/format issues before committing
3+
4+
# Run Biome format (auto-fixes issues)
5+
bun run format
6+
7+
# Stage any files that were auto-fixed
8+
git add -u
9+
10+
# Run check to catch any remaining errors that can't be auto-fixed
11+
bun run check

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"assa-mcp": "./dist/index.js"
1111
},
1212
"scripts": {
13+
"prepare": "cp .hooks/* .git/hooks/ && chmod +x .git/hooks/*",
1314
"dev": "tsx watch src/index.ts",
1415
"build:ui": "rm -rf dist/ui && mkdir -p dist/ui && VITE_APP=auth-button vite build && VITE_APP=tweet-preview vite build && VITE_APP=conversation-list vite build",
1516
"build:server": "tsc",

0 commit comments

Comments
 (0)