✅ The extends: 'plugin:ember/strict-gjs' or extends: 'plugin:ember/strict-gts' property in a configuration file enables this rule.
Require simple conditions in {{#unless}} blocks. Complex expressions should use {{#if}} with negation instead.
This rule enforces using simple property paths in {{#unless}} blocks rather than complex helper expressions.
Examples of incorrect code for this rule:
<template>
{{#unless (eq value 1)}}
Not one
{{/unless}}
</template>
<template>
{{#unless (or a b)}}
Neither
{{/unless}}
</template>Examples of correct code for this rule:
<template>
{{#unless isHidden}}
Visible
{{/unless}}
</template>
<template>
{{#if (not (eq value 1))}}
Not one
{{/if}}
</template>- strictGjs: true
- strictGts: true