ember/template-no-yield-only

April 20, 2026 ยท View on GitHub

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

Templates that only contain a single {{yield}} instruction are not required and increase the total template payload size.

This rule warns about templates that only contain a single {{yield}} instruction.

Examples

This rule forbids the following:

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

   {{yield}}

</template>

This rule allows the following:

<template>
  {{yield something}}
</template>
<template>
  <div>{{yield}}</div>
</template>

Migration

  • delete all files that are flagged by this rule

References