ember/template-no-nested-splattributes

April 20, 2026 ยท View on GitHub

๐Ÿ’ผ This rule is enabled in the ๐Ÿ“‹ template-lint-migration config.

Disallow nested ...attributes usage.

Having ...attributes on multiple elements nested within each other in a component can cause unintended results. This rule prevents ...attributes on an element if any of its parent elements already has ...attributes.

Rule Details

This rule disallows ...attributes on an element when an ancestor element already has ...attributes.

Examples

Incorrect โŒ

<template>
  <div ...attributes>
    <span ...attributes>Text</span>
  </div>
</template>
<template>
  <section ...attributes>
    <div>
      <button ...attributes>Click</button>
    </div>
  </section>
</template>

Correct โœ…

<template>
  <div ...attributes>Content</div>
</template>
<template>
  <div ...attributes>
    <span>Text</span>
  </div>
</template>
<template>
  <div ...attributes>first</div>
  <div ...attributes>second</div>
</template>

Migration

  • Remove the inner ...attributes declaration

References