-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
42 lines (40 loc) · 1.27 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
42 lines (40 loc) · 1.27 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=512"]
# Backend: ruff format + lint, scoped to backend/**/*.py. Run via uvx so the
# hook stays in lockstep with the project's ruff without pinning a rev here.
- repo: local
hooks:
- id: ruff-format
name: ruff format (backend)
entry: uvx ruff format
language: system
files: ^backend/.*\.py$
- id: ruff
name: ruff lint (backend)
entry: uvx ruff check --fix
language: system
files: ^backend/.*\.py$
- id: ty
name: ty type check (backend)
entry: bash -c 'cd backend && uv run --quiet ty check app tests'
language: system
files: ^backend/.*\.py$
pass_filenames: false
# Frontend: eslint --fix, scoped to frontend TS/TSX.
- repo: local
hooks:
- id: eslint-frontend
name: eslint (frontend)
entry: bash -c 'cd frontend && npx --no-install eslint --fix .'
language: system
files: ^frontend/.*\.(ts|tsx)$
pass_filenames: false