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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 1038 - 1067 of 3202   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1038 From: "Douglas Crockford" <douglas@...>
Date: Tue Jan 5, 2010 1:06 pm
Subject: Re: several JSLint errors I can't understand
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, Ekrem Tomur <ekrem.tomur@...> wrote:

> Can somebody tell me why JSLint give me these errors? I think let, const are
> JavaScript language feature.

They are not. let and const are not in any edition of the ECMAScript standard.
Stick with the standard language. Use var instead.

#1039 From: Ekrem Tomur <ekrem.tomur@...>
Date: Tue Jan 5, 2010 1:14 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
kumushoq
Send Email Send Email
 
sorry, I forgot to tell, I am using JSLint to test Mozilla Javascript. Is
that sound very stupid? If so I will stop doing that.
If not can you tell me how to adjust the options to meet the requirements?

const is allowed in Mozilla Javascript and let is new feature in mozilla
JavaScript version 1.7

Thanks.

On Tue, Jan 5, 2010 at 3:06 PM, Douglas Crockford <douglas@...>wrote:

>
>
> --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>, Ekrem
> Tomur <ekrem.tomur@...> wrote:
>
> > Can somebody tell me why JSLint give me these errors? I think let, const
> are
> > JavaScript language feature.
>
> They are not. let and const are not in any edition of the ECMAScript
> standard. Stick with the standard language. Use var instead.
>
>
>


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

#1040 From: Ekrem Tomur <ekrem.tomur@...>
Date: Thu Jan 7, 2010 10:34 am
Subject: Re: [jslint] Re: several JSLint errors I can't understand
kumushoq
Send Email Send Email
 
Hi,

Can somebody propose me a small patch or hint, I would like to implement a
workaround as treat all 'let' and 'const' like 'var'. So in this way I can
suppress those errors which I won't fix. I am working on jslint.js 4.1.2009
version. The code is not well tabbed and difficult to understand. Somebody
please help.

Thanks in advance.
Äkräm

On Tue, Jan 5, 2010 at 3:14 PM, Ekrem Tomur <ekrem.tomur@...> wrote:

> sorry, I forgot to tell, I am using JSLint to test Mozilla Javascript. Is
> that sound very stupid? If so I will stop doing that.
> If not can you tell me how to adjust the options to meet the requirements?
>
> const is allowed in Mozilla Javascript and let is new feature in mozilla
> JavaScript version 1.7
>
> Thanks.
>
>
> On Tue, Jan 5, 2010 at 3:06 PM, Douglas Crockford
<douglas@...>wrote:
>
>>
>>
>> --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>, Ekrem
>> Tomur <ekrem.tomur@...> wrote:
>>
>> > Can somebody tell me why JSLint give me these errors? I think let, const
>> are
>> > JavaScript language feature.
>>
>> They are not. let and const are not in any edition of the ECMAScript
>> standard. Stick with the standard language. Use var instead.
>>
>>
>>
>
>


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

#1041 From: Simon Kenyon Shepard <simon.shepard@...>
Date: Thu Jan 7, 2010 11:24 am
Subject: Re: [jslint] Re: several JSLint errors I can't understand
sks0001010
Send Email Send Email
 
Hi krm,

I cannot help you with your JSLint problem, but may I suggest the following
book:

http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/

<http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/>will
help you with the larger issue at hand.



On Thu, Jan 7, 2010 at 10:34 AM, Ekrem Tomur <ekrem.tomur@...> wrote:

>
>
> Hi,
>
> Can somebody propose me a small patch or hint, I would like to implement a
> workaround as treat all 'let' and 'const' like 'var'. So in this way I can
> suppress those errors which I won't fix. I am working on jslint.js 4.1.2009
> version. The code is not well tabbed and difficult to understand. Somebody
> please help.
>
> Thanks in advance.
> krm
>
>
> On Tue, Jan 5, 2010 at 3:14 PM, Ekrem Tomur
<ekrem.tomur@...<ekrem.tomur%40gmail.com>>
> wrote:
>
> > sorry, I forgot to tell, I am using JSLint to test Mozilla Javascript. Is
> > that sound very stupid? If so I will stop doing that.
> > If not can you tell me how to adjust the options to meet the
> requirements?
> >
> > const is allowed in Mozilla Javascript and let is new feature in mozilla
> > JavaScript version 1.7
> >
> > Thanks.
> >
> >
> > On Tue, Jan 5, 2010 at 3:06 PM, Douglas Crockford
<douglas@...<douglas%40crockford.com>
> >wrote:
> >
> >>
> >>
> >> --- In jslint_com@yahoogroups.com
<jslint_com%40yahoogroups.com><jslint_com%
> 40yahoogroups.com>, Ekrem
> >> Tomur <ekrem.tomur@...> wrote:
> >>
> >> > Can somebody tell me why JSLint give me these errors? I think let,
> const
> >> are
> >> > JavaScript language feature.
> >>
> >> They are not. let and const are not in any edition of the ECMAScript
> >> standard. Stick with the standard language. Use var instead.
> >>
> >>
> >>
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>



