Installing JSLint On Ubuntu For Command Line Use

What is JSLint?

JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool.

JSLint takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate location within the source. The problem is not necessarily a syntax error, although it often is. JSLint looks at some style conventions as well as structural problems. It does not prove that your program is correct. It just provides another set of eyes to help spot problems.

(Read More)

Installing JSLint On Ubuntu


  1. Node.js
  2. npm

Installing Node.js and npm

sudo apt-get install nodejs npm

Install jslint using npm

sudo npm install -g jslint

Note that -g is for global install which installs jslint in node_modules and will have a sym link at /usr/bin/jslint or /usr/local/bin/jslint


jslint < file name >

Add a Comment

Your email address will not be published. Required fields are marked *