-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
45 lines (45 loc) · 1.27 KB
/
.pre-commit-config.yaml
File metadata and controls
45 lines (45 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
43
44
45
repos:
- repo: local
hooks:
- id: extract-openapi
name: extract-openapi
entry: python backend/extract-openapi.py app.main:app
language: system
pass_filenames: false
- repo: local
hooks:
- id: generate-frontend-api-client
name: generate-frontend-api-client
entry: bash -c 'cd frontend && npm run codegen:v2:file'
language: system
pass_filenames: false
- repo: local
hooks:
- id: eslint
name: eslint
entry: bash -c "cd frontend && npx eslint --fix src"
language: system
- repo: local
hooks:
- id: prettier
name: prettier
entry: bash -c "cd frontend && npx prettier src --write"
language: system
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
exclude: deployments/kubernetes/charts
- id: end-of-file-fixer
exclude: 'openapi.json|frontend/src/openapi/v2/'
- id: trailing-whitespace
exclude: 'openapi.json|frontend/src/openapi/v2/'
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.4
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format