Skip to content

Commit

Permalink
ci: init pre-commit hook for code reformatting
Browse files Browse the repository at this point in the history
- Use black for python, djlint for html, prettier for css and js

Resolves: #117
  • Loading branch information
yinanazhou committed Jul 17, 2024
1 parent 7bcdeb3 commit f81b8d6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1a1
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.2
hooks:
- id: prettier
additional_dependencies: ["prettier@2.3.2"]
files: "\\.(js|jsx|ts|tsx|css|scss|less|json|yaml|yml|md)$"

- repo: https://github.com/djlint/djLint
rev: v1.34.1
hooks:
- id: djlint-reformat-django
- id: djlint-django

0 comments on commit f81b8d6

Please sign in to comment.