Add JSHint

This work is done on top of #41 (the mocha test rewrite).