-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathprek.toml
More file actions
112 lines (100 loc) · 3.09 KB
/
Copy pathprek.toml
File metadata and controls
112 lines (100 loc) · 3.09 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
#:schema https://raw.githubusercontent.com/j178/prek/refs/heads/master/prek.schema.json
#:tombi schema.strict = false
# cspell: ignore biomejs prek tombi renovaterc
# WARNING: all system hooks mush use entry: sh -c '...' to avoid unexpected failures
# See: https://github.com/j178/prek/issues/1690
[[repos]]
repo = "https://github.com/astral-sh/uv-pre-commit"
rev = "0.10.5"
hooks = [{ id = "uv-sync", priority = 0 }, { id = "uv-lock", alias = "lock", priority = 1 }, { id = "uv-lock", name = "deps: upgrade via uv sync --upgrade", alias = "deps", args = ["--upgrade"], stages = ["manual"], priority = 2 }]
[[repos]]
repo = "https://github.com/rhysd/actionlint"
rev = "v1.7.11"
hooks = [{ id = "actionlint", priority = 0 }]
[[repos]]
repo = "builtin"
hooks = [
{ id = "end-of-file-fixer", priority = 0 },
{ id = "trailing-whitespace", priority = 0 },
{ id = "mixed-line-ending", priority = 0 },
{ id = "fix-byte-order-marker", priority = 0 },
{ id = "check-executables-have-shebangs", priority = 0 },
{ id = "check-merge-conflict", priority = 0 },
]
[[repos]]
repo = "local"
[[repos.hooks]]
id = "biome"
name = "biome"
language = "system"
pass_filenames = false
files = { glob = ["*.js", "*.jsx", "*.ts", "*.tsx", "*.json", "*.css", "*.scss", "*.html", "*.md", "*.yml", "*.yaml", "*.toml", "*.toml.in"] }
entry = "npx @biomejs/biome lint --write --unsafe"
priority = 1
[[repos.hooks]]
id = "renovate"
name = "renovate config validator"
language = "node"
language_version = "24"
pass_filenames = false
files = "(renovate.json|renovate.json5|.renovaterc|.renovaterc.json5|.renovaterc.json)$"
entry = "npm -y exec --package=renovate -- renovate-config-validator --strict"
priority = 0
[[repos.hooks]]
id = "toml"
name = "toml (format and lint)"
language = "system"
pass_filenames = false
files = { glob = ["*.toml", "*.toml.in"] }
entry = "sh -c 'uv run -q --group=lint tombi format . && uv run -q --group=lint tombi lint .'"
priority = 1
[[repos.hooks]]
id = "ruff"
name = "ruff"
language = "system"
pass_filenames = false
files = { glob = ["*.py", "*.pyi", "pyproject.toml", "uv.lock"] }
entry = "sh -c 'printenv PATH; uv run -q --group=lint ruff format --check .'"
priority = 2
[[repos.hooks]]
id = "mypy"
name = "mypy"
args = ["--strict"]
language = "system"
pass_filenames = false
files = { glob = ["*.py", "*.pyi", "pyproject.toml", "uv.lock"] }
entry = "sh -c 'uv run -q --group=lint mypy --strict .'"
priority = 3
[[repos.hooks]]
id = "node"
name = "node deps"
language = "node"
language_version = "24"
pass_filenames = false
files = {
glob = [
"package.json",
"package-lock.json",
"yarn.lock",
"pnpm-lock.yaml",
]
}
stages = ["manual"]
entry = "sh -c 'npx ncu && npm ci'"
priority = 4
[[repos.hooks]]
id = "shellcheck"
name = "shellcheck"
language = "system"
pass_filenames = true
require_serial = true
types = ["shell"]
entry = 'sh -c "uv run -q --group lint shellcheck $@"'
priority = 5
[[repos.hooks]]
id = "pydoclint"
name = "pydoclint"
language = "system"
pass_filenames = false
entry = "sh -ec 'uv run -q --group lint pydoclint -q . && uv run -q --group lint pydoclint --generate-baseline=1 .'"
priority = 6