Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 345 Bytes

no-return-in-finally.md

File metadata and controls

20 lines (15 loc) · 345 Bytes

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

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
})