Repository navigation
Expand file tree
/
Copy pathlefthook.yml
More file actions
65 lines (59 loc) 路 1.91 KB
/
Copy pathlefthook.yml
File metadata and controls
65 lines (59 loc) 路 1.91 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Lefthook configuration for AI Toolkit
# https://github.com/evilmartians/lefthook
pre-commit:
parallel: false # Changed to false to ensure commands run in order
commands:
update-lockfile:
run: scripts/lefthook/update-lockfile.sh
tags: lockfile
skip:
- merge
- rebase
fail_text: 'Failed to update bun.lock. Please run bun install manually.'
format:
run: scripts/lefthook/format-files.sh
tags: format
skip:
- merge
- rebase
fail_text: 'Formatting failed. Please review the changes.'
lint:
run: scripts/lefthook/lint.sh
tags: lint
skip:
- merge
- rebase
fail_text: 'Linting failed. Please fix the issues before committing.'
typecheck:
run: bunx nx affected --target=typecheck --base=HEAD~1
tags: typecheck
skip:
- merge
- rebase
fail_text: 'Typechecking failed. Please fix the issues before committing.'
test:
run: bunx nx affected --target=test --base=HEAD~1
tags: test
skip:
- merge
- rebase
fail_text: 'Tests failed. Please fix the failing tests before committing.'
lint-markdown:
glob: '*.md'
run: scripts/lefthook/lint-markdown.sh
tags: markdown
skip:
- merge
- rebase
fail_text: 'Markdown linting failed. Please fix the issues before committing.'
# Update CLAUDE.md files based on changed files
# Skip with: SKIP_CLAUDE=1 git commit -m "message"
# Also skips automatically when CLAUDE_CODE=1 (set by Claude Code sessions)
# update-claude-docs:
# run: sh scripts/lefthook/update-claude-docs.sh
# tags: claude-docs
# skip:
# - merge
# - rebase
# - run: '[ "$SKIP_CLAUDE" = "1" ] || [ "$CLAUDE_CODE" = "1" ]'
# fail_text: 'Failed to update CLAUDE.md files. Please run `claude -p "/update-claude-md"` manually.'