top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is JsLint?

0 votes
317 views

What is JSLint?

JSLint is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules. It is provided primarily as an online tool, but there are also command-line adaptations. It was developed by Douglas Crockford.

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.

JSLint defines a professional subset of JavaScript, a stricter language than that defined by the ECMAScript Programming Language Standard (the strangely named document that governs JavaScript). JSLint will reject most legal programs. It is a higher standard.

JavaScript is a sloppy language, but hidden deep inside there is an elegant, better language. JSLint helps you to program in that better language and to avoid most of the slop. JSLint will reject programs that browsers will accept because JSLint is concerned with the quality of your code and browsers are not. You should gladly accept all of JSLint's advice.

JSLint can operate on JavaScript source or JSON text.

NPM Command

npm jslint

NPM Command for Gulp

npm gulp-jslint

 

Video for Jslint

posted Jun 20, 2017 by Manish Tiwari

  Promote This Article
Facebook Share Button Twitter Share Button LinkedIn Share Button

...