File tree Expand file tree Collapse file tree 4 files changed +37
-2
lines changed
Expand file tree Collapse file tree 4 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 11ruff == 0.7.3
22semgrep == 0.83.0
33pre-commit == 4.1.0
4+ djlint == 1.36.4
5+ mdformat == 0.7.22
Original file line number Diff line number Diff line change @@ -49,3 +49,20 @@ quote-style = "double"
4949indent-style = " space"
5050skip-magic-trailing-comma = false
5151line-ending = " auto"
52+
53+ # HTML linting
54+ [tool .djlint ]
55+ profile =" nunjucks"
56+
57+ # Markdown linting
58+ [tool .mdformat ]
59+ wrap_code = true
60+ wrap_tables = true
61+ wrap_md = true
62+ wrap_md_code = true
63+ wrap_md_code_blocks = true
64+ wrap_md_lists = true
65+ wrap_md_md = true
66+ wrap_md_md_code = true
67+ wrap_md_md_code_blocks = true
68+ wrap_md_md_lists = true
Original file line number Diff line number Diff line change @@ -18,3 +18,21 @@ repos:
1818 - id : ruff
1919 args : [ "--fix"]
2020 - id : ruff-format
21+ - repo : https://github.com/djlint/djLint
22+ rev : v1.36.4
23+ hooks :
24+ - id : djlint
25+ args : ["--lint", "--profile=django"]
26+ types_or : [html]
27+ files : " .*\\ .html$"
28+ - id : djlint-reformat
29+ args : ["--reformat", "--profile=django"]
30+ types_or : [html]
31+ files : " .*\\ .html$"
32+ - repo : https://github.com/hukkin/mdformat
33+ rev : v0.7.22
34+ hooks :
35+ - id : mdformat
36+ # additional_dependencies:
37+ # - mdformat-gfm # GH Flavored Markdown support (want?)
38+ # - mdformat-frontmatter # YAML support (want?)
Original file line number Diff line number Diff line change @@ -12,15 +12,13 @@ from pathlib import Path
1212
1313ORGHOOKS_DIR = Path (__file__ ).resolve ().parent
1414
15- LINT_CONFIG_FILE = "tox.ini"
1615MODERN_LINT_CONFIG_FILE = "pyproject.toml"
1716
1817
1918def copy_configs (dest_dir ):
2019 """Override configurations for hooks"""
2120 dev_tools_dir = ORGHOOKS_DIR .parent
2221 lint_configs_dir = dev_tools_dir / "lint-configs"
23- shutil .copyfile (lint_configs_dir / LINT_CONFIG_FILE , dest_dir / LINT_CONFIG_FILE )
2422 shutil .copyfile (lint_configs_dir / MODERN_LINT_CONFIG_FILE , dest_dir / MODERN_LINT_CONFIG_FILE )
2523
2624
You can’t perform that action at this time.
0 commit comments