-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
115 lines (109 loc) · 3.24 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: >
(?x)^(
tests/|
)$
- id: check-json
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: check-ast
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args: [--line-length=88]
exclude: >
(?x)^(
.github/
)$
- repo: https://github.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
args: [--max-line-length=120]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.2 # Use the sha or tag you want to point at
hooks:
- id: prettier
args:
- --config=frontend/.prettierrc.json
- --ignore-path=frontend/.prettierignore
- --write
additional_dependencies:
- "@trivago/[email protected]"
- repo: local
hooks:
- id: django-migrations-check
stages: [push]
name: Check for missing django migrations.
entry: bash -c 'exec bash -c "./backend/manage.py makemigrations --check --dry-run"'
language: python
language_version: python3
types: [python]
pass_filenames: false
additional_dependencies:
- argon2-cffi==21.3.0
- Django==3.2.12 # migration fails on Django==4.0.7
- black==22.8.0
- django-celery-beat==2.3.0
- django-compressor==4.1
- django-config==0.1.4
- django-cors-headers==3.13.0
- django-enum-choices==2.1.4
- django-extensions==3.2.1
- django-filter==22.1
- django-ipware==5.0.0
- django-jazzmin==2.5.0
- django-redis==5.2.0
- django-simple-history==3.1.1
- djangorestframework-simplejwt==5.2.0
- flake8-isort==4.2.0
- gunicorn==20.1.0
- ipython==8.5.0
- pip-chill==1.0.1
- pre-commit==2.20.0
- psycopg2-binary==2.9.3
- pylint-celery==0.3
- pylint-django==2.5.3
- python-dotenv==0.21.0
- Pygments==2.7.4
- pywatchman==1.4.1
- id: eslint
stages: [commit]
name: Run eslint against all files
entry: "frontend/node_modules/.bin/eslint"
language: node
language_version: 14.15.1
types: [file]
files: \.[jt]sx?$
args:
- --config=frontend/.eslintrc.json
- --ignore-path=frontend/.eslintignore
- --fix
additional_dependencies:
- react-script
- id: typescript
stages: [push]
name: Run typescript checks against code.
entry: >
frontend/node_modules/.bin/tsc
--project frontend/tsconfig.json
language: node
language_version: 14.15.1
types: [file]
files: \.[jt]sx?$
exclude: ^frontend/node_modules/
pass_filenames: false