--
"We are the music makers, And we are the dreamers of dreams"


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

#1042 From: Ekrem Tomur <ekrem.tomur@...>
Date: Thu Jan 7, 2010 11:57 am
Subject: Re: [jslint] Re: several JSLint errors I can't understand
kumushoq
Send Email Send Email
 
Hi Simon,

Thanks for your suggestion. I do apologize if I am not being friendly enough
to the list, it might be because of our cultural difference or my English
skill or I am really a nerd who do not know how to get along with the
people. I am really sorry if I hurt anybodies feelings here. I have tried to
be kind and I will be more appreciated if you be more concise to point me
which word or sentences I said have problem. Also I will read that book, it
will be first book in my list which I will read in my free times.

I still hope somebody can help me with my jslint problem, Thank you.

On Thu, Jan 7, 2010 at 1:24 PM, Simon Kenyon Shepard <
simon.shepard@...> wrote:

> Hi Äkräm,
>
> I cannot help you with your JSLint problem, but may I suggest the following
> book:
>
> http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/
>
> <http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/
> >will
> help you with the larger issue at hand.
>
>
>
> On Thu, Jan 7, 2010 at 10:34 AM, Ekrem Tomur <ekrem.tomur@...>
> wrote:
>
> >
> >
> > Hi,
> >
> > Can somebody propose me a small patch or hint, I would like to implement
> a
> > workaround as treat all 'let' and 'const' like 'var'. So in this way I
> can
> > suppress those errors which I won't fix. I am working on jslint.js
> 4.1.2009
> > version. The code is not well tabbed and difficult to understand.
> Somebody
> > please help.
> >
> > Thanks in advance.
> > Äkräm
> >
> >
> > On Tue, Jan 5, 2010 at 3:14 PM, Ekrem Tomur <ekrem.tomur@...
> <ekrem.tomur%40gmail.com>>
> > wrote:
> >
> > > sorry, I forgot to tell, I am using JSLint to test Mozilla Javascript.
> Is
> > > that sound very stupid? If so I will stop doing that.
> > > If not can you tell me how to adjust the options to meet the
> > requirements?
> > >
> > > const is allowed in Mozilla Javascript and let is new feature in
> mozilla
> > > JavaScript version 1.7
> > >
> > > Thanks.
> > >
> > >
> > > On Tue, Jan 5, 2010 at 3:06 PM, Douglas Crockford <
> douglas@...<douglas%40crockford.com>
> > >wrote:
> > >
> > >>
> > >>
> > >> --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com
> ><jslint_com%
> > 40yahoogroups.com>, Ekrem
> > >> Tomur <ekrem.tomur@...> wrote:
> > >>
> > >> > Can somebody tell me why JSLint give me these errors? I think let,
> > const
> > >> are
> > >> > JavaScript language feature.
> > >>
> > >> They are not. let and const are not in any edition of the ECMAScript
> > >> standard. Stick with the standard language. Use var instead.
> > >>
> > >>
> > >>
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
>
>
> --
> "We are the music makers, And we are the dreamers of dreams"
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


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

#1043 From: Tom Byers <tombaromba@...>
Date: Thu Jan 7, 2010 12:31 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
tomwillbyers
Send Email Send Email
 
Not helpful to the group at all.

Also not helping as the issue seems to be if there should be an option for
working with Mozilla JS, an important question (especially bearing in mind
the group has previously seen fit to at least think about including console
as being valid).

krm has been keeping within the constraints of the language he is coding
for (which is a type of JS).

There's already quite a few 'assume' options (console, yahoo widget, rhino)
so any *real* opinions on whether this should be put in or not?

Tom

On Thu, Jan 7, 2010 at 11:24 AM, Simon Kenyon Shepard <
simon.shepard@...> wrote:

> Hi krm,
>
> I cannot help you with your JSLint problem, but may I suggest the following
> book:
>
> http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/
>
> <http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/
> >will
> help you with the larger issue at hand.
>
>
>
> On Thu, Jan 7, 2010 at 10:34 AM, Ekrem Tomur <ekrem.tomur@...>
> wrote:
>
> >
> >
> > Hi,
> >
> > Can somebody propose me a small patch or hint, I would like to implement
> a
> > workaround as treat all 'let' and 'const' like 'var'. So in this way I
> can
> > suppress those errors which I won't fix. I am working on jslint.js
> 4.1.2009
> > version. The code is not well tabbed and difficult to understand.
> Somebody
> > please help.
> >
> > Thanks in advance.
> > krm
> >
> >
> > On Tue, Jan 5, 2010 at 3:14 PM, Ekrem Tomur <ekrem.tomur@...
> <ekrem.tomur%40gmail.com>>
> > wrote:
> >
> > > sorry, I forgot to tell, I am using JSLint to test Mozilla Javascript.
> Is
> > > that sound very stupid? If so I will stop doing that.
> > > If not can you tell me how to adjust the options to meet the
> > requirements?
> > >
> > > const is allowed in Mozilla Javascript and let is new feature in
> mozilla
> > > JavaScript version 1.7
> > >
> > > Thanks.
> > >
> > >
> > > On Tue, Jan 5, 2010 at 3:06 PM, Douglas Crockford <
> douglas@...<douglas%40crockford.com>
> > >wrote:
> > >
> > >>
> > >>
> > >> --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com
> ><jslint_com%
> > 40yahoogroups.com>, Ekrem
> > >> Tomur <ekrem.tomur@...> wrote:
> > >>
> > >> > Can somebody tell me why JSLint give me these errors? I think let,
> > const
> > >> are
> > >> > JavaScript language feature.
> > >>
> > >> They are not. let and const are not in any edition of the ECMAScript
> > >> standard. Stick with the standard language. Use var instead.
> > >>
> > >>
> > >>
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
>
>
> --
> "We are the music makers, And we are the dreamers of dreams"
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


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

