djlint / djLint

✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang
https://djLint.com
GNU General Public License v3.0
709 stars 84 forks source link

[BUG] [Linter] #560

Closed marty0678 closed 1 year ago

marty0678 commented 1 year ago

System Info

Issue

Specific linting rules as defined in the docs and this issue - https://github.com/Riverside-Healthcare/djLint/issues/113 do not seem to apply, as you can not filter out specific rules in the template.

How To Reproduce

An example of a code block that I would expect to still display an H021 error for in-line styles, but it does not. All linting rules appear to be ignored, regardless of the filter.

            {% comment %} djlint:off H025 {% endcomment %}
            <h1 style="margin: 0">
                Welcome to My Website
            </h1>
            {% comment %} djlint:on {% endcomment %}

Contents of .djlintrc/pyproject.toml [tool.djlint]

{
    "blank_line_before_tag": "load,extends,include",
    "preserve_blank_lines": true,
    "max_line_length": "30",
    "max_attribute_length": "3",
    "format_js": true,
    "format_css": true
}

It appears to still happen if I clear out my config as well.

christopherpickering commented 1 year ago

Thanks! will get a fix for this out soon.

christopherpickering commented 1 year ago

:tada: This issue has been resolved in version 1.19.16 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

marty0678 commented 1 year ago

Amazing thank you for the fast turn around!