ember/template-no-unnecessary-concat

March 21, 2026 ยท View on GitHub

๐Ÿ”ง This rule is automatically fixable by the --fix CLI option.

๐Ÿ’… The extends: 'stylistic' property in a configuration file enables this rule.

This rule forbids unnecessary use of quotes ("") around expressions like {{myValue}}.

Examples

This rule forbids the following:

<template>
  <span class="{{if errors.length 'text-danger' 'text-grey'}}">
  <img src="{{customSrc}}" alt="{{customAlt}}">
  <label for="{{concat elementId "-date"}}">
</template>

This rule allows the following:

<template>
  <span class={{if errors.length 'text-danger' 'text-grey'}}>
  <img src={{customSrc}} alt={{customAlt}}>
  <label for={{concat elementId "-date"}}>
</template>

Migration

Use regexp find-and-replace to fix existing violations of this rule:

BeforeAfter
="{{([^}]+)}}"={{\$1}}

References