JSHint and Vim

Using JSHint from Vim

Even though I am not a huge fan of JSHint it is
a useful tool here and there, especially to enforce some guidelines in your
code to keep a consistent style. Personally I think style matters, even though I
might not care about certain ones, at least I should be consistent all the way
across. So this is where JSHint comes in and lets you define a certain set of
rules to stay true to, and also eliminate some potential bugs and smells.

Running it is simple, just install via npm globally

$ npm install jshint -g

And run passing the config and the file to hint

$ jshint --config jshint.json myfile.js

Since I personally prefer to run as much as possible from Vim directly I created
a short function to do it for me.