Saturday, January 24, 2015

JSLint – The Java Script Validator


It is a Code Quality tool which makes our java script to be well formed.
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.
What it does,
• Missing semicolons at the end of a line.
• Missing curly braces in if, for, while, etc.
• Code that is never run because of a return, throw, continue, or break.
• Case statements in a switch that do not have a break statement. And more…
Using this tool, you can check all your JavaScript source code for common mistakes without actually running the script or opening the web page.
JSLint provides an online tool in which we can validate the scripts without installing any tool.
http://www.jslint.com/
Reference document

JSLint plug-in for Visual Studio
JSLint.VS is Add-In for Visual Studio that provides errors in JavaScript during compiling enabling you to spend less time in browser catching bugs and typos.
For more details about the JSLint.VS, http://jslint.codeplex.com/