Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 916 Bytes

File metadata and controls

41 lines (27 loc) · 916 Bytes

ember/template-no-bare-yield

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

✅ The extends: 'plugin:ember/strict-gjs' or extends: 'plugin:ember/strict-gts' property in a configuration file enables this rule.

Disallow {{yield}} without parameters outside of contextual components.

Rule Details

This rule enforces passing parameters to {{yield}} to make component APIs more explicit.

Examples

Examples of incorrect code for this rule:

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

Examples of correct code for this rule:

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

<template>
  {{yield @model}}
</template>
  • strictGjs: true
  • strictGts: true