💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Disallows unnecessary usage of the {{fn}} helper.
When {{fn}} is used with only a function reference and no arguments to curry, it's redundant. You can pass the function directly.
This rule detects when {{fn}} is called with only one argument (the function itself) and no curried arguments.
Examples of incorrect code for this rule:
<template>
<button {{on "click" (fn this.handleClick)}}>Click</button>
</template><template>
<Component @action={{fn this.save}} />
</template>Examples of correct code for this rule:
<template>
<button {{on "click" this.handleClick}}>Click</button>
</template><template>
<button {{on "click" (fn this.handleClick arg)}}>Click</button>
</template><template>
<Component @action={{this.save}} />
</template>Replace:
<button {{on "click" (fn this.action)}}>With:
<button {{on "click" this.action}}>