-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
51 lines (41 loc) · 1.16 KB
/
lefthook.yml
File metadata and controls
51 lines (41 loc) · 1.16 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
# Lefthook git hooks configuration
# https://github.com/evilmartians/lefthook
pre-commit:
parallel: true
commands:
biome-format:
glob: "*.{ts,js,json}"
run: bun run biome format --write {staged_files}
stage_fixed: true
biome-lint:
glob: "*.{ts,js}"
run: bun run biome check --write {staged_files}
stage_fixed: true
typecheck:
glob: "*.ts"
run: bun run typecheck
duplication:
glob: "*.ts"
run: bun run duplication
knip:
glob: "*.ts"
run: bun run knip
file-length:
run: ./scripts/check_file_length.sh {staged_files}
forbidden-names:
run: ./scripts/check_forbidden_names.sh {staged_files}
biome-ignores:
glob: "*.ts"
run: |
if grep -l "biome-ignore" {staged_files} 2>/dev/null; then
echo "❌ Found biome-ignore comments in staged files - these are forbidden!"
exit 1
fi
query-embeddings:
glob: "src/embeddings/queries/*.json"
run: bun scripts/check-query-embeddings.ts
# Enable pre-push hook so lefthook runs git-lfs pre-push automatically
pre-push:
commands:
placeholder:
run: "true"