Rule proposal: `no-nested-await`
See original GitHub issueNesting await inside a statement often gets messy. It’s better to split the line using an intermediate variable.
This is potentially autofixable. The only issue is that this would need to generate a name for an intermediate variable.
Fail
const filtered = (await Promise.all(promises)).filter(Boolean);
Pass
const unfiltered = await Promise.all(promises);
const filtered = unfiltered.filter(Boolean);
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Proposed rule: Order Competition Rule - SEC.gov
proposed rule would prohibit a restricted competition trading center from internally executing certain orders of individual investors at a ...
Read more >Proposed Rules - GovInfo
Commission has requested comment on a release proposing amendments to its rules under the Securities Act and. Exchange Act that would require.
Read more >The Most Curious Rule Proposal in Securities and Exchange ...
The Proposed Rules are of three categories: Disclosure Rules, Audit Rules, and Prohibited Activity Rules. These comments relate solely to the ...
Read more >sallai-dissertation.pdf - Institutional Repository Home
As a rule, the higher the level of abstraction that a ... Several virtual machines have been proposed for wireless sensor nodes. VM*...
Read more >Proposed Rules - Regulations.gov
Proposed Rules. Federal Register. 29059. Vol. 87, No. 92. Thursday, May 12, 2022. SECURITIES AND EXCHANGE. COMMISSION. 17 CFR 210, 229, 232, 239,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We can start with property access and call expression, maybe add more cases in future.
I think we need to determine which cases should be reported. Typically I think the ones wrapped inside parentheses should be reported.
The following may be acceptable due to the lack of a better alternative:
The following look ok to me: