Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

jslint_com · This group has moved to Google Plus.

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 584
  • Category: JavaScript
  • Founded: Mar 7, 2008
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 3115 - 3144 of 3202   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3115 From: "Felix E. Klee" <felix.klee@...>
Date: Sat Feb 2, 2013 4:35 pm
Subject: Re: [jslint] Re: Switch Case Style
feklee
Send Email Send Email
 
On Sat, Feb 2, 2013 at 4:33 PM, paperlampshade <beefo@...>
wrote:
> ~~~~switch (input) { case 1:
>
> [...]
>
> Why is it important to have switch case syntax as in the second example?

Looks strange. The following formatting is IMHO easy to read and it
is accepted by JSLint:

     var test = function (input) {
         'use strict';
         var output;
         switch (input) {
         case 1:
             output = "a";
             break;
         case 2:
             output = "b";
             break;
         case 3:
             output = "c";
             break;
         default:
             output = "";
         }
         return output;
     };

BTW, just post emails in plain-text and no need to insert these ugly
`~`.

#3116 From: "douglascrockford" <douglas@...>
Date: Sat Feb 2, 2013 6:03 pm
Subject: Re: Switch Case Style
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "paperlampshade"  wrote:
>
> 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 statement) will give many errors regarding the expected position
> from line "case 1:" to line "output = "";".
> var test = function (input) {    'use strict';    var output;    switch
> (input) {        case 1:            output = "a";            break;
> case 2:            output = "b";            break;        case 3:
> output = "c";            break;        default:            output = "";
> }    return output;};
> However when the same statement is written with the "case 1:"  statement
> beginning one space after the  switch "{" and the  closing "}" one space
> from the "output = "";" line, there is no errors found.Example below:
> var test = function (input) {    'use strict';    var output;    switch
> (input) { case 1:            output = "a";            break;        case
> 2:            output = "b";            break;        case 3:
> output = "c";            break;        default:            output = "";
> }    return output;};
> Why is it important to have switch case syntax as in the second example?


Thanks. Please try it now.

#3117 From: "paperlampshade" <beefo@...>
Date: Tue Feb 5, 2013 3:36 am
Subject: Re: Switch Case Style
paperlampshade
Send Email Send Email
 
Works great! Thanks very much.

--- In jslint_com@yahoogroups.com, "douglascrockford"  wrote:
>
> --- In jslint_com@yahoogroups.com, "paperlampshade"  wrote:
> >
> > 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 statement) will give many errors regarding the expected position
> > from line "case 1:" to line "output = "";".
> > var test = function (input) {    'use strict';    var output;    switch
> > (input) {        case 1:            output = "a";            break;
> > case 2:            output = "b";            break;        case 3:
> > output = "c";            break;        default:            output = "";
> > }    return output;};
> > However when the same statement is written with the "case 1:"  statement
> > beginning one space after the  switch "{" and the  closing "}" one space
> > from the "output = "";" line, there is no errors found.Example below:
> > var test = function (input) {    'use strict';    var output;    switch
> > (input) { case 1:            output = "a";            break;        case
> > 2:            output = "b";            break;        case 3:
> > output = "c";            break;        default:            output = "";
> > }    return output;};
> > Why is it important to have switch case syntax as in the second example?
>
>
> Thanks. Please try it now.
>

#3118 From: "Felix E. Klee" <felix.klee@...>
Date: Tue Feb 5, 2013 5:14 pm
Subject: Just got confused with the `?` operator
feklee
Send Email Send Email
 
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 () {
         'use strict';

         var isOneWayFlight = true, i;

         for (i = 0; i < isOneWayFlight ? 1 : 2; i += 1) {
             console.log(i);
         }
     }());

Instead, the runtime enters an infinite loop. It outputs: 0, 1, 2, ...

Correct version of the for statement, doing what I want:

     for (i = 0; i < (isOneWayFlight ? 1 : 2); i += 1) {
         console.log(i);
     }

That's just FYI.

#3119 From: Keradus <keradus@...>
Date: Tue Feb 5, 2013 5:30 pm
Subject: Re: [jslint] Just got confused with the `?` operator
keradmaster
Send Email Send Email
 
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 values:
true ? 1 : 2 => 1


