JSLint
Douglas Crockford


The JavaScript Verifier! JSLint can help you to significantly improve the quality of your code. It accepts .js or .html or .kon files.

Warning: JSLint will hurt your feelings.

Added the ability to flag HTML event handlers. Also, the ADsafe option is in beta. See adsafe.org


13389 Downloads
Version 1.20 - Updated November 1, 2007

Comments for JSLint


%nickname% - March 28, 2007
JSLint applies a number of restrictions (some of which can be switched off) in order to promote good and safe programming. Visit Douglas Crockford's excellent website for an explanations of the reasons for these restrictions.
This comment applies to version 1.11

jslintquestion - February 23, 2007
Why does the implementation not allow the
with( Expression ) Statement
syntax construct? It is defined in the ECMA standard.
This comment applies to version 1.10

sk - August 24, 2006
great widget, i found a lot of errors that weren't picked up in the standard debug.
This comment applies to version 1.3

Harry Whitfield - February 28, 2006
For reasons that are entirely unclear, the drag and drop action for js files is not working at all on Mac OS X 10.3.9 with YWE 3.0.2. If I type a file:/// URL into the upper textarea, the widget works correctly, but it does not respond at all to the dragging and dropping of the same file onto the lower area.
This comment applies to version 1.1

Wes - February 28, 2006
What a harsh mistress! But in the end, I think she'll make me a better programmer.

I recommend that the three icons at the top of the widget have tool tips.
This comment applies to version 1.1

Harry Whitfield - October 8, 2005
Version 0.5 works for me on the Macintosh with all of the common end-of-line marks. The preferences also work as expected.

This is a very useful utility, if you are prepared to accept the stricter syntax rules that it imposes. Users would be well advised to read the documentation on the author's (very interesting) web site.
This comment applies to version 0.5

Harry Whitfield - October 7, 2005
Macintosh users should convert their files to have Unix or DOS end-of-line marks, as version 0.3 does not work correctly with Macintosh (CR) end-of-line marks. With that change, the widget does give the line numbers of error lines and handles // comments.
This comment applies to version 0.3

Harry Whitfiedl - October 6, 2005
Having now looked at the web page describing JSLint, I see that my comments (below) 3) and 4) are not entirely valid. Anyone intending to use the widget, needs to read the page describing the (stricter) syntax rules that JSLint enforces.

However, I find that JSLint imposes constraints on my style which I am not prepared to accept, however well-intended they may be.
This comment applies to version 0.3

Harry Whitfield - October 6, 2005
I tried this on a 160 line "valid" javascript file and came up with a number of issues, which mean that I would not currently be able to use this widget for checking the javascript code of my widgets.

1) Giving the character position of an error is pretty useless - I need the line number, a print-out of the line, and ideally an indication of the location of the error in the line.

2) It would be useful if the widget found more than one error at a time. I know that is difficult, but it is possible.

3) The option to allow ++ and -- does not work.

4) // comments appear not to be allowed.

5) The widget insists on { } after if (condition), which is too strict.

This could be a very useful widget, but, at present, I would rather use my Widget Tester widget for syntax checking.
This comment applies to version 0.3