#1044 From: Simon Kenyon Shepard <simon.shepard@...>
Date: Thu Jan 7, 2010 12:41 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
sks0001010
Send Email Send Email
 
Sincere apologies if any offence was caused/time wasted, I agree with your
position that it was not relevant to the topic at all.

On Thu, Jan 7, 2010 at 12:31 PM, Tom Byers <tombaromba@...> wrote:

>
>
> Not helpful to the group at all.
>
> Also not helping as the issue seems to be if there should be an option for
> working with Mozilla JS, an important question (especially bearing in mind
> the group has previously seen fit to at least think about including console
> as being valid).
>
> krm has been keeping within the constraints of the language he is coding
> for (which is a type of JS).
>
> There's already quite a few 'assume' options (console, yahoo widget, rhino)
> so any *real* opinions on whether this should be put in or not?
>
> Tom
>
> On Thu, Jan 7, 2010 at 11:24 AM, Simon Kenyon Shepard <
>
> simon.shepard@... <simon.shepard%40googlemail.com>> wrote:
>
> > Hi krm,
> >
> > I cannot help you with your JSLint problem, but may I suggest the
> following
> > book:
> >
> > http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/
> >
> > <http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/
> > >will
> > help you with the larger issue at hand.
> >
> >
> >
> > On Thu, Jan 7, 2010 at 10:34 AM, Ekrem Tomur
<ekrem.tomur@...<ekrem.tomur%40gmail.com>
> >
> > wrote:
> >
> > >
> > >
> > > Hi,
> > >
> > > Can somebody propose me a small patch or hint, I would like to
> implement
> > a
> > > workaround as treat all 'let' and 'const' like 'var'. So in this way I
> > can
> > > suppress those errors which I won't fix. I am working on jslint.js
> > 4.1.2009
> > > version. The code is not well tabbed and difficult to understand.
> > Somebody
> > > please help.
> > >
> > > Thanks in advance.
> > > krm
> > >
> > >
> > > On Tue, Jan 5, 2010 at 3:14 PM, Ekrem Tomur
<ekrem.tomur@...<ekrem.tomur%40gmail.com>
> > <ekrem.tomur%40gmail.com>>
>
> > > wrote:
> > >
> > > > sorry, I forgot to tell, I am using JSLint to test Mozilla
> Javascript.
> > Is
> > > > that sound very stupid? If so I will stop doing that.
> > > > If not can you tell me how to adjust the options to meet the
> > > requirements?
> > > >
> > > > const is allowed in Mozilla Javascript and let is new feature in
> > mozilla
> > > > JavaScript version 1.7
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > On Tue, Jan 5, 2010 at 3:06 PM, Douglas Crockford <
> > douglas@... <douglas%40crockford.com><douglas%40crockford.com>
>
> > > >wrote:
> > > >
> > > >>
> > > >>
> > > >> --- In jslint_com@yahoogroups.com
<jslint_com%40yahoogroups.com><jslint_com%
> 40yahoogroups.com
> > ><jslint_com%
> > > 40yahoogroups.com>, Ekrem
> > > >> Tomur <ekrem.tomur@...> wrote:
> > > >>
> > > >> > Can somebody tell me why JSLint give me these errors? I think let,
> > > const
> > > >> are
> > > >> > JavaScript language feature.
> > > >>
> > > >> They are not. let and const are not in any edition of the ECMAScript
> > > >> standard. Stick with the standard language. Use var instead.
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> >
> >
> >
> > --
>
> > "We are the music makers, And we are the dreamers of dreams"
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
>
> >
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>



--
"We are the music makers, And we are the dreamers of dreams"


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

#1045 From: Harry Whitfield <g7awz@...>
Date: Thu Jan 7, 2010 12:45 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
harry152566
Send Email Send Email
 
krm,

Instead of trying to modify JSLint to accept non-standard JavaScript, you could
consider altering the JavaScript code to make it conform to the standard.
That would be my preferred solution.

Another possibility would be to pre-process the code to replace "let" and
"const" by "var". It would also be fairly easy to modify JSLint or its file
input code to do that.
However, if I remember correctly, the semantics of "let" is not quite the same
as that of "var".

Harry.

#1046 From: Ekrem Tomur <ekrem.tomur@...>
Date: Thu Jan 7, 2010 1:18 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
kumushoq
Send Email Send Email
 