And then your loop looks like this:
for (i = 0; 1; i += 1) {...}
That's why it's continues indefinitely




--
Keradus

#3120 From: "Felix E. Klee" <felix.klee@...>
Date: Tue Feb 5, 2013 5:40 pm
Subject: Re: [jslint] Just got confused with the `?` operator
feklee
Send Email Send Email
 
On Tue, Feb 5, 2013 at 6:30 PM, Keradus <keradus@...> wrote:
> It's a matter of priority.

I know. Still the error slipped in, out of sloppiness, like many errors
that JSLint is designed to capture.

#3121 From: "george_weilenmann" <abyssoft@...>
Date: Tue Feb 5, 2013 10:17 pm
Subject: Re: [jslint] Just got confused with the `?` operator
george_weile...
Send Email Send Email
 
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 someone who has a good grasp on operator precedence.
even if JSLint was to require () around the ternary operator and
results.
Such that your line
for (i = 0; i < isOneWayFlight ? 1 : 2; i += 1) {
would have thrown an error for missing () around ternary.You still could
have done
for (i = 0; (i < isOneWayFlight ? 1 : 2); i += 1) {
and the same error would have occurred in your logic.
See http://www.javascriptkit.com/jsref/precedence_operators.shtml for a
nice table on precedence of operators.


--- In jslint_com@yahoogroups.com, "Felix E. Klee"  wrote:
>
> On Tue, Feb 5, 2013 at 6:30 PM, Keradus  wrote:
> > It's a matter of priority.
>
> I know. Still the error slipped in, out of sloppiness, like many
errors
> that JSLint is designed to capture.
>



[Non-text portions of this message have been removed]

#3122 From: "Felix E. Klee" <felix.klee@...>
Date: Tue Feb 5, 2013 11:10 pm
Subject: Re: [jslint] Just got confused with the `?` operator
feklee
Send Email Send Email
 
On Tue, Feb 5, 2013 at 11:17 PM, george_weilenmann <abyssoft@...>
wrote:
> This is more of an error on the part of the knowledge of the developer

Exactly not. I'm a C programmer for more than 20 years, and I'm well
versed with its operator precedence, which is similar to that of
JavaScript. I frequently use the `?` operator, and without any issues.

I just wanted to point out what happened to me today. That's all.

#3123 From: "douglascrockford" <douglas@...>
Date: Wed Feb 6, 2013 3:47 am
Subject: Re: Just got confused with the `?` operator
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "Felix E. Klee"  wrote:
>     /*jslint devel: true */
>
>     (function () {
>         'use strict';
>
>         var isOneWayFlight = true, i;
>
>         for (i = 0; i < isOneWayFlight ? 1 : 2; i += 1) {
>             console.log(i);
>         }
>     }());
>
> Instead, the runtime enters an infinite loop. It outputs: 0, 1, 2, ...
>
> Correct version of the for statement, doing what I want:
>
>     for (i = 0; i < (isOneWayFlight ? 1 : 2); i += 1) {
>         console.log(i);
>     }


Thanks. Please try it now.

#3124 From: "george_weilenmann" <abyssoft@...>
Date: Wed Feb 6, 2013 4:12 am
Subject: Re: Just got confused with the `?` operator
george_weile...
Send Email Send Email
 
Nice compromise. Works great and indeed improves readability.

--- In jslint_com@yahoogroups.com, "Felix E. Klee"  wrote:
>
> 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 () {
>         'use strict';
>
>         var isOneWayFlight = true, i;
>
>         for (i = 0; i < isOneWayFlight ? 1 : 2; i += 1) {
>             console.log(i);
>         }
>     }());
>
> Instead, the runtime enters an infinite loop. It outputs: 0, 1, 2, ...
>
> Correct version of the for statement, doing what I want:
>
>     for (i = 0; i < (isOneWayFlight ? 1 : 2); i += 1) {
>         console.log(i);
>     }
>
> That's just FYI.
>

#3125 From: "Felix E. Klee" <felix.klee@...>
Date: Thu Feb 7, 2013 9:49 am
Subject: Re: [jslint] Re: Just got confused with the `?` operator
feklee
Send Email Send Email
 
On Wed, Feb 6, 2013 at 3:47 AM, douglascrockford <douglas@...> wrote:
> Please try it now.

So quick - thanks! :-)

