-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
46 lines (44 loc) · 1.21 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
exclude: /vendor/.*$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
# prettier formats files for the web - hmtml, js, css, xml...
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
exclude: .*/templates/.*$
# Black formats python3 files without changing the AST
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: ["--skip-string-normalization"]
# isort sorts Python imports
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
# pyugrade upgrades old python syntax
- repo: https://github.com/asottile/pyupgrade
rev: v2.30.0
hooks:
- id: pyupgrade
# djhtml reindents django templates
- repo: https://github.com/rtts/djhtml
# v1.5.2
rev: "b26c430"
hooks:
- id: djhtml
files: .*/templates/.*$