From 311fd36bc8a9ffdecbd20ec473dce61f0cc254f5 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 5 Jul 2022 17:02:13 +0100 Subject: [PATCH 1/2] Change pre-commit django definition --- .pre-commit-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 10e3c8e..fa44bfd 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,7 +1,7 @@ - id: djlint-django name: djLint for Django entry: djlint --profile=django - files: "templates/.*\\.html$" + types_or: [html] language: python - id: djlint-jinja From e5f031642a426e7f4fcc4a5eef9b7f8839323712 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 5 Jul 2022 17:06:50 +0100 Subject: [PATCH 2/2] use types for others --- .pre-commit-hooks.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index fa44bfd..ea8ed91 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -7,23 +7,23 @@ - id: djlint-jinja name: djLint for Jinja entry: djlint --profile=jinja - files: "\\.j2$" + types_or: [jinja] language: python - id: djlint-nunjucks name: djLint for Nunjucks entry: djlint --profile=nunjucks - files: "\\.njk$" + types_or: [nunjucks] language: python - id: djlint-handlebars name: djLint for Handlebars/Mustache entry: djlint --profile=handlebars - files: "\\.hbs" + types_or: [handlebars] language: python - id: djlint-golang name: djLint for Golang templates entry: djlint --profile=golang - files: "\\.tmpl" + types_or: [gotmpl] language: python