-
Notifications
You must be signed in to change notification settings - Fork 35
/
.pre-commit-config.yaml
103 lines (103 loc) · 2.96 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
102
103
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
args: ["--markdown-linebreak-ext=md,markdown"]
exclude: .github/PULL_REQUEST_TEMPLATE.md|tests/cms/views/dashboard/expected_output/chat.html
- id: no-commit-to-branch
args: [--branch, main, --branch, develop]
- repo: local
hooks:
- id: ruff
name: ruff (custom script)
entry: ./tools/ruff.sh
args: ["--as-precommit"]
types_or: ["python", "pyi"]
language: script
pass_filenames: false
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [--external-sources]
- repo: local
hooks:
- id: black
name: black (custom script)
entry: ./tools/black.sh
args: ["--as-precommit"]
types_or: ["python", "pyi"]
language: script
pass_filenames: true
- repo: local
hooks:
- id: djlint-django
name: djlint (custom script)
entry: ./tools/djlint.sh
args: ["--as-precommit"]
types_or: ["html"]
language: script
pass_filenames: true
- repo: local
hooks:
- id: eslint
name: eslint (custom script)
entry: ./tools/eslint.sh
args: ["--as-precommit"]
types_or: ["javascript", "jsx", "ts", "tsx"]
language: script
pass_filenames: true
- repo: local
hooks:
- id: prettier
name: prettier (custom script)
entry: ./tools/prettier.sh
args: ["--as-precommit"]
types_or: ["javascript", "jsx", "ts", "tsx", "css", "sass", "scss", "yaml", "markdown", "json"]
language: script
pass_filenames: true
- repo: local
hooks:
- id: translations
name: translations
description: Check if the translation file is up-to-date
entry: tools/check_translations.sh
types_or: [python, html]
language: script
pass_filenames: true
- repo: local
hooks:
- id: frontend-tests
name: frontend-tests
description: Run frontend tests
entry: tools/vitest.sh
language: script
pass_filenames: false
- repo: local
hooks:
- id: mypy
name: mypy (custom script)
entry: ./tools/mypy.sh
args: ["--as-precommit"]
types_or: ["python", "pyi"]
language: script
pass_filenames: true
- repo: local
hooks:
- id: pylint
name: pylint (custom script)
entry: ./tools/pylint.sh
args: ["--as-precommit"]
types_or: ["python", "pyi"]
language: script
pass_filenames: true