Hi Harry,

Thank you for your helpful thoughts. But since I am a tester on a mozilla
extension project and those js code I am testing meant to run on mozilla
javascript engine, I can not ask developers to use standard javascript
instead of mozilla one. I must test their code, I hope JSLint can help me a
little bit.

You are right, now I also think treating let and const as var is a bad idea,
since they are not quiet similar and also should be tested as a way they
should be tested. So I like Tom's idea, add an Mozilla option since this is
also quiet popular version of JS. If that could be done I will happy to
contribute.

Br,
Äkräm

On Thu, Jan 7, 2010 at 2:45 PM, Harry Whitfield <g7awz@...>wrote:

>
>
> Äkräm,
>
> Instead of trying to modify JSLint to accept non-standard JavaScript, you
> could consider altering the JavaScript code to make it conform to the
> standard.
> That would be my preferred solution.
>
> Another possibility would be to pre-process the code to replace "let" and
> "const" by "var". It would also be fairly easy to modify JSLint or its file
> input code to do that.
> However, if I remember correctly, the semantics of "let" is not quite the
> same as that of "var".
>
> Harry.
>
>
>


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

#1047 From: Tom Byers <tombaromba@...>
Date: Thu Jan 7, 2010 2:03 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
tomwillbyers
Send Email Send Email
 
Interesting and kind of a catch 22. If krm substitutes let and const then
he is using the syntax of the language he is working in against the spec,
the very thing JSLint is meant to prevent.

From what I read let is an additional way to define block scope so you could
do some pre-processing that wrapped it in a function and split the variable
assignments in the brackets out into separate variable assignments. This
should let you test the scope correctly:

var x = 5;
var y = 0;

let (x = x+10, y = 12) {
   print(x+y + "\n");
}

print((x + y) + "\n");

as

var x = 5;
var y = 0;

var let1 = function() {
    var x = x+10, y = 12;
    print(x+y + "\n");
}

print((x + y) + "\n");

Print should also be commented.

As for const, this provides something that standard Javascript doesn't
currently support - proper constants. You can declare them as vars for the
purposes of Linting but this JSLint will not actually check that your
developers are staying true to the syntax.

https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/const

Tom

p.s. don't worry to Simon, just trying to get this interesting discussion
back on track :)

On Thu, Jan 7, 2010 at 1:18 PM, Ekrem Tomur <ekrem.tomur@...> wrote:

>
>
> Hi Harry,
>
> Thank you for your helpful thoughts. But since I am a tester on a mozilla
> extension project and those js code I am testing meant to run on mozilla
> javascript engine, I can not ask developers to use standard javascript
> instead of mozilla one. I must test their code, I hope JSLint can help me a
> little bit.
>
> You are right, now I also think treating let and const as var is a bad
> idea,
> since they are not quiet similar and also should be tested as a way they
> should be tested. So I like Tom's idea, add an Mozilla option since this is
> also quiet popular version of JS. If that could be done I will happy to
> contribute.
>
> Br,
> krm
>
> On Thu, Jan 7, 2010 at 2:45 PM, Harry Whitfield
<g7awz@...<g7awz%40btinternet.com>
> >wrote:
>
>
> >
> >
> > krm,
> >
> > Instead of trying to modify JSLint to accept non-standard JavaScript, you
> > could consider altering the JavaScript code to make it conform to the
> > standard.
> > That would be my preferred solution.
> >
> > Another possibility would be to pre-process the code to replace "let" and
> > "const" by "var". It would also be fairly easy to modify JSLint or its
> file
> > input code to do that.
> > However, if I remember correctly, the semantics of "let" is not quite the
> > same as that of "var".
> >
> > Harry.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>


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

#1048 From: Morgaut Alexandre Louis Marc <morgaut@...>
Date: Thu Jan 7, 2010 5:17 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
morgaut_a
Send Email Send Email
 
I saw in previous posts kind of same "assume" request for some ssjs
environment.

I think it might be harder to assume "mozilla" or "commonjs"   Than
"browser" and "rhino" Because Mozilla JavaScript has more commands,
and CommonJS has more types whereas the lastest only have builtin
objects and methods which CAN be declared to JSLint as globals.

Mozilla JavaScript is a différent language version, as are
ActionScript and JScript. All of them should support ecmascript
specification which is what JSlint is testing

Asking to JSlint to support the specificities of main JavaScript
implentation could be a powerfull option, it just be a little more
complicated.

It looks like one of the goals of JSLint was to help writing safe and
portable codes, which explain the limitation to ECMAScript.

So what about choosing the version number of the implementation we
want to assume (Well I could like it)

But sure, I'd love assume "server" instead of "rhino"

Alexandre

  From iPhone

Le 7 janv. 2010 à 14:18, Ekrem Tomur <ekrem.tomur@...> a écrit :

> Hi Harry,
>
> Thank you for your helpful thoughts. But since I am a tester on a
> mozilla
> extension project and those js code I am testing meant to run on
> mozilla
> javascript engine, I can not ask developers to use standard javascript
> instead of mozilla one. I must test their code, I hope JSLint can
> help me a
> little bit.
>
> You are right, now I also think treating let and const as var is a
> bad idea,
> since they are not quiet similar and also should be tested as a way
> they
> should be tested. So I like Tom's idea, add an Mozilla option since
> this is
> also quiet popular version of JS. If that could be done I will happy
> to
> contribute.
>
> Br,
> Äkräm
>
> On Thu, Jan 7, 2010 at 2:45 PM, Harry Whitfield
> <g7awz@...>wrote:
>
> >
> >
> > Äkräm,
> >
> > Instead of trying to modify JSLint to accept non-standard
> JavaScript, you
> > could consider altering the JavaScript code to make it conform to
> the
> > standard.
> > That would be my preferred solution.
> >
> > Another possibility would be to pre-process the code to replace
> "let" and
> > "const" by "var". It would also be fairly easy to modify JSLint or
> its file
> > input code to do that.
> > However, if I remember correctly, the semantics of "let" is not
> quite the
> > same as that of "var".
> >
> > Harry.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>


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

#1049 From: Ekrem Tomur <ekrem.tomur@...>
Date: Fri Jan 8, 2010 2:18 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
kumushoq
Send Email Send Email
 
Can somebody send me well formatted version of jslint.js? I really do not
want to waste my time on preprocessing since it is wrong and limited. I want
to try to implement Mozilla option myself, at least the part I needed. But
that jslint.js version annoying me since it is hard to read and change.

On Thu, Jan 7, 2010 at 7:17 PM, Morgaut Alexandre Louis Marc <
morgaut@...> wrote:

>
>
> I saw in previous posts kind of same "assume" request for some ssjs
> environment.
>
> I think it might be harder to assume "mozilla" or "commonjs" Than
> "browser" and "rhino" Because Mozilla JavaScript has more commands,
> and CommonJS has more types whereas the lastest only have builtin
> objects and methods which CAN be declared to JSLint as globals.
>
> Mozilla JavaScript is a différent language version, as are
> ActionScript and JScript. All of them should support ecmascript
> specification which is what JSlint is testing
>
> Asking to JSlint to support the specificities of main JavaScript
> implentation could be a powerfull option, it just be a little more
> complicated.
>
> It looks like one of the goals of JSLint was to help writing safe and
> portable codes, which explain the limitation to ECMAScript.
>
> So what about choosing the version number of the implementation we
> want to assume (Well I could like it)
>
> But sure, I'd love assume "server" instead of "rhino"
>
> Alexandre
>
> From iPhone
>
> Le 7 janv. 2010 à 14:18, Ekrem Tomur
<ekrem.tomur@...<ekrem.tomur%40gmail.com>>
> a écrit :
>
>
> > Hi Harry,
> >
> > Thank you for your helpful thoughts. But since I am a tester on a
> > mozilla
> > extension project and those js code I am testing meant to run on
> > mozilla
> > javascript engine, I can not ask developers to use standard javascript
> > instead of mozilla one. I must test their code, I hope JSLint can
> > help me a
> > little bit.
> >
> > You are right, now I also think treating let and const as var is a
> > bad idea,
> > since they are not quiet similar and also should be tested as a way
> > they
> > should be tested. So I like Tom's idea, add an Mozilla option since
> > this is
> > also quiet popular version of JS. If that could be done I will happy
> > to
> > contribute.
> >
> > Br,
> > Äkräm
> >
> > On Thu, Jan 7, 2010 at 2:45 PM, Harry Whitfield
> > <g7awz@... <g7awz%40btinternet.com>>wrote:
> >
> > >
> > >
> > > Äkräm,
> > >
> > > Instead of trying to modify JSLint to accept non-standard
> > JavaScript, you
> > > could consider altering the JavaScript code to make it conform to
> > the
> > > standard.
> > > That would be my preferred solution.
> > >
> > > Another possibility would be to pre-process the code to replace
> > "let" and
> > > "const" by "var". It would also be fairly easy to modify JSLint or
> > its file
> > > input code to do that.
> > > However, if I remember correctly, the semantics of "let" is not
> > quite the
> > > same as that of "var".
> > >
> > > Harry.
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>


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

#1050 From: "Douglas Crockford" <douglas@...>
Date: Fri Jan 8, 2010 2:40 pm
Subject: Re: several JSLint errors I can't understand
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, Ekrem Tomur <ekrem.tomur@...> wrote:
>
> Can somebody send me well formatted version of jslint.js? I really do not
> want to waste my time on preprocessing since it is wrong and limited. I want
> to try to implement Mozilla option myself, at least the part I needed. But
> that jslint.js version annoying me since it is hard to read and change.


Read the instructions. http://www.jslint.com/lint.html

#1051 From: Klemen Slavič <krof.drakula@...>
Date: Fri Jan 8, 2010 2:41 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
klemen.slavic
Send Email Send Email
 
Or try a code beautifier:

http://jsbeautifier.org/

2010/1/8 Douglas Crockford <douglas@...>

>
>
> --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>, Ekrem
> Tomur <ekrem.tomur@...> wrote:
> >
> > Can somebody send me well formatted version of jslint.js? I really do not
> > want to waste my time on preprocessing since it is wrong and limited. I
> want
> > to try to implement Mozilla option myself, at least the part I needed.
> But
> > that jslint.js version annoying me since it is hard to read and change.
>
> Read the instructions. http://www.jslint.com/lint.html
>
>
>


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

#1052 From: Noah Sussman <noah@...>
Date: Fri Jan 8, 2010 2:46 pm
Subject: Re: [jslint] Re: several JSLint errors I can't understand
thefangmonster
Send Email Send Email
 
On Fri, Jan 8, 2010 at 9:18 AM, Ekrem Tomur <ekrem.tomur@...> wrote:
>
>
>
> Can somebody send me well formatted version of jslint.js?

How about

http://www.jslint.com/fulljslint.js

#1053 From: "walfisch_in_the_sea" <christian.wirkus@...>
Date: Sun Jan 10, 2010 10:40 pm
Subject: question about strict mode violation
walfisch_in_...
Send Email Send Email
 
Hi.
In production mode I concatenate my files.
What if one of them is not in strict mode?

So the result is:

//none-strict-mode-ecmascript
"use strict";
//strict-mode-ecmascript

Is that allowed?

#1054 From: "Douglas Crockford" <douglas@...>
Date: Sun Jan 10, 2010 10:53 pm
Subject: Re: question about strict mode violation
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "walfisch_in_the_sea" <christian.wirkus@...>
wrote:
>
> Hi.
> In production mode I concatenate my files.
> What if one of them is not in strict mode?
>
> So the result is:
>
> //none-strict-mode-ecmascript
> "use strict";
> //strict-mode-ecmascript
>
> Is that allowed?

No. You should be linting the individual files.

#1055 From: "walfisch_in_the_sea" <christian.wirkus@...>
Date: Mon Jan 11, 2010 12:09 am
Subject: Re: question about strict mode violation
walfisch_in_...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
>
> --- In jslint_com@yahoogroups.com, "walfisch_in_the_sea" <christian.wirkus@>
wrote:
> >
> > Hi.
> > In production mode I concatenate my files.
> > What if one of them is not in strict mode?
> >
> > So the result is:
> >
> > //none-strict-mode-ecmascript
> > "use strict";
> > //strict-mode-ecmascript
> >
> > Is that allowed?
>
> No. You should be linting the individual files.
>

Sorry, I didn't mean the linting. Is it valid ecmascript5 to switch from
non-strict mode to strict mode within one file? That might happen by
concatenating of a non-strict library and a "use strict" file. Worst case would
be that future browser assume the whole file to be strict and thereby break the
code.
I wondered because everybody is saying today "use as few files as possible or
you and your site will be lame".

Sorry, that is not really a JSLint question.

#1056 From: "Douglas Crockford" <douglas@...>
Date: Mon Jan 11, 2010 12:14 am
Subject: Re: question about strict mode violation
douglascrock...
Send Email Send Email
 
> Is it valid ecmascript5 to switch from non-strict mode to strict mode within
one file? That might happen by concatenating of a non-strict library and a "use
strict" file. Worst case would be that future browser assume the whole file to
be strict and thereby break the code.
> I wondered because everybody is saying today "use as few files as possible or
you and your site will be lame".


The "use strict"; pragma is only meaningful at the first statement of a file or
first statement of a function body. Anywhere else it is just a useless
expression statement and is ignored.

#1057 From: "walfisch_in_the_sea" <christian.wirkus@...>
Date: Mon Jan 11, 2010 10:50 am
Subject: Re: question about strict mode violation
walfisch_in_...
Send Email Send Email
 
Ah, thanks.


--- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
>
> > Is it valid ecmascript5 to switch from non-strict mode to strict mode within
one file? That might happen by concatenating of a non-strict library and a "use
strict" file. Worst case would be that future browser assume the whole file to
be strict and thereby break the code.
> > I wondered because everybody is saying today "use as few files as possible
or you and your site will be lame".
>
>
> The "use strict"; pragma is only meaningful at the first statement of a file
or first statement of a function body. Anywhere else it is just a useless
expression statement and is ignored.
>

#1058 From: "walfisch_in_the_sea" <christian.wirkus@...>
Date: Wed Jan 13, 2010 7:37 am
Subject: It is not necessary to initialize 'foo' to 'undefined'.
walfisch_in_...
Send Email Send Email
 
Hi,
I have a queer error message in my code.

//My full code:
"use strict";
var foo = true;



//The error message:
Error:

Problem at line 2 character 9: It is not necessary to initialize 'foo' to
'undefined'.

var foo = true;

#1059 From: Harry Whitfield <g7awz@...>
Date: Wed Jan 13, 2010 11:50 am
Subject: Re: [jslint] It is not necessary to initialize 'foo' to 'undefined'.
harry152566
Send Email Send Email
 
On 13 Jan 2010, at 07:37:27, walfisch_in_the_sea wrote:

