How to install jshint on ubuntu 12.10
Install nodejs, npm and jshint:
sudo apt-get install nodejs sudo apt-get install npm sudo npm install -g jshint
Then run it on the command line:
jshint your_js_file.js
What prints:
js.js: line 4, col 21, Use '===' to compare with '0'. js.js: line 24, col 2, Missing semicolon. 2 errors
Get ready to get your feelings hurt because your javascript file has a hundred things wrong.
source share