Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 999 Bytes

File metadata and controls

45 lines (31 loc) · 999 Bytes

ember/template-no-attribute-splat-on-html-element

💼 This rule is enabled in the following configs: strict-gjs, strict-gts.

Disallows using ...attributes on HTML elements.

Rule Details

The ...attributes syntax should only be used on component elements, not on HTML elements, to avoid confusion and maintain clear component boundaries.

Examples

Examples of incorrect code for this rule:

<template>
  <div ...attributes></div>
</template>
<template>
  <span ...attributes></span>
</template>

Examples of correct code for this rule:

<template>
  <MyComponent ...attributes />
</template>
<template>
  <div class="wrapper"></div>
</template>

References