Using jshint on Debian jessie

tl;dr: If you wish to use jshint on Debian jessie, do this:

sudo apt-get update
sudo apt-get install nodejs nodejs-legacy npm
sudo npm install jshint -g
jshint

Long story: this is difficult to get right if you read random posts around. There are flamewars from 2012 about node.js package being obsolete in Debian (not true as of today) and RFP (Request For Package) for jshint is stuck because the package contains some code licensed with a variant of the MIT license considered un-kosher by debian (still true). As of today, it’s best to install node.js package, but jshint from within npm (the node package manager).