#3126 From: "douglascrockford" <douglas@...>
Date: Sun Feb 17, 2013 12:33 am
Subject: Context Coloring
douglascrock...
Send Email Send Email
 
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 different color to each level of
function nesting. Variables are displayed with the color in
which they were defined. Context coloring makes it easier to
see the structure of programs and the closure of variables.

A new function is provided, JSLINT.color(data). It requires the
use of a data argument that can be obtained from JSLINT.data().
JSLINT.color(data) returns an array of objects, each object
containing four properties: {
     line: a source file line number,
     level: a nesting level number (0 is global,
            deeper functions have higher numbers),
     from: a starting position on the line,
     thru: one past the end of a run of a single color
}.

For example:

function MONAD() {
````'use strict';
````return function unit(value) {
````````var monad = Object.create(null);
````````monad.bind = function (func) {
````````````return func(value);
````````};
````````return monad;
````};
}

[
     {"line": 1, "level": 1, "from": 1, "thru": 9},
     {"line": 1, "level": 0, "from": 10, "thru": 15},
     {"line": 1, "level": 1, "from": 15, "thru": 19},
     {"line": 2, "level": 1, "from": 5, "thru": 18},
     {"line": 3, "level": 1, "from": 5, "thru": 11},
     {"line": 3, "level": 2, "from": 12, "thru": 20},
     {"line": 3, "level": 1, "from": 21, "thru": 25},
     {"line": 3, "level": 2, "from": 25, "thru": 34},
     {"line": 4, "level": 2, "from": 9, "thru": 20},
     {"line": 4, "level": 0, "from": 21, "thru": 27},
     {"line": 4, "level": 2, "from": 27, "thru": 41},
     {"line": 5, "level": 2, "from": 9, "thru": 21},
     {"line": 5, "level": 3, "from": 22, "thru": 39},
     {"line": 6, "level": 3, "from": 13, "thru": 25},
     {"line": 6, "level": 2, "from": 25, "thru": 30},
     {"line": 6, "level": 3, "from": 30, "thru": 32},
     {"line": 7, "level": 3, "from": 9, "thru": 11},
     {"line": 8, "level": 2, "from": 9, "thru": 22},
     {"line": 9, "level": 2, "from": 5, "thru": 7},
     {"line": 10, "level": 1, "from": 1, "thru": 2}
]

Each level will have its own color. I have been using these:
0 white
1 green
2 yellow
3 blue
4 red
5 cyan
6 magenta
7 gray

It might be helpful to provide a convenient mechanism for
switching between context coloring and kindergarten coloring.

JSLINT.property is an object containing the counts of all of
the property names found in a file. It could be used to provide
property names for auto-completion.

#3127 From: "douglascrockford" <douglas@...>
Date: Tue Feb 19, 2013 6:20 pm
Subject: wiki
douglascrock...
Send Email Send Email
 
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
have information about deployment of JSLint that you want to share, please add
it to https://github.com/douglascrockford/JSLint/wiki/JSLINT

Thank you.

#3128 From: "douglascrockford" <douglas@...>
Date: Tue Feb 19, 2013 11:36 pm
Subject: es5
douglascrock...
Send Email Send Email
 
JSLint now requires an ECMAScript Fifth Edition engine to run. It will continue
to evaluate programs written for ES3 or ES5.

#3129 From: "Felix E. Klee" <felix.klee@...>
Date: Wed Feb 20, 2013 2:14 pm
Subject: Re: [jslint] es5
feklee
Send Email Send Email
 
On Tue, Feb 19, 2013 at 11:36 PM, douglascrockford
<douglas@...> wrote:
> JSLint now requires an ECMAScript Fifth Edition engine to run. It will
> continue to evaluate programs written for ES3 or ES5.

Any idea what is a good method to run JSLint offline on Windows (for
live linting in EMACS)? Can it be run with Node.js?

So far I have been using [jslint-for-wsh][1], but that stopped working
properly already some weeks ago, at least when used with EMACS. The
issue: errors are reported on the wrong lines

[1]: http://code.google.com/p/jslint-for-wsh/

