-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
44 lines (39 loc) · 1.26 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
exclude: "docs|node_modules|migrations|.git|.tox"
default_stages: [commit]
fail_fast: true
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
# Back-end
# ------------------------------------------------------------------------------
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
args: ["--config=backend/setup.cfg"]
additional_dependencies: [flake8-isort]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: ["--config=backend/pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.0
hooks:
- id: mypy
additional_dependencies: ["types-requests"]
# Front-end
# ------------------------------------------------------------------------------
# Runs the local node `lint` script to avoid dependencies being out of sync with `frontend/package.json`
# https://github.com/pre-commit/pre-commit/issues/945
- repo: local
hooks:
- id: eslint_and_tsc
name: eslint_and_tsc
language: system
files: .+(js|jsx|ts|tsx|json)$
entry: bash -c 'cd frontend && yarn precommit'