Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.01 KB

File metadata and controls

45 lines (31 loc) · 1.01 KB

ember/template-no-extra-mut-helpers

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

Disallows unnecessary mut helpers.

Rule Details

The mut helper is often unnecessary when passing simple values or properties. It should only be used when explicitly creating a mutable reference is required.

Examples

Examples of incorrect code for this rule:

<template>
  <MyComponent @onChange={{mut this.value}} />
</template>
<template>
  <Input @value={{mut this.text}} />
</template>

Examples of correct code for this rule:

<template>
  <MyComponent @value={{this.value}} />
</template>
<template>
  <Input @value={{this.text}} />
</template>

References