Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 885 Bytes

no-block-params-for-html-elements.md

File metadata and controls

38 lines (24 loc) · 885 Bytes

no-block-params-for-html-elements

Block parameters (<Checkbox as |checkbox|>) are only useful when invoking components. When they are used on regular HTML elements they are useless and an indicator of a potential bug.

This rule warns about all block parameter usages on regular HTML elements (angle bracket invocations with lower-case tagnames).

Examples

This rule forbids the following:

<div as |blockName|></div>

This rule allows the following:

<div></div>
<Checkbox as |blockName|></Checkbox>

Migration

  • Remove the unused block parameters or fix the tag name to refer to a component

Related Rules

References