Skip to content

deprecated-ignore

Added in 1.0.0 · Related issues · View source

Fix is sometimes available.

What it does

Checks for the formatter's legacy bare ignore directive, in either comment style.

Why is this bad?

{# djangofmt:ignore #} and <!-- djangofmt:ignore --> are the deprecated spellings of {# djangofmt: ignore[format] #}, which names what it suppresses and shares its grammar with every other suppression. The HTML form is also shipped to the client.

Example

{# djangofmt:ignore #}
<div   class="keep-this-unformatted"   >Content</div>

Use instead:

{# djangofmt: ignore[format] #}
<div   class="keep-this-unformatted"   >Content</div>