Skip to content

Files

54 lines (43 loc) · 819 Bytes

table-groups.md

File metadata and controls

54 lines (43 loc) · 819 Bytes

table-groups

It is best practice to group table rows into one of:

  • thead
  • tbody
  • tfoot

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>

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>