-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
38 lines (34 loc) · 1.31 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
38 lines (34 loc) · 1.31 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
# Pre-commit hooks for the fastapi_react migration.
# Install once with: pipx install pre-commit && pre-commit install
# Or run manually: pre-commit run --all-files
#
# These mirror the GitHub Actions checks in
# .github/workflows/fastapi-react.yml so local commits get the
# same fast feedback before pushing.
repos:
- repo: local
hooks:
- id: ruff-fastapi-backend
name: ruff (backend)
entry: bash -c 'cd fastapi_react/backend && python -m ruff check .'
language: system
files: ^fastapi_react/backend/.*\.py$
pass_filenames: false
- id: mypy-fastapi-backend
name: mypy --strict (backend)
entry: bash -c 'cd fastapi_react/backend && python -m mypy app'
language: system
files: ^fastapi_react/backend/.*\.py$
pass_filenames: false
- id: eslint-fastapi-frontend
name: eslint (frontend)
entry: bash -c 'cd fastapi_react/frontend && npx eslint .'
language: system
files: ^fastapi_react/frontend/.*\.(js|jsx)$
pass_filenames: false
- id: typecheck-fastapi-frontend
name: tsc --noEmit (frontend)
entry: bash -c 'cd fastapi_react/frontend && npx tsc --noEmit'
language: system
files: ^fastapi_react/frontend/.*\.(js|jsx|ts|tsx)$
pass_filenames: false