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

New rule: No chaining this to itself #2985

Open
roneesh opened this issue Oct 6, 2023 · 2 comments
Open

New rule: No chaining this to itself #2985

roneesh opened this issue Oct 6, 2023 · 2 comments

Comments

@roneesh
Copy link

roneesh commented Oct 6, 2023

While reviewing a PR at my work recently, we caught an instance of this being chained to this:

this.this.foo

And it didn't throw a lint error. I'm not seeing this in the docs either as a lint rule, so I propose that it be one (and happy to work on it!)

Here is an example app: https://github.com/roneesh/no-chained-this-example/blob/main/app/components/chained-this.hbs

@roneesh
Copy link
Author

roneesh commented Oct 6, 2023

Also please note that I upgraded to the latest version of the package and ran npm run lint:hbs and did not see any errors.

@roneesh
Copy link
Author

roneesh commented Oct 7, 2023

Here's a screencap of that component with the server running
example of browser rendering of linked component

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

No branches or pull requests

2 participants