-
Notifications
You must be signed in to change notification settings - Fork 152
/
Copy path.pre-commit-config.yaml
101 lines (92 loc) · 2.9 KB
/
.pre-commit-config.yaml
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.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.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.4
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.2
hooks:
- id: bandit
args: [-c, pyproject.toml, -ll]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.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-core/docs/pages/user-guides/custom-components.md|^vizro-core/changelog.d|^vizro-ai/changelog.d
additional_dependencies:
- mdformat-mkdocs[recommended]==3.1.1
# 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