Skip to content

fix(no-async-in-computed-properties): Allow async in nested scopes #745

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

Merged
merged 1 commit into from
Jan 3, 2019

Conversation

michalsnik
Copy link
Member

Fixes #725

@michalsnik michalsnik self-assigned this Jan 2, 2019
@armano2
Copy link
Contributor

armano2 commented Jan 2, 2019

This is not going to be perfect is still going to warn about:

foo() {
 const foo = {
   async bar() => await baz()
 }
 return foo
}

@michalsnik what do you think about using Code Path Analysis to determine if function is reachable?

on other hand there if we implement in this way we are not going to catch...

foo() {
 const foo = {
   async bar() => await baz()
 }
 return foo.bar()
}

Copy link
Contributor

@armano2 armano2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its looks ok, it's good improvement.

@michalsnik
Copy link
Member Author

Yeah, it's a pet peeve. We'll never be 100% covered, but at least we can minimize most common false positives. Let's iterate and see whether someone will happen to struggle with the other case.

@michalsnik michalsnik merged commit eefb98f into master Jan 3, 2019
@michalsnik michalsnik deleted the fix-no-async-in-computed-properties branch January 3, 2019 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants