# Htmllint for locales html file

**URL:** https://discourse.nodered.org/t/htmllint-for-locales-html-file/19445
**Category:** Share Your Projects
**Created:** [22 December 2019 00:08 UTC](https://discourse.nodered.org/t/htmllint-for-locales-html-file/19445 "2019-12-22T00:08:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![okhiroyuki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/okhiroyuki/32/15056_2.png) [@okhiroyuki](https://discourse.nodered.org/u/okhiroyuki)
#### Post date: [22 December 2019 00:08 UTC](https://discourse.nodered.org/t/htmllint-for-locales-html-file/19445/1 "2019-12-22T00:08:48Z")

</div>

Hi.

I created a grunt plugin that runs htmllint for locales HTML files created by custom nodes and so on.

With this, you can easily check that the tags are not closed or that they are not used as HTML structures.

See [grunt-nr-locales-htmllint](https://www.npmjs.com/package/grunt-nr-locales-htmllint) for details.

## Example

run grunt

 ![スクリーンショット 2019-12-22 9.03.46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8b52b21d23da4117371f359563b037406b58dc58.png)

check code

 ![スクリーンショット 2019-12-22 9.05.08](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0bef760ddf139cf4ea0004c48e879f5a86f07c17.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [22 December 2019 08:22 UTC](https://discourse.nodered.org/t/htmllint-for-locales-html-file/19445/2 "2019-12-22T08:22:55Z")

</div>

In fact the type "text/x-red" is historical. You can now change that to "text/html" and your normal linter should work. We are changing files to that as we need to rather than change all at once.

---

<div class="post-metadata">

### Author: ![okhiroyuki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/okhiroyuki/32/15056_2.png) [@okhiroyuki](https://discourse.nodered.org/u/okhiroyuki)
#### Post date: [22 December 2019 08:45 UTC](https://discourse.nodered.org/t/htmllint-for-locales-html-file/19445/3 "2019-12-22T08:45:01Z")

</div>

> [@dceejay](#):
>
> You can now change that to "text/html" and your normal linter should work.

Thank you very much! That's very good information for me.

> [@dceejay](#):
>
> We are changing files to that as we need to rather than change all at once.

From now on, I will do that too.
