From 39eaf9b9e1e6faaa14954111a546abc02c20d486 Mon Sep 17 00:00:00 2001 From: Alejandro Franco Date: Fri, 13 Oct 2023 14:48:31 -0600 Subject: [PATCH] Linters adjustment for this project --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 10 +++++++++- {{cookiecutter.project_slug}}/pyproject.toml | 8 ++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index e29068d58..b128737f7 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -7,7 +7,11 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer - - id: check-json + exclude: '\.min\.(css|js)$' + exclude_types: + - svg + - map + # - id: check-json - id: check-toml - id: check-xml - id: check-yaml @@ -55,7 +59,11 @@ repos: rev: v1.34.0 hooks: - id: djlint-reformat-django + files: "templates" + exclude: r'gto_supply/static/.*' - id: djlint-django + files: "templates" + exclude: r'gto_supply/static/.*' # sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date ci: diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 7e4c9aa9c..b11b8ea22 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -94,12 +94,12 @@ generated-members = [ # ==== djLint ==== [tool.djlint] -blank_line_after_tag = "load,extends" +blank_line_after_tag = "load,extends,endblock" close_void_tags = true -format_css = true -format_js = true +format_css = false +format_js = false # TODO: remove T002 when fixed https://github.com/Riverside-Healthcare/djLint/issues/687 -ignore = "H006,H030,H031,T002" +ignore = "H006,H030,H031,T002,H020,H023,H033,D018" include = "H017,H035" indent = 2 max_line_length = 119