-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add djade linter for Django templates (Fixes #2372) #2382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
6f24eca to
cb91ead
Compare
cb91ead to
892f574
Compare
sarahboyce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! A couple of minor nitpicks
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
sarahboyce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
|
Thanks for the review and approval, @sarahboyce! I appreciate the guidance on the configuration details. I’ll leave the commits as they are for now, assuming they will be squashed upon merging. Ready when you are! |
Summary
This PR adds the
djadelinter to the project's pre-commit configuration and applies formatting fixes to existing Django templates. This ensures consistent code style (e.g., standardizing whitespace in{{ variables }}) across the codebase.Rationale
As discussed in #2372,
djadewas selected over alternatives likedjLintbecausedjadeis actively maintained and specifically targets Django template formatting. This aligns with the project's goal of using stable, long-term tools.Changes
adamchainz/djade-pre-commit(v1.6.0) to.pre-commit-config.yaml..htmltemplates.Verification
pre-commit run djade --all-fileslocally (passed formatting checks).