cookiecutter-django/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

80 lines
2.4 KiB
YAML
Raw Normal View History

2022-10-28 19:38:57 +02:00
exclude: \.min\.(js|css)(\.map)?$|^\.idea/
2022-12-16 22:11:56 +01:00
ci:
skip: [pip-compile]
2022-10-28 19:38:57 +02:00
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
2022-12-16 22:12:43 +01:00
rev: v4.4.0
2022-10-28 19:38:57 +02:00
hooks:
- id: check-ast
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
2022-12-19 22:40:00 +01:00
args: [--allow-multiple-documents]
2022-10-28 19:38:57 +02:00
- id: end-of-file-fixer
- id: check-merge-conflict
2022-12-19 22:40:00 +01:00
- id: debug-statements
- id: detect-private-key
2022-10-28 19:38:57 +02:00
- id: pretty-format-json
args:
- --autofix
- --no-sort-keys
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
2023-02-09 10:10:54 +01:00
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
2022-10-28 19:38:57 +02:00
- repo: https://github.com/adamchainz/django-upgrade
2022-12-16 22:12:43 +01:00
rev: 1.12.0
2022-10-28 19:38:57 +02:00
hooks:
- id: django-upgrade
2022-12-16 22:12:43 +01:00
args: [--target-version, "4.1"]
2022-10-28 19:38:57 +02:00
- repo: https://github.com/psf/black
2022-12-16 22:12:43 +01:00
rev: 22.12.0
2022-10-28 19:38:57 +02:00
hooks:
- id: black
args: [--target-version, {{ cookiecutter.python_version_slug }}]
2022-10-28 19:38:57 +02:00
- repo: https://github.com/rtts/djhtml
rev: v1.5.2
hooks:
- id: djhtml
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.237'
2022-10-28 19:38:57 +02:00
hooks:
- id: ruff
args: [--fix]
2022-10-28 19:38:57 +02:00
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
types_or: [javascript, css]
- repo: https://github.com/pre-commit/mirrors-eslint
2023-01-27 10:55:43 +01:00
rev: v8.32.0
2022-10-28 19:38:57 +02:00
hooks:
- id: eslint
args: [--fix]
types_or: [javascript, css]
additional_dependencies:
2023-01-27 10:55:43 +01:00
- eslint@8.32.0
2022-12-16 22:12:43 +01:00
- eslint-config-prettier@8.5.0
2023-02-17 15:44:01 +01:00
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.9.1
hooks:
- id: pyproject-fmt
2022-12-16 22:11:56 +01:00
- repo: https://github.com/jazzband/pip-tools
2023-01-27 10:55:43 +01:00
rev: 6.12.1
2022-12-16 22:11:56 +01:00
hooks:
- id: pip-compile
name: pip-compile requirements.txt
args: [-q, --allow-unsafe, --resolver=backtracking, --generate-hashes, requirements.in]
files: ^requirements\.(in|txt)$
- id: pip-compile
name: pip-compile constraints.txt
args: [-q, --allow-unsafe, --resolver=backtracking, --strip-extras, --output-file=constraints.txt, requirements.in]
files: ^requirements\.in|constraints\.txt$
- id: pip-compile
2023-01-27 10:55:43 +01:00
name: pip-compile requirements-dev.txt
2022-12-16 22:11:56 +01:00
args: [-q, --allow-unsafe, --resolver=backtracking, --generate-hashes, requirements-dev.in]
files: ^requirements-dev\.(in|txt)$