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

templates-no-negated-async ignores when parens are missing #716

Closed
axelboc opened this issue Oct 18, 2018 · 0 comments
Closed

templates-no-negated-async ignores when parens are missing #716

axelboc opened this issue Oct 18, 2018 · 0 comments
Labels

Comments

@axelboc
Copy link

axelboc commented Oct 18, 2018

I just ran into a bug with a negated async pipe. Rule templates-no-negated-async didn't catch it because the parens were missing:

*ngIf="!loading$ | async"

This condition is perfectly valid, but this is not what was intended (a bit like the case of the box in the banana). Moreover, in cases where the parens are purposely left out, there are less confusing ways of implementing the same behaviour (like an extra ng-container with the !loading$ condition on its own).

Therefore, I feel like the templates-no-negated-async rule should be stricter and report async pipes that follow negated observables. To not break current behaviour, this could be implemented as an option.

@mgechev mgechev added the bug label May 22, 2019
@axelboc axelboc closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants