-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
[FEATURE] Add option to ignore lint errors in the html #113
Comments
Would |
Thank you for this amazing project, I was looking for something like this for years :) What about this syntax:
TBH I am not sure if templatetags can be variadic though. Again, kudos for this project! |
It would be wonderful to if djlint would support this. I have a Flask project that uses templates for frontend and email. And of course, I don't want to apply all rules to the email templates. Currently, I just ignore all email templates. But that is a bad solution. |
Thanks! I think I will expand the current syntax for ignoring. So to ignore just H025 (and H026 in the first example): {# djlint:off H025,H026 #}
<p>
{# djlint:on #}
<!-- djlint:off H025-->
<p>
<!-- djlint:on -->
{% comment %} djlint:off H025 {% endcomment %}
<p>
{% comment %} djlint:on {% endcomment %}
{{!-- djlint:off H025 --}}
<p>
{{!-- djlint:on --}}
{{ /* djlint:off H025 */ }}
<p>
{{ /* djlint:on */ }} |
# [1.4.0](v1.3.0...v1.4.0) (2022-07-05) ### Features * **ignore rules:** added option to ignore linter rules with inline comments ([1b3159f](1b3159f)), closes [#113](#113)
🎉 This issue has been resolved in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Wow, that was pretty fast now. Thank you! |
Thanks for this! I'm using 1.19.15 and the specific linting rules do not seem to be applying. For example:
Turns off all rule linting for this code block, where I would expect the H021 error to still be shown. Am I doing something wrong? If not I can open a bug. Thank you! |
hey @marty0678 do you mind opening a new issue? Thanks! |
for example, maybe I need an inline style:
can I ignore the H021 code with something like this?
The text was updated successfully, but these errors were encountered: