2023-11-28 16:09:31 +03:00
|
|
|
exclude: '^docs/|/migrations/|devcontainer.json'
|
2024-10-06 05:40:22 +03:00
|
|
|
default_stages: [pre-commit]
|
2019-10-29 17:47:27 +03:00
|
|
|
|
2023-12-06 12:40:04 +03:00
|
|
|
default_language_version:
|
2024-03-18 21:55:00 +03:00
|
|
|
python: python3.12
|
2023-12-06 12:40:04 +03:00
|
|
|
|
2019-10-29 17:47:27 +03:00
|
|
|
repos:
|
2020-05-01 21:10:42 +03:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-10-06 05:40:22 +03:00
|
|
|
rev: v5.0.0
|
2019-10-29 17:47:27 +03:00
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
2020-05-01 21:10:42 +03:00
|
|
|
- id: end-of-file-fixer
|
2023-04-15 14:15:15 +03:00
|
|
|
- id: check-json
|
|
|
|
- id: check-toml
|
|
|
|
- id: check-xml
|
2020-05-01 21:10:42 +03:00
|
|
|
- id: check-yaml
|
2023-04-15 14:15:15 +03:00
|
|
|
- id: debug-statements
|
|
|
|
- id: check-builtin-literals
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-docstring-first
|
|
|
|
- id: detect-private-key
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2024-01-02 14:49:06 +03:00
|
|
|
rev: v4.0.0-alpha.8
|
2023-04-15 14:15:15 +03:00
|
|
|
hooks:
|
|
|
|
- id: prettier
|
|
|
|
args: ['--tab-width', '2', '--single-quote']
|
2023-04-16 14:59:01 +03:00
|
|
|
exclude: '{{cookiecutter.project_slug}}/templates/'
|
2019-10-29 17:47:27 +03:00
|
|
|
|
2023-04-28 10:56:22 +03:00
|
|
|
- repo: https://github.com/adamchainz/django-upgrade
|
2024-10-12 05:36:29 +03:00
|
|
|
rev: '1.22.1'
|
2023-04-28 10:56:22 +03:00
|
|
|
hooks:
|
|
|
|
- id: django-upgrade
|
2024-07-25 15:18:03 +03:00
|
|
|
args: ['--target-version', '5.0']
|
2023-04-28 10:56:22 +03:00
|
|
|
|
2024-02-06 21:56:31 +03:00
|
|
|
# Run the Ruff linter.
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2024-11-16 14:00:01 +03:00
|
|
|
rev: v0.7.4
|
2024-02-06 21:56:31 +03:00
|
|
|
hooks:
|
|
|
|
# Linter
|
|
|
|
- id: ruff
|
|
|
|
args: [--fix, --exit-non-zero-on-fix]
|
|
|
|
# Formatter
|
|
|
|
- id: ruff-format
|
2021-06-02 10:47:37 +03:00
|
|
|
|
2023-06-28 00:52:36 +03:00
|
|
|
- repo: https://github.com/Riverside-Healthcare/djLint
|
2024-11-07 22:43:37 +03:00
|
|
|
rev: v1.36.1
|
2023-06-28 00:52:36 +03:00
|
|
|
hooks:
|
|
|
|
- id: djlint-reformat-django
|
|
|
|
- id: djlint-django
|
|
|
|
|
2021-06-02 10:47:37 +03:00
|
|
|
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
|
|
|
|
ci:
|
2021-11-20 03:13:01 +03:00
|
|
|
autoupdate_schedule: weekly
|
|
|
|
skip: []
|
|
|
|
submodules: false
|