ember/template-no-this-in-template-only-components
March 22, 2026 ยท View on GitHub
๐ง This rule is automatically fixable by the --fix CLI option.
There is no this context in template-only components.
Examples
This rule forbids this in template-only components:
<h1>Hello {{this.name}}!</h1>
The --fix option will convert to named arguments:
<h1>Hello {{@name}}!</h1>
Migration
- use ember-no-implicit-this-codemod
- upgrade to Glimmer components, which don't allow ambiguous access
- classic components have auto-reflection, and can use
this.myArgNameorthis.args.myArgNmeor@myArgNameinterchangeably
- classic components have auto-reflection, and can use