clutchski/coffeelint — pull request #254 by misterdjules (2014-04-04 14:45:44+00:00)
Title: Add no_empty_functions rule that triggers if an empty function is defined

In the past, I have been bitten by the following code:
```
someFunctionWithCallback ->
doSomethingSignificant()
```
What's wrong is that _doSomethingSignificant_ is called no matter what after the call to _someFunctionWithCallback_, whereas what I really wanted to do is to call _doSomethingSignificant_ from within the callback. It makes a big difference whether _someFunctionWithCallback_ is asynchronous or not.

These kind of issues can sometimes be very tricky to find. This error is often located deep into the source code and when you look at it, it's hard to spot that an indentation token is missing. Moreover, the execution of such code may look perfectly valid, since you expected _doSomethingSignificant_ to be called anyway.

The _no_empty_functions_ rule triggers an error on such code.

I have never used empty functions myself, but I know that other programmers like to do so. When one wants to define an empty function, one only has to use _undefined_ as the only expression within the function body, like so:
```
someFunction ->
undefined
```
It states the intention clearly, and it's not too long to type. It's even similar to Python's pass statement.