sindresorhus/eslint-plugin-unicorn
`no-single-promise-in-promise-methods`: Provide autofix for `const [foo] = await Promise.all([promise])`
已关闭
#2,388 创建于 2024年6月22日
enhancementhelp wanted
仓库指标
- 星标
- (5,022 个星标)
- PR 合并指标
- (平均合并 4小时 30分钟) (30 天内合并 26 个 PR)
描述
Description
In #2386 we are removing autofix and suggestions from Promise.all() since it returns an array, but we can add autofix for
const [foo] = await Promise.all([promise]);
[foo] = await Promise.all([promise]);
const foo = (await Promise.all([promise]))[0];