Files
pi-ku/lefthook.yml
2026-04-22 16:42:53 +05:30

27 lines
897 B
YAML

pre-commit:
parallel: true
commands:
# Backend: Ruff (Linter + Formatter)
ruff:
root: "backend/"
glob: "*.py"
run: export PATH="$HOME/.local/bin:$PATH" && uv run ruff check --fix {staged_files} && uv run ruff format {staged_files}
stage_fixed: true
django-check:
root: "backend/"
run: export PATH="$HOME/.local/bin:$PATH" && uv run manage.py check
# Frontend: Biome (Linter + Formatter)
biome:
root: "frontend/"
glob: "**/*.{js,ts,jsx,tsx}"
run: export PATH="$HOME/.bun/bin:$PATH" && bunx @biomejs/biome check --write --no-errors-on-unmatched {staged_files}
stage_fixed: true
# Frontend: TypeScript
tsc:
root: "frontend/"
glob: "**/*.ts, **/*.tsx"
run: export PATH="$HOME/.bun/bin:$PATH" && bunx tsc --noEmit --incremental --tsBuildInfoFile --ignoreConfig .tsbuildinfo {staged_files}