Search This Blog

Most useful developer tools: JSLint


posted on Monday, July 2, 2012

From previous posts you might have remembered that I'm not quite the JavaScript hero (yet). So all the tools that I can find to help me get it right, are more than welcome.

Therefor the tool of the day is... *drum roll* JSLint!


JSLint is an online JavaScript validator and code quality tool. It's free, easy to use and brilliantly simple.

You can read it on the website as well, that JavaScript is a very capable language that has outgrown its primary purpose of displaying pop-ups and fixing page lay-out. More and more it's being used to a more advanced level. Since my knowledge of JavaScript doesn't reach that much further from the primary purpose, a quality tool to validate, clean up, check syntax or debug my code is highly recommended.

JSLint provides tons of options to set the validator to your wishes. You can determine how strict the validation should be. By default, it's really strict so be prepared. On the website it actually says: "Warning:  JSLint will hurt your feelings." and believe me, it will!

On the JSLint website, you can find a large input field. You can paste your JavaScript in there and hit the button below to let the validator loose on your code. A list of errors and warnings will be displayed below. The lay-out of the website might be a bit simple but the performance is amazing. The validator will smash your ego in mere seconds!

Below the input field you can find a set of options you can define for the validator. You can find a list of what is assumed and tolerated by default. You can see there are a lot of options about use of spaces/indentations, unused parameters, 'stupidity', undefined console/alert variables, usage of == and != ... . You can also predefine global variables here.

You can find more information about all of these options on http://www.jslint.com/lint.html.


This is a simple but great tool and I dare you to let JSLint have a go at your code. If you want to write quality JavaScript, JSLint will become your new best friend. And therefor, it definitly deserves a place on the list of most useful developer tools!

You can find JSLint on http://www.jslint.com/, enjoy and remember: JSLint will hurt your feelings...

Could be useful, right?


No comments:

Post a Comment