Right now, the code var a; while (a = f()) { ... causes JSLint to complain -- which is right in many cases: you are doing an assignment when you meant to do a...
350
M. Lorton
mlorton
Jan 9, 2009 9:53 pm
If JSLint produced messages that looked like jsdir/jsfile.js:968: 'v' is already defined. then I could run run JSLint from inside emacs (or, I believe,...
351
James Clark
sbj@...
Jan 9, 2009 9:54 pm
I believe the standard technique works (add extra parens): while ((a = f())) { -jamie...
352
Philip Hutchison
pipwerks
Jan 10, 2009 8:08 am
... Hi guys Sorry to dig up an old thread, but I don't quite understand Douglas' response, and this is a topic that's I've been curious about ever since I...
353
Andy Stevens
andystevens_...
Jan 10, 2009 9:04 am
... "var true;" or "var (1==1);" wouldn't be valid, so there's no ambiguity about "var row=rows[i]" - it's obviously an assignment. The problem with for(var i...
354
crlender
Jan 10, 2009 11:00 am
... Thanks for the reply. I've never seen an example of where the slash in regex literals could be ambiguous for either humans or the parser. As far as I know,...
355
santini.alberto
Jan 10, 2009 4:38 pm
... I think the following post may be usefull: http://tech.groups.yahoo.com/group/jslint_com/message/108 Regards, Alberto...
356
Philip Hutchison
pipwerks
Jan 10, 2009 7:03 pm
... I see... so wrapping the assignment in braces is simply a way to signify that yes, you intended to do an assignment. Slightly more verbose, but in the end...
357
Douglas Crockford
douglascrock...
Jan 10, 2009 10:15 pm
... SVN. JSLint/Rhino is composed of two files: http://www.JSLint.com/fulljslint.js and http://www.JSLint.com/rhino/rhino.js You don't need to change...
358
M. Lorton
mlorton
Jan 13, 2009 2:39 am
It turned out *really well* -- it runs literally 100 times faster -- but I don't know how to share it. Should I just put it in a message here or is there an...
359
Daniel Cassidy
mail@...
Jan 13, 2009 4:59 pm
2009/1/9 M. Lorton <mlorton@...> ... Take a look at JSLint4Java, which embeds JSLint and does what you want, as well as being usable as an Ant task. Dan....
360
dom@...
happygiraffe...
Jan 13, 2009 5:44 pm
... jslint4java works, but it is in need of an update to the latest jslint. Unfortunately I've left it in a bit of a state. I'm hoping to get to working on it...
361
Arthur Blake
blakesys
Jan 14, 2009 1:45 pm
Hope this might help someone- I use jslint in my build process from ant as well and it works great (although it's a really old version of jslint...) If you...
362
Daniel Cassidy
mail@...
Jan 14, 2009 8:48 pm
2009/1/13 <dom@...> ... Just copying a newer JSLint into the jar works for me. If you're not finding time to work on jslint4java, would you be...
363
Douglas Crockford
douglascrock...
Jan 14, 2009 8:52 pm
... I don't want to be maintaining Rhino stuff, but I do want to encourage sharing between the Rhino users. So please post it here, or upload a file here...
364
Daniel Cassidy
mail@...
Jan 15, 2009 3:06 pm
2009/1/10 Andy Stevens <insomniacpenguin@...> ... As well as that, the two loops are *not* equivalent. The first loops until it reaches *either* the...
365
Daniel Cassidy
mail@...
Jan 15, 2009 3:07 pm
... (granted in this specific case the DOM API guarantees the array will not contain any falsy values, but the same is not true for many other arrays)....
366
Philip Hutchison
pipwerks
Jan 16, 2009 4:48 pm
... Wow, that's good to know. I hadn't considered that possibility, and if I had run into a falsy (killing the loop) it could have really screwed something...
367
dom@...
happygiraffe...
Jan 17, 2009 12:32 am
... Yes, it will do. I haven't advertised that though. :) The only thing is that you won't get access to the new options and so on (via Java). Which is not...
368
James Clark
sbj@...
Jan 21, 2009 9:16 pm
Here are two javascript mistakes I have recently made which jslint might be able to check for: 1. using the same variable in two nested loops var i; for (i =...
369
Jacob Davenport
jpdavenportjr
Jan 23, 2009 2:49 pm
So, what changed? Is there some way besides looking at posts on this group to find the answer to this question?...
370
Douglas Crockford
douglascrock...
Jan 23, 2009 4:02 pm
... I corrected an ADsafe problem. There was a form of eval that was passing....
371
James Clark
sbj@...
Jan 30, 2009 4:53 pm
Part of my project uses a statement like the following: var b = new Array(a.length); but jslint complains: Use the array literal notation []. My theory here is...
372
Douglas Crockford
douglascrock...
Jan 30, 2009 4:57 pm
... If you can demonstrate a significant performance advantage, then I will relax the test. Stylistically, I think [] is better, but I will bow to a compelling...
373
James Clark
sbj@...
Jan 30, 2009 5:16 pm
... I did a little experimenting and web-searching. I have found nothing conclusive, but some quickly-thrown-together tests found no significant difference in...
374
Noah Peters
boyopeg
Jan 30, 2009 10:56 pm
... <mailto:jslint_com%40yahoogroups.com>, ... This is just an example implementation, but is probably representative of how Arrays are implemented in other...
375
santini.alberto
Feb 5, 2009 5:26 pm
I suggest to pilot the indentation as jslint option: For instance, /*jslint indent: 2 */ If I lint source files with different code styling, I can write the ...
376
Douglas Crockford
douglascrock...
Feb 11, 2009 9:45 pm
Anticipating the next edition of ECMAScript, JSLint now allows the useExtension suffix on the use strict directive. It also allows the use strict directive as...
377
gregraven@...
gregraven...
Feb 17, 2009 3:26 pm
I think it would be great if the JSLint Yahoo! Widget had the clear, recommended, and good parts selectors found on jslint.com. It would save a bit of time and...
378
Jakob Kruse
thekrucible
Feb 17, 2009 3:44 pm
Please have a look at the "JSLint Multi" widget available here: http://code.google.com/p/jslint-multi-widget/ It doesn't have quite what you ask, but it does...