chore: add pre-commit hooks with lint-staged (#1465)
Co-authored-by: cpacker <packercharles@gmail.com> Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
8
.husky/install.mjs
Normal file
8
.husky/install.mjs
Normal file
@@ -0,0 +1,8 @@
|
||||
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
try {
|
||||
const husky = (await import("husky")).default;
|
||||
husky();
|
||||
} catch {}
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
# Run the same checks as CI to ensure parity
|
||||
bun run check
|
||||
|
||||
# Lint staged files only (fast)
|
||||
bunx lint-staged
|
||||
|
||||
# Typecheck full project (catches type errors in unchanged files)
|
||||
bun run typecheck
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "node .husky/install.mjs",
|
||||
"lint": "bunx --bun @biomejs/biome@2.2.5 check src",
|
||||
"fix": "bunx --bun @biomejs/biome@2.2.5 check --write src",
|
||||
"typecheck": "tsc --noEmit",
|
||||
|
||||
Reference in New Issue
Block a user