#3130 From: "benquarmby" <ben.quarmby@...>
Date: Fri Feb 22, 2013 2:28 am
Subject: Re: es5
benquarmby
Send Email Send Email
 
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 JSLint. It currently uses
WSH.

--- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
>
> JSLint now requires an ECMAScript Fifth Edition engine to run. It will
continue to evaluate programs written for ES3 or ES5.
>

#3131 From: Luke Page <luke.a.page@...>
Date: Fri Feb 22, 2013 7:05 am
Subject: Re: [jslint] Re: es5
page.luke...
Send Email Send Email
 
The vs 2008 plugin uses wsh but I wrote the plugins for 2010 and 2012 and
those use v8 wrapped in c#.
  On 22 Feb 2013 02:28, "benquarmby" <ben.quarmby@...> wrote:

> **
>
>
>
>
> 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 JSLint. It currently
> uses WSH.
>
> --- In jslint_com@yahoogroups.com, "douglascrockford" wrote:
> >
> > JSLint now requires an ECMAScript Fifth Edition engine to run. It will
> continue to evaluate programs written for ES3 or ES5.
> >
>
>
>


[Non-text portions of this message have been removed]

#3132 From: "benquarmby" <ben.quarmby@...>
Date: Sat Feb 23, 2013 12:25 am
Subject: Re: es5
benquarmby
Send Email Send Email
 
Awesome. Our shop has just upgraded to 2012, so it looks like its business as
usual :)

--- In jslint_com@yahoogroups.com, Luke Page <luke.a.page@...> wrote:
>
> The vs 2008 plugin uses wsh but I wrote the plugins for 2010 and 2012 and
> those use v8 wrapped in c#.
>  On 22 Feb 2013 02:28, "benquarmby" <ben.quarmby@...> wrote:
>
> > **
> >
> > 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 JSLint. It currently
> > uses WSH.
> >
> > --- In jslint_com@yahoogroups.com, "douglascrockford" wrote:
> > >
> > > JSLint now requires an ECMAScript Fifth Edition engine to run. It will
> > continue to evaluate programs written for ES3 or ES5.

#3133 From: "Heinz Rasched" <raschedh@...>
Date: Mon Feb 25, 2013 12:37 pm
Subject: init of for
raschedh
Send Email Send Email
 
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) {
     'use strict'
     var i = 0,
         n = an_array.length;
     for (; i < n; i += 1) {
         // operate on an_array[i]
     }
}

It complains about the missing initial expression in the
for statement.
So I am forced to write

var i = 0,
     n = an_array.length;
