Pattern: Empty function
Issue: -
Disallows declaring empty functions. The goal of this rule is that unintentional empty callbacks can be detected:
someFunctionWithCallback ->
doSomethingSignificant()
The problem is that the call to doSomethingSignificant
will be made regardless of someFunctionWithCallback
's execution. It can be because you did not indent the call to doSomethingSignificant
properly. If you really meant that someFunctionWithCallback
should call a callback that does nothing, you can write your code this way:
someFunctionWithCallback ->
undefined
doSomethingSignificant()