π Disallow using await in Promise method parameters.
πΌ This rule is enabled in the following configs: β
recommended, βοΈ unopinionated.
π‘ This rule is manually fixable by editor suggestions.
Using await on promises passed as arguments to Promise.all(), Promise.allSettled(), Promise.any(), or Promise.race() is likely a mistake.
// β
Promise.all([await promise, anotherPromise]);
// β
Promise.all([promise, anotherPromise]);// β
Promise.allSettled([await promise, anotherPromise]);
// β
Promise.allSettled([promise, anotherPromise]);// β
Promise.any([await promise, anotherPromise]);
// β
Promise.any([promise, anotherPromise]);// β
Promise.race([await promise, anotherPromise]);
// β
Promise.race([promise, anotherPromise]);