-
Notifications
You must be signed in to change notification settings - Fork 38
/
.pre-commit-config.yaml
81 lines (75 loc) · 2.27 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
repos:
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.5.2
hooks:
- id: uv-export
name: uv-export requirements.txt
args:
[
"--frozen",
"--no-group",
"dev",
"--no-group",
"docs",
"-o",
"requirements/prod.txt",
]
- id: uv-export
name: uv-export requirements/dev.txt
args: ["--frozen", "--group", "dev", "-o", "requirements/dev.txt"]
- id: uv-export
name: uv-export requirements/docs.txt
args:
["--frozen", "--only-group", "docs", "-o", "requirements/docs.txt"]
# This is disabled because this doesn't export --find-links. The requirements-translate is maintained manually.
# - id: uv-export
# name: uv-export requirements/translate.txt
# args:
# [
# "--frozen",
# "--only-group",
# "translate",
# "-o",
# "requirements/translate.txt",
# ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/rtts/djhtml
rev: "3.0.7"
hooks:
- id: djhtml
files: .*/templates/.*\.html$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
files: .*\.{css,js,json,scss,yml,yaml}$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.13.0
hooks:
- id: eslint
files: .*/static_src/javascript/.*\.js$
additional_dependencies:
- "@eslint/[email protected]"
- "@eslint/[email protected]"
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: "0.0.2"
hooks:
- id: stylelint
files: .*/static_src/sass/.*\.scss$
additional_dependencies: