🔧 The --fix
option on the command line can automatically fix some of the problems reported by this rule.
There is no this
context in template-only components.
This rule forbids this
if the template has no corresponding component.js
:
This rule allows this
if the template has a corresponding component.js
:
import Component from '@ember/component';
export default Component.extend({
name: 'Derek'
});
The --fix
option will convert to named arguments:
- boolean --
true
for enabled /false
for disabled - object -- An object with the following keys:
validComponentExtensions
-- An array of component class extensions. Defaults to[ '.js', '.ts' ]
- 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.myArgName
orthis.args.myArgNme
or@myArgName
interchangeably
- classic components have auto-reflection, and can use