Skip to content

Commit ca2c0e3

Browse files
committed
PAPP-35407 testing
1 parent 93dbdf8 commit ca2c0e3

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

dev-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
ruff==0.7.3
22
semgrep==0.83.0
33
pre-commit==4.1.0
4+
djlint==1.36.4
5+
mdformat==0.7.22

lint-configs/pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,20 @@ quote-style = "double"
4949
indent-style = "space"
5050
skip-magic-trailing-comma = false
5151
line-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

pre-commit/orghooks.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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?)

pre-commit/run-org-hooks

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ from pathlib import Path
1212

1313
ORGHOOKS_DIR = Path(__file__).resolve().parent
1414

15-
LINT_CONFIG_FILE = "tox.ini"
1615
MODERN_LINT_CONFIG_FILE = "pyproject.toml"
1716

1817

1918
def 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

0 commit comments

Comments
 (0)