File tree Expand file tree Collapse file tree 4 files changed +42
-2
lines changed
Expand file tree Collapse file tree 4 files changed +42
-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,26 @@ repos:
1818 - id : ruff
1919 args : [ "--fix"]
2020 - id : ruff-format
21+ - repo : local
22+ hooks :
23+ - id : djlint-check
24+ name : djLint Check
25+ entry : djlint
26+ language : python
27+ types : [html]
28+ args : ["--lint", "--profile=django"]
29+ additional_dependencies : ['djlint==1.36.4']
30+ - id : djlint-format
31+ name : djLint Format
32+ entry : djlint
33+ language : python
34+ types : [html]
35+ args : ["--reformat", "--profile=django"]
36+ additional_dependencies : ['djlint==1.36.4']
37+ - repo : https://github.com/hukkin/mdformat
38+ rev : v0.7.22
39+ hooks :
40+ - id : mdformat
41+ # additional_dependencies:
42+ # - mdformat-gfm # GH Flavored Markdown support (want?)
43+ # - 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