JSHintPosted by: Prachi | 04 Feb 2014 | Comments
Install JSHint using a Node program.
$ npm install jshint
To install JSHint globally on your system, use -g flag as:
$ npm install jshint -g
If you have done, you should be able to use JSHint.
To detect errors in single file run following command:
$ jshint orders.js orders.js: line 1, col 1, Expected an assignment or function call and instead saw an expression. orders.js: line 1, col 2, Missing semicolon. 2 errors
Now, you should be able to fix these errors, and make your code clean.