-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
41 lines (32 loc) · 986 Bytes
/
lefthook.yml
File metadata and controls
41 lines (32 loc) · 986 Bytes
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
# Lefthook configuration for pre-commit hooks
# https://github.com/evilmartians/lefthook
pre-commit:
parallel: false
piped: true # Stop on first error - don't continue if a command fails
commands:
0_warn_articles:
glob: "blog/articles/*.md"
run: |
echo ""
echo "WARNING: blog/articles/*.md files are staged."
echo "These are build artifacts synced from Supabase."
echo "Direct edits will be overwritten on next sync."
echo "Edit in Supabase, then: bun run sync"
echo ""
1_format:
run: bun run fmt
stage_fixed: true
2_lint:
glob: "*.{ts,tsx}"
run: bun run lint
3_typecheck:
run: bun run check
4_build:
run: bun run build
5_stage:
# Stage dist and article files
run: git add dist/index.html dist/assets/ dist/_headers dist/images/ blog/articles/
6_constraints:
run: bun run test:constraints
7_e2e:
run: bun run test:e2e