eslint-plugin-promise icon indicating copy to clipboard operation
eslint-plugin-promise copied to clipboard

`no-multiple-resolved` wrongly reports `reject` in try/catch block

Open burtek opened this issue 2 years ago • 0 comments
trafficstars

From #382, which I think wasn't fully fixed

try {
    resolve(someThrowingFn())
} catch (error) {
    reject(error)
}

still errors for me. It doesn't error if I do this:

try {
    const data = someThrowingFn()
    resolve(data)
} catch (error) {
    reject(error)
}

But those two are identical and should behave same way?

burtek avatar May 24 '23 13:05 burtek