added JavaScript linting and code style checking

yes, it's a bit ironic that we're using JSLint directives but only have
a JSHint task - we should probably switch to JSHint for this repo (and
start using jscs in the process)

note the TODO comment regarding jscs; seems still worth including as a
reference at least