Add precommit (#369)

* Add pre-commit configuration

* Change prettier version

* Try djhtml

* Add prettier ignore
This commit is contained in:
Chris Mitchell 2023-05-20 09:43:37 -04:00 committed by GitHub
parent caee19cdfb
commit 5bc2376029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

23
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
exclude: .*\.html
hooks:
- id: prettier
- repo: https://github.com/rtts/djhtml
rev: "3.0.6"
hooks:
- id: djhtml
default_language_version:
python: python3.9.7

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
*.html