Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform to {{@foo}} if component class does not define the property #107

Open
jelhan opened this issue Jan 18, 2020 · 7 comments
Open

Comments

@jelhan
Copy link
Contributor

jelhan commented Jan 18, 2020

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.

@gabrielcsapo
Copy link

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.

Copy link
Member

rwjblue commented Apr 16, 2020

I'm pretty sure that @suchitadoshi1987 has work in progress to address this.

@gabrielcsapo
Copy link

@rwjblue she said she would link to this issue in a conversation I had with her. @suchitadoshi1987 😄

@suchitadoshi1987
Copy link

#123
This PR would address this issue. However, it will not assume the prefixing of @. It just makes the prefixing of this more stricter.

@suchitadoshi1987
Copy link

cc @gabrielcsapo ^^

@gabrielcsapo
Copy link

thank you @suchitadoshi1987

@kexposito
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants