Loading ...
Sorry, an error occurred while loading the content.

JSLint JavaScripts are generating warnings

Expand Messages
  • Fred Lorrain
    Hello, I m for sure too strict, too maniac but ... JSLint is used to validate JavaScript so what about providing perfect JavaScripts in JSLint? If you turn on
    Message 1 of 4 , Aug 19, 2008
    • 0 Attachment
      Hello,

      I'm for sure too strict, too maniac but ...

      JSLint is used to validate JavaScript so what about providing perfect
      JavaScripts in JSLint?

      If you turn on Firebug on the JSLint page (http://www.jslint.com/)
      you will get a long list of warnings.

      It's not difficult to get ride of them.
      Could you please improve the scripts?
      Thanks a lot.

      Here examples of warnings:

      function str does not always return a value
      }\n
      json2.js (line 342)
      assignment to undeclared variable JSON
      JSON = function () {
      json2.js (line 163)
      function match does not always return a value
      line=-1;nextLine();from=0;},token:function(){var
      b,c,captures,d,depth,high,i,l,l...
      webjslint.js (line 30)
      anonymous function does not always return a value
      (;;){b=true;c=s.charAt(l);l+=1;switch(c){case'':errorAt("Unclosed
      regular expres...
      webjslint.js (line 57)
      anonymous function does not always return a value
      character+=l;s=s.substr(l);return
      it('(regex)',c);case'\\':c=s.charAt(l);if(c<' ...
      webjslint.js (line 59)
      anonymous function does not always return a value
      c=s.substr(0,l-1);character+=l;s=s.substr(l);return it('(regex)',c);}\n
      webjslint.js (line 80)
      anonymous function does not always return a value
      return it('(punctuator)',t);default:return
      it('(punctuator)',t);}}},skip:functio...
      webjslint.js (line 81)
      anonymous function does not always return a value
      return it('(punctuator)',t);default:return
      it('(punctuator)',t);}}},skip:functio...
      webjslint.js (line 81)
      anonymous function does not always return a value
      error("Bad assignment.",this);},20);}\n
      webjslint.js (line 150)
      anonymous function does not always return a value
      error("Bad assignment.",this);},20);}\n
      webjslint.js (line 156)
      function optionalidentifier does not always return a value
      if(nexttoken.identifier){advance();return token.value;}}\n
      webjslint.js (line 160)
      function identifier does not always return a value
      if(token.id==='function'&&nexttoken.id==='('){warning("Missing name in
      function ...
      webjslint.js (line 162)
      function statement does not always return a value
      indent=i;scope=s;return r;}\n
      webjslint.js (line 174)
      function functionparams does not always return a value

      for(;;){i=identifier();p.push(i);addlabel(i,'parameter');if(nexttoken.id\
      ===','){...
      webjslint.js (line 302)
      anonymous function does not always return a value

      advance(')',t);nospace(prevtoken,token);block(true);funct['(breakage)']-\
      =1;funct...
      webjslint.js (line 326)
      reference to undefined property o.predef
      indent.value=o.indent||4;predefined.value=o.predef instanceof
      Array?o.predef.joi...
      webjslint.js (line 383)
      assignment to undeclared variable JSLINT
      "use strict";JSLINT=function(){var
      adsafe_id,adsafe_may,adsafe_went,anonname,app...


      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... The warnings assume that a lack of understanding on how undefined works in the language. If you have a Java mentality, they might be useful. I have a
      Message 2 of 4 , Aug 20, 2008
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@...> wrote:
        > I'm for sure too strict, too maniac but ...
        >
        > JSLint is used to validate JavaScript so what about providing perfect
        > JavaScripts in JSLint?
        >
        > If you turn on Firebug on the JSLint page (http://www.jslint.com/)
        > you will get a long list of warnings.

        The warnings assume that a lack of understanding on how undefined
        works in the language. If you have a Java mentality, they might be
        useful. I have a JavaScript mentality.
      • Fred Lorrain
        ... Does it mean you will fix them or not ? :D
        Message 3 of 4 , Aug 20, 2008
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
          wrote:
          >
          > --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@> wrote:
          > > I'm for sure too strict, too maniac but ...
          > >
          > > JSLint is used to validate JavaScript so what about providing perfect
          > > JavaScripts in JSLint?
          > >
          > > If you turn on Firebug on the JSLint page (http://www.jslint.com/)
          > > you will get a long list of warnings.
          >
          > The warnings assume that a lack of understanding on how undefined
          > works in the language. If you have a Java mentality, they might be
          > useful. I have a JavaScript mentality.
          >

          Does it mean you will fix them or not ? :D
        • Fred Lorrain
          ... perfect ... Any news ?
          Message 4 of 4 , Sep 11, 2008
          • 0 Attachment
            --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@...> wrote:
            >
            > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@>
            > wrote:
            > >
            > > --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@> wrote:
            > > > I'm for sure too strict, too maniac but ...
            > > >
            > > > JSLint is used to validate JavaScript so what about providing
            perfect
            > > > JavaScripts in JSLint?
            > > >
            > > > If you turn on Firebug on the JSLint page (http://www.jslint.com/)
            > > > you will get a long list of warnings.
            > >
            > > The warnings assume that a lack of understanding on how undefined
            > > works in the language. If you have a Java mentality, they might be
            > > useful. I have a JavaScript mentality.
            > >
            >
            > Does it mean you will fix them or not ? :D
            >

            Any news ?
          Your message has been successfully submitted and would be delivered to recipients shortly.