-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
75 lines (69 loc) · 2.01 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
---
default_language_version:
node: system
python: python3.12
repos: # Python linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.7.4' # keep version in sync with pyproject.toml
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
language: system
types: [python]
args:
- '--reports=n' # only display messages
- '--output-format=colorized'
- '--rcfile=.pylintrc'
- '--django-settings-module=cms.settings.production'
- '-j 0' # detect number of processors available to use
- repo: https://github.com/python-poetry/poetry
rev: '1.8.4' # keep version in sync with version installed in the Dockerfile
hooks:
- id: poetry-check
- id: poetry-lock
# Never update dependencies and only run on changes to pyproject.toml
args: [--no-update]
files: ^pyproject.toml$
# Template linting
- repo: https://github.com/rtts/djhtml
rev: 3.0.7
hooks:
- id: djhtml
# Front-end linting
- repo: local
hooks:
- id: lint:js
name: lint:js
language: system
entry: npm run lint:js
types_or: [javascript, ts]
- id: lint:css
name: lint:css
language: system
entry: npm run lint:css
types_or: [css, scss]
- id: lint:format
name: lint:format
language: system
entry: npm run format
types_or: [css, scss, javascript, ts, json, yaml]
# Misc. other linters
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0 # keep version in sync with pyproject.toml
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: >
(?x)^(
.*/tests/.*|
package-lock.json|
poetry.lock|
.*\.env.*|
.*local\.py
)$