"Peter Michaux" <pe**********@g mail.comwrote:
It's more the comments, blank lines and beginning or mid-line spaces
that are a bigger concern. I have been using jslint to check for
problems before jsmin but jslint has many programmer preferences built
in and not just outright problems that will be harmful when minimizing.
I suppose I could strip jslint down.
I did a modified version of jslint which might interest you. You can find
it at
http://codespeak.net/svn/kupu/trunk/kupu
The difference is that with my version there are command line options to
suppress most of the warnings so if you decide that you don't mind spurious
semicolons just use --ignore to suppress the ones you don't want. All the
warnings are numbered. See jslint.opts for the options I use for kupu, also
lint.py for a script which runs jslint.js over modified .js files only.
Also error messages all begin with filename and line number so they are
easily parsed by most editors.
Usage:
--
--browser, --nobrowser*
true if the standard browser globals should be predefined
--cap, --nocap*
true if upper case HTML should be allowed
--debug, --nodebug*
true if debugger statements should be allowed
--eqeqeq, --noeqeqeq*
true if === should be required
--error #
Specified messages are fatals
--evil, --noevil*
true if eval should be allowed
--extern #
Add external names
--help
show usage text
--ignore #
Specified messages are ignored
--jscript, --nojscript*
true if jscript deviations should be allowed
--laxLineEnd, --nolaxLineEnd*
true if line breaks should not be checked
--options #
Read additional arguments and options from a file
--passfail, --nopassfail*
true if the scan should stop on first error
--plusplus, --noplusplus*
true if increment/decrement should not be allowed
--redef, --noredef*
true if var redefinition should be allowed
--undef, --noundef*
true if undefined variables are errors
--warn #
Specified messages are warnings
--widget, --nowidget*
true if the Yahoo Widgets globals should be predefined