-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
111 lines (108 loc) · 2.62 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
repos:
#python
- repo: local
hooks:
- id: black
name: black
entry: poetry run black
types: [python]
language: system
- repo: local
hooks:
- id: isort
name: isort
language: system
entry: poetry run isort
types: [python]
- repo: local
hooks:
- id: flakeheaven
name: flakeheaven
entry: poetry run flakeheaven lint --config=pyproject.toml
types: [python]
language: system
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"--output-format=colorized",
"-sn", # Don't display the score
"--load-plugins=pylint_django", # Load an extension
]
- repo: local
hooks:
- id: djlint
name: djlint
entry: poetry run djlint --reformat
language: system
types_or: [html]
## system
- repo: https://github.com/asottile/pyupgrade
rev: v2.30.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.4.0
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
# - id: end-of-file-fixer
# - id: trailing-whitespace
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/pycqa/doc8
rev: 0.10.1
hooks:
- id: doc8
# TODO: https://github.com/adamchainz/pre-commit-oxipng
## frontend
- repo: local
hooks:
- id: tsc
name: tsc
entry: npx tsc --noEmit --skipLibCheck
files: ^frontend/
language: system
types_or: [ts, javascript]
exclude: |
(?x)^(
postcss.config.js|
tailwind.config.js|
vite.config.js|
frontend/fontawesome/.*|
node_modules/.*
)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
files: ^frontend/
types_or: [javascript, ts]
- repo: local
hooks:
- id: eslint
name: eslint
entry: npx eslint --fix
files: ^frontend/
language: system
types_or: [javascript, ts]
- repo: local
hooks:
- id: stylelint
name: stylelint
entry: npx stylelint --fix --allow-empty-input
files: ^frontend/
language: system
exclude: frontent/fontawesome/.*
types_or: [css, scss]