Skip to content

Incorporate djlint to lint HTML templates #4210

Open

Description

Current Situation

We do not lint HTML templates.

Suggested Improvement

Incorporate https://www.djlint.com/ to lint templates. We should do this in the infrastructure repository as well (we make heavy use of both go and jinja templates there).

Benefit

Prevent significant stylistic differences from appearing in our templates and remove this from PR-review consideration for maintainers.

Additional context

Occurred to me while reviewing #4169 where our first meaningful Django template is added for admin pages, and we don't have any tool to suggest best practices within the framework or ensure consistent formatting, and I've been wanting something like this in the infrastructure repository where we make heavy use of templates but have no necessary uniformity in the approaches.

Staff only because it's also needed in the private infrastructure repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    🔒 staff onlyRestricted to staff members🟨 priority: mediumNot blocking but should be addressed soon🤖 aspect: dxConcerns developers' experience with the codebase🧰 goal: internal improvementImprovement that benefits maintainers, not users🧱 stack: mgmtRelated to repo management and automations

    Type

    No type

    Projects

    • Status

      📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions