Rick -

I just ran jQuery through JSLint and none of the warnings are related
to semicolons. Generally its complaints fall into a couple categories

foo != undefined (a quick way to check to see if something is defined or not)
if ( foo == "bar" ) (using no { ... }, doesn't like that)

In fact, those are most of the warnings right there. The rest seem to
be related to parsing problems that JSLint has.

In reality, JSLint is only meant to be a style guide for how to write
JavaScript (if you want to write it like how Douglas Crockford writes
it). We're very comfortable with our style, and it works really well.
All of our code compress and runs via Packer just fine (in fact, we
make sure it does, since we provide packed releases of jQuery).

Hope this helps to clear some things up.

--John


On 7/16/07, Rick Pasotto <[EMAIL PROTECTED]> wrote:

I'm fairly new to javascript so this may or may not be important.

One of the posts today led me to the jslint.js program. Running it with
rhino on jquery-1.1.3.1.js reports many, many errors. It quit at line
275 complaining of 'too many errors'. Most of the errors were (caused
by) missing semicolons. When it aborted, among the last few errors were:

Lint at line 250 character 14: Use '!==' to compare with 'undefined'.
t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?

Lint at line 259 character 14: Use '===' to compare with 'undefined'.
return val == undefined ?

Reading other messages indicated to me that missing semicolons could
cause the packer to give bad results.

BTW, I really like jQuery and am looking for places to use it --
unobtrusively, of course.

--
"A great many people think they are thinking when they are
 merely rearranging their prejudices." -- William James
    Rick Pasotto    [EMAIL PROTECTED]    http://www.niof.net

Reply via email to