JSLint – Verify your javascript
Not to mention that javascript is one of the most popular scripting language of these days. Almost all websites are using it up to certain extent. Developing in javascript is always a challenge because it is not compiled and executed on runtime only.
This challenge is addressed by some of the tools which help a lot in developing javascript. Some names are Firebug, Web developer toolbar for Firefox and IE developer toolbar for Internet Explorer and many more.
These tools will help you in running your js code and debugging the problem but still you can have bad code sitting in js file because of wrong declaration, unreachable code and confusing + and – etc.
JSLint is a JavaScript syntax checker and validator.
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 Edition 3 of the ECMAScript Language Specification. The subset is related to recommendations found in Code Conventions for the JavaScript Programming Language.
JavaScript is a sloppy language, but inside it there is an elegant, better language. JSLint helps you to program in that better language and to avoid most of the slop.
JSLint can operate on JavaScript source, HTML source, or JSON text.
Go to http://www.jslint.com/ and paste your program in text area and click JSLint button to verify your javascript.
You can also set options to verify your script according to your preferences. These preferences are provided below on the same page. You can make JSLint less restrict using these options.
For more information go to its Documentation page.
Most Commented Posts
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.



Comments
No comments yet.
Leave a comment