-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
68 lines (61 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
58
59
60
61
62
63
64
65
66
67
68
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: check-yaml
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, master, --branch, main]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: [-c, backend/pyproject.toml, -qr]
files: ^backend/src/
additional_dependencies: ["bandit[toml]"]
- repo: local
hooks:
- id: mypy
name: mypy
files: ^src/
language: system
entry: bash -c 'cd backend && mypy src/'
- repo: local
hooks:
- id: prettier
name: prettier
files: \.[jt]sx?$
language: system
entry: bash -c 'cd frontend && exec npx prettier --write "**/*.{js,jsx,ts,tsx,json,md}"'
- repo: local
hooks:
- id: eslint
files: \.[jt]sx?$
name: eslint
language: system
entry: bash -c 'cd frontend && exec npm run lint'
- repo: local
hooks:
- id: type-check
name: type-check
files: \.[jt]sx?$
language: system
entry: bash -c 'cd frontend && exec npm run type-check'
# - repo: local
# hooks:
# - id: build
# name: build
# files: \.[jt]sx?$
# language: system
# entry: bash -c 'cd frontend && exec npm run build'