> I have a queer error message in my code.
>
> //My full code:
> "use strict";
> var foo = true;
>
> //The error message:
> Error:
>
> Problem at line 2 character 9: It is not necessary to initialize 'foo' to
'undefined'.
>
> var foo = true;

This also occurs with a single line such as;

var foo = 2.3;

which gives:

Error:
Problem at line 1 character 9: It is not necessary to initialize 'foo' to
'undefined'.

var foo = 2.3;

Harry.

#1060 From: "Douglas Crockford" <douglas@...>
Date: Wed Jan 13, 2010 1:13 pm
Subject: Re: It is not necessary to initialize 'foo' to 'undefined'.
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "walfisch_in_the_sea" <christian.wirkus@...>
wrote:
> //The error message:
> Error:
>
> Problem at line 2 character 9: It is not necessary to initialize 'foo' to
'undefined'.
>
> var foo = true;


Sorry about that. Please try it now.

#1061 From: Mike West <mike@...>
Date: Tue Jan 19, 2010 4:58 pm
Subject: `rgba` is unrecognized
mikewest_y
Send Email Send Email
 
JSLint doesn't appear to recognize the (relatively new) `rgba` syntax
for defining colors with alpha channels.  Specifically:

     @charset "UTF-8";

     div {
         background:     rgb( 0, 0, 0 );
         background:     rgba( 0, 0, 0, 0.5 );
     }

gives the following errors:

     Error:
     Problem at line 5 character 21: Unexpected token 'rgba'.

     background: rgba( 0, 0, 0, 0.5 );

     Problem at line 5 character 25: Expected ';' and instead saw '('.

     background: rgba( 0, 0, 0, 0.5 );

     Problem at line 5 character 27: Excepted a style attribute, and
instead saw '0'.

     background: rgba( 0, 0, 0, 0.5 );

     Problem at line 5 character 28: Expected ':' and instead saw ','.

     background: rgba( 0, 0, 0, 0.5 );

     Problem at line 301 character 30: Result of expression 'v'
[undefined] is not an object.

Adjusting the `cssColor` function to look for `rgb` and `rgba`, and
setting the number of expected tokens accordingly, looks like it
addresses the issue.  I've done this here as an example:
http://gist.github.com/281085

Thanks!

-Mike

#1062 From: "Douglas Crockford" <douglas@...>
Date: Tue Jan 19, 2010 5:31 pm
Subject: Re: `rgba` is unrecognized
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, Mike West <mike@...> wrote:
>
> JSLint doesn't appear to recognize the (relatively new) `rgba` syntax
> for defining colors with alpha channels.  Specifically:
>
>     @charset "UTF-8";
>
>     div {
>         background:     rgb( 0, 0, 0 );
>         background:     rgba( 0, 0, 0, 0.5 );
>     }
>
> gives the following errors:
>
>     Error:
>     Problem at line 5 character 21: Unexpected token 'rgba'.

Thanks. Please try it now.

#1063 From: Mike West <mike@...>
Date: Tue Jan 19, 2010 8:29 pm
Subject: Re: [jslint] Re: `rgba` is unrecognized
mikewest_y
Send Email Send Email
 
On Tue, Jan 19, 2010 at 6:31 PM, Douglas Crockford
<douglas@...> wrote:

>> JSLint doesn't appear to recognize the (relatively new) `rgba` syntax
>> for defining colors with alpha channels.  Specifically:
>
> Thanks. Please try it now.


Wow, quick turnaround!  Works wonderfully.  In the meantime, I've made
another mistake regarding RGBA that JSLint might catch: the last
parameter must be a decimal between 0 and 1, but it's easy to forget
and try to use a percentage...

I've updated http://gist.github.com/281085 to show a possible way to
approach throwing warnings for this parameter.  Using the following
test data, it seems to work well, throwing warnings for the last two
rules:

     @charset "UTF-8";

     div {
         background:     rgb( 0, 0, 0 );
         background:     rgba( 0, 0, 0, 0.5 );
         background:     rgba( 0, 0, 0, 255 );
         background:     rgba( 0, 0, 0, 0.5% );
     }

Thanks!

-Mike

#1064 From: "Andrew" <adjohns@...>
Date: Wed Jan 20, 2010 3:48 pm
Subject: Release notes for each edition?
effectivit
Send Email Send Email
 
Hi, I've just been to the JSLint site again today and noticed a new edition
date.  I wonder if there are any blog posts, notifications or release notes that
accompany each edition, to identify what's changed and why?

The reason I ask this is because I'm using a visual studio plugin called
JSLint.VS, (http://jslint.codeplex.com/), which enables you to integrate JSLint
as part of the build process and give an error report, or validate single files
etc, but the downloadable version uses an older edition of JSLint.

I've subsequently modified my copy of the source to include a more recent
edition of JSLint, but I did this last year, and it has now changed again, so I
would like to know what changed and why, so that I can determine whether the
change requires a critical update to the plugin. :)

#1065 From: Harry Whitfield <g7awz@...>
Date: Wed Jan 20, 2010 8:32 pm
Subject: Re: [jslint] Release notes for each edition?
harry152566
Send Email Send Email
 
