-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
171 lines (152 loc) · 4.36 KB
/
.pre-commit-config.yaml
File metadata and controls
171 lines (152 loc) · 4.36 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
exclude: "^docs/|.idea|devcontainer.json|tests/fixtures|tests/.*snapshots/.*\\.(json|html|xml|opml|txt)|manifest.json"
default_stages: [pre-commit]
default_language_version:
python: python3.14
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
exclude: (\.vscode)
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: check-builtin-literals
- id: detect-private-key
- repo: https://github.com/fsfe/reuse-tool
rev: a1bb792acda6fd0724936b4ebbdbc8eceb9c0459 # v6.2.0
hooks:
- id: reuse
- repo: https://github.com/adamchainz/django-upgrade
rev: 1db0cbd209d6c4dc78191593942e6269fae99e8d # v1.30.0
hooks:
- id: django-upgrade
args: ["--target-version", "5.1"]
- repo: https://github.com/Riverside-Healthcare/djLint
rev: 9112cb64851c95a7802358af285d21ad8b7f6437 # v1.36.4
hooks:
- id: djlint-django
- repo: https://github.com/adamchainz/djade-pre-commit
rev: b8bfd27da9514450edbc0fe5254bc3ba3d3032c6 # 1.9.0
hooks:
- id: djade
args: [--target-version, "5.2"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # v0.11.0.1
hooks:
- id: shellcheck
exclude: ".envrc"
args: [-e, SC1091]
- repo: https://github.com/crate-ci/typos
rev: 631208b7aac2daa8b707f55e7331f9112b0e062d # v1.44.0
hooks:
- id: typos
- repo: local
hooks:
- id: stylelint
name: stylelint
entry: npx stylelint
args: [--fix]
language: system
types: [css]
- id: eslint
name: eslint
entry: npx eslint
args: [--fix]
language: system
types: [javascript]
- id: prettier
name: prettier
entry: npx prettier
args: [--write]
language: system
types_or: [yaml, css, javascript, json]
exclude: (\.vscode)
- id: import-linter
name: import-linter
entry: env
args:
- uv
- run
- lint-imports
language: system
pass_filenames: false
- id: ruff-check
name: ruff check
entry: uv run ruff check --fix --force-exclude
types_or: [python, pyi, jupyter]
require_serial: true
language: system
- id: ruff-format
name: ruff format
entry: uv run ruff format --force-exclude
types_or: [python, pyi, jupyter]
require_serial: true
language: system
- id: mypy
name: mypy
entry: env
args:
- DATABASE_URL=sqlite:///mypy.db
- IS_PRODUCTION=True
- DJANGO_SECRET_KEY=test-key
- DJANGO_ADMIN_URL=admin/
- uv
- run
- mypy
- legadilo
- config
language: system
types: [python]
pass_filenames: false
- id: django-check
name: django-check
entry: env
args:
- DATABASE_URL=sqlite:///mypy.db
- IS_PRODUCTION=True
- DJANGO_SECRET_KEY=test-key
- DJANGO_ADMIN_URL=admin/
- uv
- run
- python
- manage.py
- check
- --fail-level=WARNING
language: system
types: [python]
pass_filenames: false
- id: check-po
name: check-po
entry: env
args:
- uv
- run
- python
- manage.py
- makemessages
- --all
- --no-location
language: system
pass_filenames: false
- id: type-check-browser-extension
name: type-check-browser-extension
entry: npm --prefix browser-extension run typecheck
language: system
pass_filenames: false
types: [javascript]
files: "^browser-extension/.*\\.js$"
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
skip: []
submodules: false