-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
36 lines (33 loc) · 1.13 KB
/
lefthook.yml
File metadata and controls
36 lines (33 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Git hooks managed by Lefthook
# https://github.com/evilmartians/lefthook
# Pre-commit: auto-format staged files (never blocks commit)
pre-commit:
parallel: true
commands:
oxfmt:
glob: "*.{ts,tsx,js,jsx,json,jsonc,css,html}"
exclude: ".claude/**"
run: bunx oxfmt --write {staged_files}
stage_fixed: true
oxlint:
glob: "*.{ts,tsx,js,jsx}"
run: bunx oxlint -c .oxlintrc.json {staged_files}
# Pre-push: full lint check (blocks push on failure)
pre-push:
parallel: true
commands:
oxlint:
glob: "*.{ts,tsx,js,jsx}"
run: bunx oxlint -c .oxlintrc.json {push_files}
check-types:
run: bun check-types
# ============================================================================
# IMPORTANT: If this hook fails and you need to bypass it:
#
# DO NOT use `git push --no-verify` without asking first!
#
# If you're working with Claude Code, use the AskUserQuestion tool
# to get explicit permission before skipping hooks.
#
# Hooks exist to catch issues early - bypassing should be rare and intentional.
# ============================================================================