-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
105 lines (95 loc) · 2.96 KB
/
.pre-commit-config.yaml
File metadata and controls
105 lines (95 loc) · 2.96 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# To run against all files:
# pre-commit run --all-files
# To install hooks:
# pre-commit install
# To update hooks:
# pre-commit autoupdate
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=3000"]
- id: check-ast
- id: debug-statements
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.12.10"
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
- id: ruff-format
- repo: local
hooks:
- id: ty-check
name: ty-check
language: python
entry: ty check
pass_filenames: false
additional_dependencies: [ty]
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies:
- black==25.1.0
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
# Seems to be broken on python 3.11
language_version: python3.12
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
- repo: https://github.com/hadolint/hadolint
rev: v2.13.1-beta
hooks:
- id: hadolint-docker
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: "0.0.2"
hooks:
- id: stylelint
args: ["--fix", "--config", ".stylelintrc.json"]
additional_dependencies:
# Manually update releases to match package.json
# OR find releases here:
# stylelint: https://github.com/stylelint/stylelint/releases
# stylelint-config-standard: https://github.com/stylelint/stylelint-config-standard/releases
["stylelint@16.23.1", "stylelint-config-standard@39.0.0"]
# Update static file versions when static files change
- repo: local
hooks:
- id: static-version-updater
name: Update static file versions
entry: python scripts/static_version_updater.py
language: system
files: ^app/web/html/static/
pass_filenames: false
# Prettier is fairly slow, so put towards the end
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
args:
[
"--trailing-comma=es5",
"--tab-width=2",
"--no-semi",
"--plugin=prettier-plugin-jinja-template",
]
additional_dependencies:
- "prettier@3.2.5"
- "prettier-plugin-jinja-template"