✅ The extends: 'recommended'
property in a configuration file enables this rule.
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 also enforces that all children of the table
element are in the correct order:
caption
colgroup
thead
tbody
tfoot
This rule forbids the following:
This rule allows the following:
If you have a component with one of the table groups specified as its tagName
, or it has no tag and instead only has valid children, you can
allow it with your configuration.
'table-groups': {
'allowable-tbody-components': 'some-component-with-tag-name-tbody',
}
One of these:
- boolean -
true
to enable /false
to disable - object[] - with the following keys:
allowed-caption-components
- string[] - components to treat as having the caption tag (using kebab-case names likenested-scope/component-name
)allowed-colgroup-components
- string[] - components to treat as having the colgroup tag (using kebab-case names likenested-scope/component-name
)allowed-thead-components
- string[] - components to treat as having the thead tag (using kebab-case names likenested-scope/component-name
)allowed-tbody-components
- string[] - components to treat as having the tbody tag (using kebab-case names likenested-scope/component-name
)allowed-tfoot-components
- string[] - components to treat as having the tfoot tag (using kebab-case names likenested-scope/component-name
)