Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 457 Bytes

no-return-in-finally.md

File metadata and controls

24 lines (17 loc) · 457 Bytes

Disallow return statements in finally() (promise/no-return-in-finally)

⚠️ This rule warns in the ✅ recommended config.

Disallow return statements inside a callback passed to finally(), since nothing would consume what's returned.

Valid

myPromise.finally(function (val) {
  console.log('value:', val)
})

Invalid

myPromise.finally(function (val) {
  return val
})