💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Disallow usage of the (mut) helper.
The (mut) helper was used in classic Ember to create two-way bindings. In modern Ember (Octane and beyond), this pattern is discouraged in favor of explicit one-way data flow with actions or setters.
This rule disallows using the (mut) helper in templates.
<template>
<Input @value={{this.name}} @onChange={{mut this.name}} />
</template><template>
{{input value=(mut this.name)}}
</template><template>
<CustomComponent @onChange={{mut this.value}} />
</template><template>
<Input @value={{this.name}} @onChange={{this.updateName}} />
</template><template>
<Input @value={{this.name}} @onChange={{fn (mut this "name")}} />
</template><template>
<CustomComponent @onChange={{this.handleChange}} />
</template>