for (i = 0; [...]

and whence repeating myself

or to leave i not initialized and go with the common

var i,
     n;
for (i = 0, n = an_array.length; [...]


Well, not a big deal, but it makes me sad.

#3134 From: "douglascrockford" <douglas@...>
Date: Mon Feb 25, 2013 1:21 pm
Subject: Re: init of for
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "Heinz Rasched" <raschedh@...> wrote:
>
> 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) {
>     'use strict'
>     var i = 0,
>         n = an_array.length;
>     for (; i < n; i += 1) {
>         // operate on an_array[i]
>     }
> }
>
> It complains about the missing initial expression in the
> for statement.
> So I am forced to write
>
> var i = 0,
>     n = an_array.length;
> for (i = 0; [...]
>
> and whence repeating myself
>
> or to leave i not initialized and go with the common
>
> var i,
>     n;
> for (i = 0, n = an_array.length; [...]
>
>
> Well, not a big deal, but it makes me sad.


(; 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 From: "Heinz Rasched" <raschedh@...>
Date: Mon Feb 25, 2013 1:29 pm
Subject: Re: init of for
raschedh
Send Email Send Email
 
I knew that you wouldn't like that.

> (; looks like a mistake.

That depends on the context of the `(;'

> Do not use forms that look like mistakes.

I do not.

> To make it easier to find the needle, make your program look less      like a
haystack.

My programs are far from looking like that.
I never look for needles in them.

Anyhow, thanks for the consideration.

Of course, I'll pledge myself to JsLint's teachings,
and will keep on writing

(i = 0, n = heretic.length; [...]

#3136 From: Jonas Trollvik <jonas@...>
Date: Mon Feb 25, 2013 1:43 pm
Subject: Re: [jslint] Re: init of for
jontro123
Send Email Send Email
 
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 < an_array.length; i += 1) {
// operate on an_array[i]
}
}

looks like it is a lot cleaner and easier to read.

2013/2/25 Heinz Rasched <raschedh@...>

> **
>
>
> I knew that you wouldn't like that.
>
>
> > (; looks like a mistake.
>
> That depends on the context of the `(;'
>
>
> > Do not use forms that look like mistakes.
>
> I do not.
>
>
> > To make it easier to find the needle, make your program look less like a
> haystack.
>
> My programs are far from looking like that.
> I never look for needles in them.
>
> Anyhow, thanks for the consideration.
>
> Of course, I'll pledge myself to JsLint's teachings,
> and will keep on writing
>
> (i = 0, n = heretic.length; [...]
>
>
>


[Non-text portions of this message have been removed]

#3137 From: John Hawkinson <jhawk@...>
Date: Mon Feb 25, 2013 1:36 pm
Subject: Re: [jslint] init of for
john.hawkinson
Send Email Send Email
 
Heinz Rasched <raschedh@...> wrote on Mon, 25 Feb 2013
at 12:37:13 -0000 in <kgfltp+agd7@eGroups.com>:

> function f(an_array) {
>     'use strict'
>     var i = 0,
>         n = an_array.length;
>     for (; i < n; i += 1) {
>         // operate on an_array[i]
>     }
> }

From an idempotency perspective, you're better off with the
the initialization in the for loop anyhow. Because it's common
for functinos to be long enough that review of all the code
between initialization and loop may be burdensome, as is reuse
of loop variables in multiple loops. If you therefore had:

var i=0;
...
for (; i<n; i +=1 ) { /* some loop */ }
...
for (; i<n; i +=1 ) { /* some other loop*/ }

then i would be zero for the first for() but not the second.


It's nice for the for loop to be self contained. One can look
at the loop itself and immediately understand it, without having
to worry about initialization that might be far away from it.


JavaScript's lack of block scope really suggests that the variables
you should initialize at the top of a function are those whose value
is expected to stay constant throughout the function.


This sort of generalization matters more for longer functions, of
course.

--jhawk@...
   John Hawkinson

#3138 From: Mike On Mobile <z_mikowski@...>
Date: Mon Feb 25, 2013 5:42 pm
Subject: Re: [jslint] Re: init of for
z_mikowski
Send Email Send Email
 
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
lookup was significantly more expensive than using the local variable. However,
recent JavaScript engines such as v8 reduce the performance gap so greatly that
the benefit of this optimization is negligible.  But it still makes a big
difference in ie8 iirc.

Jonas Trollvik <jonas@...> wrote:

>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 < an_array.length; i += 1) {
>// operate on an_array[i]
>}
>}
>
>looks like it is a lot cleaner and easier to read.
>
>2013/2/25 Heinz Rasched <raschedh@...>
>
>> **
>>
>>
>> I knew that you wouldn't like that.
>>
>>
>> > (; looks like a mistake.
>>
>> That depends on the context of the `(;'
>>
>>
>> > Do not use forms that look like mistakes.
>>
>> I do not.
>>
>>
>> > To make it easier to find the needle, make your program look less like a
>> haystack.
>>
>> My programs are far from looking like that.
>> I never look for needles in them.
>>
>> Anyhow, thanks for the consideration.
>>
>> Of course, I'll pledge myself to JsLint's teachings,
>> and will keep on writing
>>
>> (i = 0, n = heretic.length; [...]
>>
>>
>>
>
>
>[Non-text portions of this message have been removed]
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>

#3139 From: Marcel Duran <marcelduran@...>
Date: Mon Feb 25, 2013 5:55 pm
Subject: Re: [jslint] init of for
marcelduran
Send Email Send Email
 
That's true, however html collections are considered live which means
they're automatically updated when the underlying document is changed.

On Monday, February 25, 2013, Mike On Mobile wrote:

> **
>
>
> 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 lookup was significantly more expensive than using the local
> variable. However, recent JavaScript engines such as v8 reduce the
> performance gap so greatly that the benefit of this optimization is
> negligible. But it still makes a big difference in ie8 iirc.
>
> Jonas Trollvik jonas@... <javascript:_e({}, 'cvml',
> 'jonas%40weightpoint.se');>> wrote:
>
> >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 < an_array.length; i += 1) {
> >// operate on an_array[i]
> >}
> >}
> >
> >looks like it is a lot cleaner and easier to read.
> >
> >2013/2/25 Heinz Rasched raschedh@... <javascript:_e({}, 'cvml',
> 'raschedh%40yahoo.com');>>
> >
> >> **
> >>
> >>
> >> I knew that you wouldn't like that.
> >>
> >>
> >> > (; looks like a mistake.
> >>
> >> That depends on the context of the `(;'
> >>
> >>
> >> > Do not use forms that look like mistakes.
> >>
> >> I do not.
> >>
> >>
> >> > To make it easier to find the needle, make your program look less
> like a
> >> haystack.
> >>
> >> My programs are far from looking like that.
> >> I never look for needles in them.
> >>
> >> Anyhow, thanks for the consideration.
> >>
> >> Of course, I'll pledge myself to JsLint's teachings,
> >> and will keep on writing
> >>
> >> (i = 0, n = heretic.length; [...]
> >>
> >>
> >>
> >
> >
> >[Non-text portions of this message have been removed]
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
>
>


--
@marcelduran


[Non-text portions of this message have been removed]

#3140 From: "Heinz Rasched" <raschedh@...>
Date: Tue Feb 26, 2013 8:24 pm
Subject: Re: init of for
raschedh
Send Email Send Email
 
> (; 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.

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 use it, but because of the heresy of yours, that
the usual syntax highlighting is for children, which I found
an inspiring thought to play with in my mind.

So I switched mine off for all languages a month ago.

I'll never switch it on again.

Thank you !

#3141 From: "Robert" <rpeyser47@...>
Date: Wed Feb 27, 2013 5:54 pm
Subject: parseInt "Missing radix parameter" warning message
rpeyser47
Send Email Send Email
 
Having just gotten bitten by this and not realizing the implications, could we
have the message:

      Missing radix parameter.

changed to something more alarming like:

      Missing radix parameter: LEADING ZEROS WILL BE TREATED AS OCTAL!

      note: maybe 8 exclamation points would be appropriate here

#3142 From: "douglascrockford" <douglas@...>
Date: Wed Feb 27, 2013 5:56 pm
Subject: Re: parseInt "Missing radix parameter" warning message
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "Robert" <rpeyser47@...> wrote:

> Having just gotten bitten by this and not realizing the implications, could we
have the message:
>
>      Missing radix parameter.
>
> changed to something more alarming like:
>
>      Missing radix parameter: LEADING ZEROS WILL BE TREATED AS OCTAL!
>
>      note: maybe 8 exclamation points would be appropriate here

Perhaps there should be a general warning attached to every warning:

     If you ignore JSLint's advice, you may get bitten.

#3143 From: "benquarmby" <ben.quarmby@...>
Date: Wed Feb 27, 2013 8:30 pm
Subject: Re: parseInt "Missing radix parameter" warning message
benquarmby
Send Email Send Email
 
This is not official, so your mileage may vary, but there is a project to
provide some background for JSLint's rules -
http://jslinterrors.com/

Although DC is right... you should have followed JSLint's advice either way :P

--- In jslint_com@yahoogroups.com, "Robert" <rpeyser47@...> wrote:
>
> Having just gotten bitten by this and not realizing the implications, could we
have the message:
>
>      Missing radix parameter.
>
> changed to something more alarming like:
>
>      Missing radix parameter: LEADING ZEROS WILL BE TREATED AS OCTAL!
>
>      note: maybe 8 exclamation points would be appropriate here
>

#3144 From: Kirk Cerny <kirksemail@...>
Date: Thu Feb 28, 2013 6:11 pm
Subject: Tabs vs Spaces question
kirk.cerny
Send Email Send Email
 
I have been using tabs in my JavaScript because that is the convention
throughout
the web application I am working on. The application includes PHP,
JavaScript, CSS, HTML
and other languages.

I have been JsLinting my JavaScript code for years.
I love JsLint.
Recently I have started to get the error of Use spaces, not tabs.
What is the reason for this?
What is the danger of using tabs?

Thanks.

Kirk Cerny


[Non-text portions of this message have been removed]

Messages 3115 - 3144 of 3202   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help