HTMLHint icon indicating copy to clipboard operation
HTMLHint copied to clipboard

Add support for Django templates

Open dreamawakening opened this issue 8 years ago • 10 comments

All of the HTML files for my project (and other Django projects) use Django's template language. It'd be nice to have support for this.

dreamawakening avatar Nov 10 '17 05:11 dreamawakening

Same goes for .erb templates (ruby)

mollerhoj avatar Jan 14 '18 00:01 mollerhoj

For Django templates (which is actually file with .html extension) the warning appears Doctype must be declared first. But it is not correct. Because this Django template inherited from base template, in which Doctype exists. Such warnings for Django templates which inherited from other Django templates should check Doctype not in the current file but in its ancestors.

osya avatar Feb 26 '18 20:02 osya

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 14 '20 02:05 stale[bot]

I am still interested in this issue. I hope someone will be able to do this someday.

Mogost avatar May 14 '20 20:05 Mogost

Thanks @Mogost for the update. Let's see if someone wants to tackle that new feature in the future...

thedaviddias avatar May 14 '20 21:05 thedaviddias

IMO we should do 2 thing with this Issue

  1. We should look into our codebase if it can survive parsing/hinting template engines like Django and Ruby If not, we need to make this possible
  2. Then there should be a repo for specialized rules like for Django that exposes some Custom Rules that can be used via load-custom-rules in the first place

So it would be a first start of a plugin system

Shinigami92 avatar May 15 '20 11:05 Shinigami92

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 14 '20 12:07 stale[bot]

Bump

Shinigami92 avatar Jul 14 '20 12:07 Shinigami92

Bump!

We are working on a Django project and want to use superlinter, but without this, we have had to enable DISABLE_ERRORS which pretty much defeats the object. Would be great to see this sometime soon.

jamesgeddes avatar Jan 23 '21 13:01 jamesgeddes

I have the same issue.

dbsxdbsx avatar Feb 28 '21 08:02 dbsxdbsx

Maybe add support for per-language configuration to have a different set of rules for django-html?

GBrachetta avatar Mar 17 '21 11:03 GBrachetta

I use template-toolkit, similar issues on parsing files with template directives. Example line that causes issues: <input class = "tabDivButton" type="radio" name="tabSet[%global.tabSetNum%]" id="tab[%global.uid%]" [% IF chk %]checked[% END %]>

audio441 avatar Apr 11 '21 21:04 audio441

still alive and kicking in 2022 with django template files

lolrenx avatar Jan 18 '22 15:01 lolrenx