-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
57 lines (57 loc) · 1.63 KB
/
.pre-commit-config.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
files: backend
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
- id: run-tests
name: run tests
entry: 'bash -c "cd backend && make test"'
types: [python]
language: system
pass_filenames: false
- id: pylint
name: pylint
entry: bash -c "cd backend && make pylint"
pass_filenames: false
types: [python]
language: system
- id: mypy
name: mypy type checking
entry: bash -c "cd backend && make mypy"
pass_filenames: false
types: [python]
language: system
- id: black
name: autoformat (python)
entry: bash -c "cd backend && poetry run black ."
types: [python]
language: system
- id: isort
name: sort imports (python)
entry: bash -c "cd backend && poetry run isort ."
types: [python]
language: system
- id: poetry-check
name: Check if poetry config is valid
entry: bash -c "cd backend && poetry check"
types: [python]
pass_filenames: false
language: system
- id: lint-frontend
name: lint-frontend
entry: bash -c "cd frontend && pnpm run lint"
language: system
always_run: true