.pre-commit-config.yaml•3.01 kB
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-yaml
args: ["--unsafe"]
- id: check-json
exclude: "devcontainer.json" # Contains comments.
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies:
- tomli
exclude_types: [csv]
- repo: local
hooks:
- id: prettier
name: prettier
description: Linter for json, yaml, md, css and more
entry: prettier --write --ignore-unknown
language: node
types: [text]
additional_dependencies: ["prettier@3.3.3"]
exclude_types: [markdown, css]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.15.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
hooks:
- id: ruff
args: [--fix]
exclude: "vizro-core/examples/scratch_dev/app.py"
- id: ruff-format
- repo: https://github.com/PyCQA/bandit
rev: 1.8.6
hooks:
- id: bandit
args: [-c, pyproject.toml, -ll]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
hooks:
- id: mypy
files: ^vizro-core/src/
additional_dependencies:
# Deliberately pinned to 2.9.0 (and not lower) as there are issues building the wheel for pydantic-core
- pydantic==2.9.0
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: "0.0.2"
hooks:
- id: stylelint
additional_dependencies:
- stylelint@16.2.1
- stylelint-config-standard@36.0.0
- stylelint-order@4.1.0
args: ["--fix"]
exclude: ^vizro-core/src/vizro/static/css/.+\.min.*|^vizro-core/src/vizro/static/css/mantine_dates.css
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
hooks:
- id: mdformat
args:
[
--ignore-missing-references,
--wrap=no,
--align-semantic-breaks-in-lists,
]
exclude: ^vizro-core/docs/pages/API-reference|^vizro-ai/docs/pages/API-reference|^vizro-mcp/docs/pages/API-reference|vizro-core/docs/pages/user-guides/custom-components.md|^vizro-core/changelog.d|^vizro-ai/changelog.d
additional_dependencies:
- mdformat-mkdocs[recommended]==4.3.0
# Configuration for https://pre-commit.ci/.
ci:
autoupdate_schedule: monthly
# Skip all hooks that just do checks without actually fixing anything.
skip:
- check-added-large-files
- check-merge-conflict
- check-case-conflict
- check-yaml
- check-json
- codespell
- bandit
- mypy