Using JSLint/JSHint in Ubuntu

Let's use JSHint instead:

Try this for configuration file:
http://blog.eye48.com/post/22780542166/javascript-quality-control-install-and-use-jshint-on

Refer: http://stackoverflow.com/questions/8863888/how-do-i-install-jslint-on-ubuntu
Refer: http://stackoverflow.com/questions/12913141/installing-from-npm-fails

$ sudo apt-get install nodejs
$ sudo apt-get install npm
$ npm config set registry http://registry.npmjs.org/
$ sudo npm install -g jslint

---

http://blog.perthulin.com/2011/01/how-to-use-jslint-javascript-code.html

sudo apt-get install rhino

-- Original Article --
Refer: http://blog.perthulin.com/2011/01/how-to-use-jslint-javascript-code.html

Download Js-Lint:
http://jslint.com/jslint.js

In case you have missed it, I can recommend a tool called JSLint. It goes through your JavaScript for common pitfalls, performance issues and makes sure it's standards compatible.

The first step is to download the jslint.js file. Since it's a JavaScript program, you need a JavaScript interpreter to run it, e.g. Rhino or node.js. This is how you install and run it on an Ubuntu system:

$ apt-get install rhino
$ rhino /path/to/jslint.js /path/to/your/script.js

The output might hurt your feelings, but is a real time saver when hunting down cross-browser issues etc. If you need to tell JSLint about global variables, e.g. the jQuery $ sign, you do so with a special comment at the top of your JavaScript source file:

/*global alert: true, window: true, $: true */

Read more about other options here: www.jslint.com/lint.html

Also, you can use JSLint in the browser just by pasting your code in the text box over at www.jslint.com