💼 This rule is enabled in the ✅ recommended
config.
That is bad:
let promise = new Promise(function(resolve, reject) {
setTimeout(() => resolve(1), 1000);
});
promise.then(function(result) {
});
That is good:
let promise = new Promise(function(resolve, reject) {
setTimeout(() => resolve(1), 1000);
});
async function timeout(ms) {
await promise()
}