Lint rules¶
djangofmt's built-in lint rules, grouped by category. Each rule has a stable kebab-case name; click through for the rule's documentation, examples, and source location.
Correctness¶
| Name | Message | Fix |
|---|---|---|
| invalid-attr-value | Invalid value '{}' for attribute '{}'. | None |
| untrimmed-blocktranslate | {% blocktranslate %} should declare trimmed to avoid leaking indentation into translation strings. |
Always |
Suspicious¶
| Name | Message | Fix |
|---|---|---|
| javascript-url | Avoid javascript: URLs in {}. |
None |
Style¶
| Name | Message | Fix |
|---|---|---|
| empty-attr-value | Empty {} attribute can be removed. |
Always |
| redundant-type-attr | Redundant type="{}" on <{}> tag. | Always |
| uppercase-form-method | Form method {} should be lowercase. |
Always |
| form-action-whitespace | Extra whitespace found in form action. |
Always |
Accessibility¶
| Name | Message | Fix |
|---|---|---|
| missing-html-lang | <html> tag should declare a lang attribute. |
None |