ember/template-no-chained-this
February 23, 2026 ยท View on GitHub
๐ง This rule is automatically fixable by the --fix CLI option.
Disallow redundant this.this in templates.
Using this.this.* in templates is almost always a typo or copy/paste mistake. These patterns are misleading and result in unnecessary ambiguity about scope and component context.
Rule Details
This rule disallows this.this.* patterns in templates (e.g., {{this.this.foo}} or <this.this.Bar />).
Examples
Incorrect โ
<template>
{{this.this.value}}
</template>
<template>
{{#this.this.foo}}
some text
{{/this.this.foo}}
</template>
<template>
{{helper value=this.this.foo}}
</template>
<template>
<this.this.Component />
</template>
<template>
{{component this.this.dynamicComponent}}
</template>
Correct โ
<template>
{{this.value}}
</template>
<template>
<this.Component />
</template>
<template>
{{component this.dynamicComponent}}
</template>
<template>
{{@argName}}
</template>
Migration
Remove the extra this:
Before:
<template>
{{this.this.foo}}
<this.this.bar />
</template>
After:
<template>
{{this.foo}}
<this.bar />
</template>