table-groups.md
June 12, 2019 ยท View on GitHub
table-groups
It is best practice to group table rows into one of:
theadtbodytfoot
This helps avoid a very nuanced (and possibly deprecated in the future) feature of glimmer that auto-inserts these tags.
This rule forbids the following:
<table>
<tr>
<td></td>
</tr>
</table>
<table>
{{some-thing content=content}}
</table>
This rule allows the following:
<table>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
{{some-thing content=content}}
</tbody>
</table>
<table>
{{some-component tagName="tbody"}}
</table>
If you have a component with one of the table groups specified as its tagName, you should disable the rule inline:
<table>
{{! template-lint-disable table-groups }}
{{some-component-with-tagName-tbody}}
</table>