mirror of
https://github.com/OctoPrint/OctoPrint.git
synced 2026-05-14 03:00:19 -04:00
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
default_language_version:
|
|
python: python3
|
|
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: local
|
|
hooks:
|
|
- id: python-version-reminder
|
|
name: python version reminder
|
|
entry: python -c
|
|
args:
|
|
[
|
|
"print('NOTE: If pre-commit fails, make sure you are using a Python version officially supported by OctoPrint.')"
|
|
]
|
|
language: system
|
|
always_run: true
|
|
verbose: true
|
|
files: ^$
|
|
- 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.21.2
|
|
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$)
|
|
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
|
rev: v1.22.0
|
|
hooks:
|
|
- id: zizmor
|