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
Add require-await lint rule #4401
Conversation
cli/js/permissions.ts
Outdated
async query(desc: PermissionDescriptor): Promise<PermissionStatus> { | ||
query(desc: PermissionDescriptor): PermissionStatus { | ||
const state = permissionsOps.query(desc); | ||
return new PermissionStatus(state); | ||
} | ||
|
||
async revoke(desc: PermissionDescriptor): Promise<PermissionStatus> { | ||
revoke(desc: PermissionDescriptor): PermissionStatus { | ||
const state = permissionsOps.revoke(desc); | ||
return new PermissionStatus(state); | ||
} | ||
|
||
async request(desc: PermissionDescriptor): Promise<PermissionStatus> { | ||
request(desc: PermissionDescriptor): PermissionStatus { | ||
const state = permissionsOps.request(desc); | ||
return new PermissionStatus(state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap the return types here in Promise.resolve()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Thanks!
@samrith-s so far so good! |
@samrith-s thank you for this cumbersome work! I fixed some tests and reverted a few changes that weren't necessary. |
You’re welcome! I got stuck trying to fix these errors. Thank you so much for stepping in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you @samrith-s !
Added
require-await
in linting rule to fix #4394.