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

Prevent the Floating Promise in the Async/Await Code #1346

Closed
huan opened this issue Jun 15, 2018 · 3 comments
Closed

Prevent the Floating Promise in the Async/Await Code #1346

huan opened this issue Jun 15, 2018 · 3 comments
Assignees

Comments

@huan
Copy link
Member

huan commented Jun 15, 2018

According to #1289, we should always await a Promise no matter than what because it will prevent we to make very hard to track mistakes.

So we should enable tslint to check the floating promise for us. So should all the developers do if you are writing async/await code:

Related configuration in tslint.json:

{
    "extends": "tslint:recommended",
    "rules": {
        "no-floating-promises": true
    }
}

See Also

@huan
Copy link
Member Author

huan commented Jun 15, 2018

@lijiarui Could you please help me to check out the latest master branch of code, and fix all the warnings when running npm run lint, then send me back a PR to fix them?

Thanks.

@lijiarui
Copy link
Member

see #1348

@lijiarui lijiarui assigned huan and unassigned lijiarui Jun 15, 2018
@huan
Copy link
Member Author

huan commented Jun 15, 2018

Thank you very much.

huan added a commit that referenced this issue Jun 15, 2018
@huan huan closed this as completed Jun 15, 2018
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