ember-no-implicit-this-codemod
ember-no-implicit-this-codemod copied to clipboard
Transform to `{{@foo}}` if component class does not define the property
In it's current state the codemod transforms {{foo}}
always to {{this.foo}}
(skipping template-only components). It should transform {{foo}}
to {{@foo}}
instead if the property is not defined by the class of the codemod.
It may always transform to {{this.foo}}
if the component extends from another component cause parsing parent classes may be to complex. It should print a warning in that case.
I think given that we can use the arguments passed into the component to reference what needs this.
and what needs @
this should be straightforward. Looking into fixing this for our use cases in our application.
I'm pretty sure that @suchitadoshi1987 has work in progress to address this.
@rwjblue she said she would link to this issue in a conversation I had with her. @suchitadoshi1987 😄
https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/123
This PR would address this issue. However, it will not assume the prefixing of @
. It just makes the prefixing of this
more stricter.
cc @gabrielcsapo ^^
thank you @suchitadoshi1987
Any update on this?