diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3c8a387c..2de9f42e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,3 +14,20 @@ jobs: - uses: astral-sh/ruff-action@v1 with: changed-files: 'true' + + djlint: + runs-on: ubuntu-latest + name: Lint HTML + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + + - name: Install dependencies + run: | + pip install -U pip + pip install djlint + + - name: Lint + run: djlint --lint . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6edf54f..e829ce98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,4 @@ repos: rev: v1.35.2 hooks: - id: djlint-reformat-django + - id: djlint-django diff --git a/pyproject.toml b/pyproject.toml index a12aa292..eacb0d2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,3 +43,4 @@ select = ["E4", "E7", "E9", "F4", "F5", "F6", "F7", "F8", "F9"] [tool.djlint] profile="django" indent = 2 +ignore="H006,D018"