Debian Codegraph @

.pre-commit-config.yaml

raw
1 # Config for pre-commit CI https://pre-commit.ci/
2 ci:
3 autofix_commit_msg: |
4 [pre-commit.ci] Automatic linting and formatting fixes
5 autofix_prs: true
6 autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate hooks"
7 autoupdate_schedule: monthly
8
9 # Fix the node version to avoid a GLIBC error
10 # ref: https://stackoverflow.com/questions/71939099/bitbucket-pipeline-error-installing-pre-commit-ts-lint/71940852#71940852
11 default_language_version:
12 node: 22.9.0
13
14 repos:
15 - repo: "https://github.com/pycontribs/mirrors-prettier"
16 rev: v3.6.2
17 hooks:
18 - id: prettier
19 # Exclude the HTML, since it doesn't understand Jinja2
20 # exclude also the webpack.config.js file has it embed complete url dificult to prettify
21 # exclude the pytest-regressions folder tests/test_ally
22 exclude: .+\.html|webpack\.config\.js|tests/test_a11y/
23
24 - repo: "https://github.com/astral-sh/ruff-pre-commit"
25 rev: "v0.15.4"
26 hooks:
27 - id: ruff
28 args: [--exit-non-zero-on-fix]
29 - id: ruff-format
30
31 - repo: "https://github.com/asottile/pyupgrade"
32 rev: v3.21.2
33 hooks:
34 - id: pyupgrade
35 args: [--py37-plus]
36
37 - repo: "https://github.com/Riverside-Healthcare/djLint"
38 rev: v1.36.4
39 hooks:
40 - id: djlint-jinja
41 types_or: ["html"]
42
43 - repo: "https://github.com/PyCQA/doc8"
44 rev: v2.0.0
45 hooks:
46 - id: doc8
47
48 - repo: "https://github.com/kynan/nbstripout"
49 rev: "0.9.1"
50 hooks:
51 - id: nbstripout
52
53 - repo: "https://github.com/mondeja/pre-commit-po-hooks"
54 rev: v1.7.3
55 hooks:
56 - id: remove-metadata
57
58 - repo: "https://github.com/thibaudcolas/pre-commit-stylelint"
59 rev: v17.4.0
60 hooks:
61 - id: stylelint
62 # automatically fix .scss files where possible
63 args: [--fix]
64 additional_dependencies:
65 # stylelint itself needs to be here when using additional_dependencies.
66 - [email protected]
67 - [email protected]
68
69 - repo: "https://github.com/pre-commit/pre-commit-hooks"
70 rev: v6.0.0
71 hooks:
72 - id: trailing-whitespace
73 - id: end-of-file-fixer