add jshint to `make test`

* add a lint target to the Makefile that runs jshint
* fix all jshint errors from the default config
* have the make test target run the lint target
This changes the meaning of the line. Can `result` be undefined?