diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 582e6b1..9d5a803 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -76,6 +76,15 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] + - repo: local + hooks: + - id: djlint + name: djlint + entry: djlint + files: \.jinja2$ + language: python + additional_dependencies: [djlint] + - repo: https://github.com/elidupuis/mirrors-sass-lint rev: "5cc45653263b423398e4af2561fae362903dd45d" hooks: diff --git a/pyproject.toml b/pyproject.toml index 2d49478..51f6cc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,3 +111,7 @@ warn_redundant_casts = true warn_return_any = true warn_unreachable = true warn_unused_configs = true + +[tool.djlint] +profile = "jinja" +ignore = "H005,H016,H030,H031,H006,H013" diff --git a/src/pytest_html/resources/index.jinja2 b/src/pytest_html/resources/index.jinja2 index 933fed2..587b675 100644 --- a/src/pytest_html/resources/index.jinja2 +++ b/src/pytest_html/resources/index.jinja2 @@ -31,6 +31,7 @@ No results found. Check the filters. +