This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
93 lines (93 loc) · 3 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-case-conflict
- id: check-added-large-files
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: |
(?x)(
^backend/static/|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^backend/static/
# Note that this does not mix with git setup check-in LF check-out CRLF,
# see https://github.com/pre-commit/pre-commit-hooks#mixed-line-ending
- id: mixed-line-ending
args: [--fix=lf]
exclude: |
(?x)(
^00_old_m4h_matching_code/|
^backend/static/|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
exclude: |
(?x)(
^backend/apps/[a-z]*/migrations/[0-9A-z_]*.py
)
# args: [--filter-files]
# use black or autopep8 to automatically format files to pep8
- repo: https://github.com/psf/black
rev: "19.10b0"
hooks:
- id: black
args: [--line-length=100]
language_version: python3
exclude: |
(?x)(
^00_old_m4h_matching_code/|
^backend/apps/[a-z]*/migrations/[0-9A-z]*.py|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [flake8-import-order,flake8-builtins,flake8-docstrings,flake8-logging-format,flake8-todos]
exclude: |
(?x)(
^00_old_m4h_matching_code/|
^backend/apps/[a-z]*/migrations/[0-9A-z_]*.py|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- repo: https://github.com/pre-commit/mirrors-eslint
rev: 'v7.1.0' # Use the sha / tag you want to point at
hooks:
- id: eslint
additional_dependencies:
- eslint@^6.8.0
- babel-eslint@^10.1.0
- eslint-plugin-vue@^6.2.2
- vue-eslint-parser@^7.1.0
files: >
(?x)(
^frontend/webpack\.config\.js|
^frontend/src/
)
- repo: https://github.com/myint/rstcheck
rev: '3f92957' # Use the sha / tag you want to point at
hooks:
- id: rstcheck
files: >
(?x)(
^docs/
)