Rick, on top of what John said I'll add that you might notice that you can
change the behavior of JSLint to allow or disallow certain things. I just
know that it's caught several problems for me related to packing problems. I
use http://javascriptcompressor, but that appears to be running the same
algorithm as http://dean.edwards.name/packer/. The fact that it caught
problems for me which were causing my compressed JS to bust is most likely
due to my padawan JS coding skills ;o)

Chris

On 7/16/07, John Resig <[EMAIL PROTECTED]> wrote:


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
>




--
--
http://cjordan.us

Reply via email to