-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
33 lines (31 loc) · 1.1 KB
/
Copy pathlefthook.yml
File metadata and controls
33 lines (31 loc) · 1.1 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
# https://lefthook.dev — fast, parallel git hooks
# Installed locally via `bun install` (prepare script runs `lefthook install`).
pre-commit:
parallel: true
commands:
biome:
glob: '*.{js,mjs,cjs,ts,tsx,jsx,json,jsonc}'
run: bunx biome check --write --no-errors-on-unmatched {staged_files}
stage_fixed: true
eslint:
glob: '*.astro'
run: bunx eslint --fix --no-error-on-unmatched-pattern {staged_files}
stage_fixed: true
# If any Rust token source changed, regenerate tokens.ts and stage the diff.
# Incremental cargo build keeps this near-instant after the first compile.
tokens-codegen:
glob: 'tokens-gen/**/*.rs'
run: bun run codegen && git add src/generated/tokens.ts
pre-push:
parallel: true
commands:
typecheck:
run: bun run typecheck
biome-ci:
run: bunx biome check .
eslint-ci:
run: bunx eslint .
tokens-clippy:
run: cargo clippy --manifest-path tokens-gen/Cargo.toml --all-targets --quiet -- -D warnings
tokens-tests:
run: cargo test --manifest-path tokens-gen/Cargo.toml --release --quiet