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

Add require-await lint rule #4401

Merged
merged 16 commits into from Mar 20, 2020
Merged

Add require-await lint rule #4401

merged 16 commits into from Mar 20, 2020

Conversation

samrith-s
Copy link
Contributor

Added require-await in linting rule to fix #4394.

@samrith-s samrith-s changed the title Add require-await to Add require-await lint rule Mar 16, 2020
@CLAassistant
Copy link

CLAassistant commented Mar 16, 2020

CLA assistant check
All committers have signed the CLA.

Comment on lines 50 to 62
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);
Copy link
Collaborator

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().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. Thanks!

@kitsonk
Copy link
Contributor

kitsonk commented Mar 17, 2020

@samrith-s so far so good!

@bartlomieju
Copy link
Member

@samrith-s thank you for this cumbersome work! I fixed some tests and reverted a few changes that weren't necessary.

@bartlomieju bartlomieju requested a review from ry March 20, 2020 12:25
@samrith-s
Copy link
Contributor Author

@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.

Copy link
Member

@ry ry left a 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 !

@ry ry merged commit 798904b into denoland:master Mar 20, 2020
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
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

Successfully merging this pull request may close these issues.

lint: add "require-await" rule to ESLint config
6 participants