mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 00:56:34 +00:00
27 lines
897 B
YAML
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}
|