Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 918 Bytes

File metadata and controls

42 lines (29 loc) · 918 Bytes

ember/template-no-yield-only

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

Disallows components that only yield without any wrapper or additional functionality.

Rule Details

Components should provide some structure or functionality beyond just yielding. If a component only yields, it adds unnecessary indirection.

Examples

Examples of incorrect code for this rule:

<template>
  {{yield}}
</template>

Examples of correct code for this rule:

<template>
  <div class="wrapper">
    {{yield}}
  </div>
</template>
<template>
  {{this.setup}}
  {{yield}}
</template>

References