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

Enhancement: [no-misused-promises] Warn when spreading a promise #5049

Closed
4 tasks done
papermana opened this issue May 23, 2022 · 0 comments · Fixed by #5053
Closed
4 tasks done

Enhancement: [no-misused-promises] Warn when spreading a promise #5049

papermana opened this issue May 23, 2022 · 0 comments · Fixed by #5053
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@papermana
Copy link
Contributor

Before You File a Proposal Please Confirm You Have Done The Following...

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Link to the rule's documentation

https://typescript-eslint.io/rules/no-misused-promises

Description

Please see this issue in the TS repo.

Fail

console.log({ ...Promise.resolve({ key: 42 }) });

Pass

console.log({ ...await Promise.resolve({ key: 42 }) });

Additional Info

I think I can implement this feature if it's wanted.

@papermana papermana added enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels May 23, 2022
@bradzacher bradzacher added awaiting response Issues waiting for a reply from the OP or another party accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for maintainers to take a look awaiting response Issues waiting for a reply from the OP or another party labels May 23, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants