forked from OctoPrint/OctoPrint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (61 loc) · 2.14 KB
/
.pre-commit-config.yaml
File metadata and controls
61 lines (61 loc) · 2.14 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
default_language_version:
python: python3.12
exclude: ^(src/octoprint/vendor/|src/octoprint/static/js/lib|src/octoprint/static/vendor|src/octoprint_setuptools|tests/static/js/lib|tests/util/_files|scripts/|translations/|.*\.css|.*\.svg|docs/)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: check-json
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/asottile/pyupgrade
rev: v3.20.0
hooks:
- id: pyupgrade
args: ["--py39-plus"]
exclude: "setup.py|src/octoprint_setuptools/__init__.py"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.0
hooks:
- id: ruff-check
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/djlint/djlint
rev: v1.36.4
hooks:
- id: djlint
files: "\\.html$"
types: [html]
- id: djlint-reformat
files: "\\.html$"
types: [html]
- id: djlint-jinja
- id: djlint-reformat-jinja
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.6.0
hooks:
- id: prettier
files: "\\.(js|json|css|less|md|yml|yaml)$"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.29.0
hooks:
- id: eslint
files: \.js$
exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/)
additional_dependencies: ["eslint@9.29.0", "globals@16.2.0"]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|tests/playwright|scripts/)
- repo: https://github.com/OctoPrint/pre-commit-lessc
rev: 4.3.0
hooks:
- id: lessc
args: ["--wrapper-quiet", "--clean-css=--s1 --advanced --compatibility=ie8"]
additional_dependencies: ["less-plugin-clean-css"]
files: ^(src/octoprint/static/less/(octoprint|recovery|login)\.less|src/octoprint/plugins/.*/static/less/.*\.less$)