Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 903 Bytes

no-nested-splattributes.md

File metadata and controls

37 lines (25 loc) · 903 Bytes

no-nested-splattributes

✅ The extends: 'recommended' property in a configuration file enables this rule.

Having ...attributes on multiple elements nested within each other in a component can cause unintended results.

This rule prevent you from running into this issue by disallowing ...attributes if any of the parent elements already has ...attributes on it.

Examples

This rule forbids the following:

<div ...attributes>
  <div ...attributes>
    ...
  </div>
</div>

This rule allows the following:

<div ...attributes>...</div>
<div ...attributes>...</div>

Migration

  • Remove the inner ...attributes declaration

References