You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Promise.resolve(1).then(Promise.resolve(2))// This is ignored, probably not what the developer intended.then(console.log)// 1
consterrorHandler=console.warn;Promise.reject('Catch me if you can').catch(errorHandler())// should have been `errorHandler` without parenthesis
It wouldn't be possible to cover this completely with static code analysis I guess (we would have to know that console.warn isn't a function that returns another function), but the first example should be detectable at least?
The text was updated successfully, but these errors were encountered:
I'm not 100% sure if this is possible without exploring a little bit (fairly new to ESLint plugin development), but I think this would be a great thing to consider and weave into #47. 👍
As I read #47, that one seems to be limited to the number of arguments, which I think is much easier. I'm also not sure this issue is actually possible since references or function calls could be valid if they return other functions, and I'm not sure how much can be done with static code analysis.
Good luck either way, and thank you for the effort!
Similar to: http://bluebirdjs.com/docs/warning-explanations.html
Examples:
It wouldn't be possible to cover this completely with static code analysis I guess (we would have to know that console.warn isn't a function that returns another function), but the first example should be detectable at least?
The text was updated successfully, but these errors were encountered: