Shopify / erb_lint

Lint your ERB or HTML files
MIT License
676 stars 122 forks source link

Using less than symbol (`<`) in HTML causes syntax error. #344

Open joshuapinter opened 9 months ago

joshuapinter commented 9 months ago

Using something like this:

<tr>
  <td>< 2 times per year</td>
</tr>

Throws something like the following error when linting:

Cache mode is on
Linting 642 files with 9 linters...
app/views/mymodel/show.html.erb:324:15: expected '/' or tag name (at  )
app/views/mymodel/show.html.erb:324:27: expected '>' after '/' (at  )
app/views/mymodel/show.html.erb:324:32: expected whitespace, '>' or '=' after attribute name (at ?)
app/views/mymodel/show.html.erb:324:32: expected whitespace, '>', attribute name or value (at ?)

The work around was to use &lt; instead of < but I thought I would post here to see what your thoughts were on this and if it's something you want the library to handle?