Hi, I have a question about Switch Case style as verified in jslint.A switch case written as below (case statement starting on the line after the switch...
3113
benquarmby
Feb 1, 2013 9:15 pm
Hi Steve, I think I know what you're talking about, but the whitespace didn't come through properly in your examples. You may wan to retype your example with...
3114
paperlampshade
Feb 2, 2013 3:34 pm
Hi Ben, Oh shoot, sorry about that. Hopefully this will come through better: I have a question about Switch Case style as verified in jslint. A switch case...
3115
Felix E. Klee
feklee
Feb 2, 2013 4:36 pm
On Sat, Feb 2, 2013 at 4:33 PM, paperlampshade <beefo@...> ... Looks strange. The following formatting is IMHO easy to read and it is accepted by...
3116
douglascrockford
douglascrock...
Feb 2, 2013 6:03 pm
... Thanks. Please try it now....
3117
paperlampshade
Feb 5, 2013 3:36 am
Works great! Thanks very much....
3118
Felix E. Klee
feklee
Feb 5, 2013 5:14 pm
Well, today I'm not in good shape, and I expected the following code to output just one zero. The code passes JSLint. /*jslint devel: true */ (function () { ...
3119
Keradus
keradmaster
Feb 5, 2013 5:31 pm
It's a matter of priority. First "<" will be executed, then "?". So i < isOneWayFlight ? 1 : 2 is the same as (i < isOneWayFlight) ? 1 : 2 regarding to initial...
3120
Felix E. Klee
feklee
Feb 5, 2013 5:41 pm
... I know. Still the error slipped in, out of sloppiness, like many errors that JSLint is designed to capture....
3121
george_weilenmann
george_weile...
Feb 5, 2013 10:17 pm
This is more of an error on the part of the knowledge of the developer then on the part of JSLint. The code pattern is perfectly valid and not confusing to...
3122
Felix E. Klee
feklee
Feb 5, 2013 11:11 pm
On Tue, Feb 5, 2013 at 11:17 PM, george_weilenmann <abyssoft@...> ... Exactly not. I'm a C programmer for more than 20 years, and I'm well versed with...
3123
douglascrockford
douglascrock...
Feb 6, 2013 3:47 am
... Thanks. Please try it now....
3124
george_weilenmann
george_weile...
Feb 6, 2013 4:12 am
Nice compromise. Works great and indeed improves readability....
3125
Felix E. Klee
feklee
Feb 7, 2013 9:50 am
... So quick - thanks! :-)...
3126
douglascrockford
douglascrock...
Feb 17, 2013 12:33 am
I have added an experimental context coloring feature to JSLint. It is intended to provide context coloring in text editors and IDEs. Context coloring gives a...
3127
douglascrockford
douglascrock...
Feb 19, 2013 6:20 pm
The experiment of using Yahoo Group's Database to manage JSLint configurations has not turned out well. So now I am going to try using Github's wiki. If you...
3128
douglascrockford
douglascrock...
Feb 19, 2013 11:37 pm
JSLint now requires an ECMAScript Fifth Edition engine to run. It will continue to evaluate programs written for ES3 or ES5....
3129
Felix E. Klee
feklee
Feb 20, 2013 2:15 pm
On Tue, Feb 19, 2013 at 11:36 PM, douglascrockford ... Any idea what is a good method to run JSLint offline on Windows (for live linting in EMACS)? Can it be...
3130
benquarmby
Feb 22, 2013 2:28 am
Understandable requirement. I guess the authors of the Visual Studio plugin (which we use in our dev workflow) will need to figure out another way to run...
3131
Luke Page
page.luke...
Feb 22, 2013 7:05 am
The vs 2008 plugin uses wsh but I wrote the plugins for 2010 and 2012 and those use v8 wrapped in c#. ... [Non-text portions of this message have been removed]...
3132
benquarmby
Feb 23, 2013 12:25 am
Awesome. Our shop has just upgraded to 2012, so it looks like its business as usual :)...
3133
Heinz Rasched
raschedh
Feb 25, 2013 12:37 pm
I like to give my vars a value when I declare them, whenever that is possible. JsLint does not allow me to do that in one special case: function f(an_array) { ...
3134
douglascrockford
douglascrock...
Feb 25, 2013 1:21 pm
... (; looks like a mistake. Do not use forms that look like mistakes. To make it easier to find the needle, make your program look less like a haystack....
3135
Heinz Rasched
raschedh
Feb 25, 2013 1:29 pm
I knew that you wouldn't like that. ... That depends on the context of the `(;' ... I do not. ... My programs are far from looking like that. I never look for...
3136
Jonas Trollvik
jontro123
Feb 25, 2013 1:43 pm
What is the benefit of caching the array length here? I doubt it has any effect on performance. function f(an_array) { 'use strict' var i; for (i = 0; i <...
3137
John Hawkinson
john.hawkinson
Feb 25, 2013 1:45 pm
Heinz Rasched <raschedh@...> wrote on Mon, 25 Feb 2013 ... From an idempotency perspective, you're better off with the the initialization in the for loop...
3138
Mike On Mobile
z_mikowski
Feb 25, 2013 5:42 pm
At one time it was considered best practice to store the array length in a local variable and use that in the comparison . That was because the object property...
3139
Marcel Duran
marcelduran
Feb 25, 2013 6:29 pm
That's true, however html collections are considered live which means they're automatically updated when the underlying document is changed. ... -- ...
3140
Heinz Rasched
raschedh
Feb 26, 2013 8:24 pm
... Because having been blamed with your usual accusations yada yada, I take the liberty to thank you for the context coloring stuff in jslint ! Not because i...
3141
Robert
rpeyser47
Feb 27, 2013 5:54 pm
Having just gotten bitten by this and not realizing the implications, could we have the message: Missing radix parameter. changed to something more alarming...