Rule proposal: `no-await-in-promise-methods`
Clement398 opened this issue · comments
Clement398 commented
Description
Disallow using await
in Promise
method parameters.
Fail
Promise.all([await promise, anotherPromise]);
Promise.allSettled([await promise, anotherPromise]);
Promise.any([await promise, anotherPromise]);
Promise.race([await promise, anotherPromise]);
Pass
Promise.all([promise, anotherPromise]);
Promise.allSettled([promise, anotherPromise]);
Promise.any([promise, anotherPromise]);
Promise.race([promise, anotherPromise]);
Additional Info
No response
Sindre Sorhus commented
Same as #2256 (comment)
Clement398 commented
It's edited, thanks for the suggestion.