On 20 Jan 2010, at 15:48:39, Andrew wrote:

> Hi, I've just been to the JSLint site again today and noticed a new edition
date. I wonder if there are any blog posts, notifications or release notes that
accompany each edition, to identify what's changed and why?
>
> The reason I ask this is because I'm using a visual studio plugin called
JSLint.VS, (http://jslint.codeplex.com/), which enables you to integrate JSLint
as part of the build process and give an error report, or validate single files
etc, but the downloadable version uses an older edition of JSLint.
>
> I've subsequently modified my copy of the source to include a more recent
edition of JSLint, but I did this last year, and it has now changed again, so I
would like to know what changed and why, so that I can determine whether the
change requires a critical update to the plugin. :)

I have a Yahoo! Widget (called Widget Tester) which automatically makes use of
the latest edition of JSLint, so I hope the following comments may be of help to
you.

I never alter the code of jslint.js itself. Any alterations are  made to the
code which calls it.

My Widget downloads the current edition of JSLint no more than once a day, to
limit traffic on the server. The Widget then makes use of the downloaded
version.

Normally, no changes are required to the Widget or to the code that calls the
JSLint module.

When Douglas announces new features or additions or changes to the options on
this forum, it may be necessary for me to make a new version of the calling
program and to update the Widget.

Widget Tester can be found at http://tinyurl.com/5unocx . You can pull it apart
using any unzip program to see how it works.

The only code that I normally have to change is in the file lint.js and in the
Widget Tester.kon file (when options(i.e. preferences) have to be changed).

Harry.

#1066 From: "Andrew" <adjohns@...>
Date: Wed Jan 20, 2010 9:19 pm
Subject: Re: Release notes for each edition?
effectivit
Send Email Send Email
 
Hi  Harry,

Thanks for the info.  I can confirm that I've never needed to modify the jslint
file itself either, the plugin is just a user interface that allows you to
configure the options that JSLint has, so any new additions to JSLint would
require a slight update to the UI part of the plugin.  Everything else would, as
you rightly point out, not require any UI changes, and would be simply a case of
replacing the JSLint file that the UI communicates with.



--- In jslint_com@yahoogroups.com, Harry Whitfield <g7awz@...> wrote:
>
>
> On 20 Jan 2010, at 15:48:39, Andrew wrote:
>
> > Hi, I've just been to the JSLint site again today and noticed a new edition
date. I wonder if there are any blog posts, notifications or release notes that
accompany each edition, to identify what's changed and why?
> >
> > The reason I ask this is because I'm using a visual studio plugin called
JSLint.VS, (http://jslint.codeplex.com/), which enables you to integrate JSLint
as part of the build process and give an error report, or validate single files
etc, but the downloadable version uses an older edition of JSLint.
> >
> > I've subsequently modified my copy of the source to include a more recent
edition of JSLint, but I did this last year, and it has now changed again, so I
would like to know what changed and why, so that I can determine whether the
change requires a critical update to the plugin. :)
>
> I have a Yahoo! Widget (called Widget Tester) which automatically makes use of
the latest edition of JSLint, so I hope the following comments may be of help to
you.
>
> I never alter the code of jslint.js itself. Any alterations are  made to the
code which calls it.
>
> My Widget downloads the current edition of JSLint no more than once a day, to
limit traffic on the server. The Widget then makes use of the downloaded
version.
>
> Normally, no changes are required to the Widget or to the code that calls the
JSLint module.
>
> When Douglas announces new features or additions or changes to the options on
this forum, it may be necessary for me to make a new version of the calling
program and to update the Widget.
>
> Widget Tester can be found at http://tinyurl.com/5unocx . You can pull it
apart using any unzip program to see how it works.
>
> The only code that I normally have to change is in the file lint.js and in the
Widget Tester.kon file (when options(i.e. preferences) have to be changed).
>
> Harry.
>

#1067 From: Dominic Mitchell <dom@...>
Date: Thu Jan 21, 2010 3:18 pm
Subject: Re: [jslint] Re: Release notes for each edition?
happygiraffe...
Send Email Send Email
 
A lack of release notes is why I started mirroring the jslint web site.  At
least you stand a chance of figuring out what's changed between versions, by
looking at the diffs.

http://github.com/happygiraffe/jslint.com-mirror

Please don't take this as a criticism of jslint itself.  It's still a
wonderful tool.

-Dom

On 20 Jan 2010 21:19, "Andrew" <adjohns@...> wrote:

Hi  Harry,

Thanks for the info.  I can confirm that I've never needed to modify the
jslint file itself either, the plugin is just a user interface that allows
you to configure the options that JSLint has, so any new additions to JSLint
would require a slight update to the UI part of the plugin.  Everything else
would, as you rightly point out, not require any UI changes, and would be
simply a case of replacing the JSLint file that the UI communicates with.

--- In jslint_com@yahoogroups.com, Harry Whitfield <g7awz@...> wrote: > > >
On 20 Jan 2010, at 1...


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

Messages 1038 - 1067 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