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

Re: JSLint for checking javascript for Firefox extensions

Expand Messages
  • Douglas Crockford
    ... Early on JSLint had support for some of JScript s deviations. I decided to remove that because we are better off sticking to the portable standard. I think
    Message 1 of 4 , Oct 3, 2008
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "saturn_jct" <turner@...> wrote:
      >
      > After tracking down a bug in 0.8.5.3 of the HTML Validator Firefox
      > extension, I decided to try out JSLint on some of the code in it. It
      > doesn't work because of some things that I think are Javascript
      > extensions usable only by Firefox extensions.
      >
      > The first problem I ran into is the use of "const", which isn't
      > recognized by JSLint.
      >
      > The other problem was the use of "window.arguments". JSLint considers
      > "arguments" to be a reserved word. Try as I might, I couldn't find a
      > reference anywhere that listed arguments as a current or possible
      > future reserved word. I did find out that "window.arguments" is an
      > additional property created when a window is created using
      > window.OpenDialog, which appears to be part of the Gecko DOM. See
      > http://developer.mozilla.org/en/DOM/window.openDialog
      >
      > Now beyond these two problems, JSLint was showing lots of questionable
      > things in the Javascript of the extension.
      >
      > Where I'm going with this is that I think it would be of significant
      > use to people to be able to use JSLint on the code for their Firefox
      > extensions. There would be the problem of sorting out what extensions
      > and modifications are available when programming for Firefox Extensions.


      Early on JSLint had support for some of JScript's deviations. I
      decided to remove that because we are better off sticking to the
      portable standard. I think that is still good advice.

      Just because Firefox plays fast and loose with the standard doesn't
      mean that we should.

      JSLint reserves arguments to prevent a number of bad actions that
      happen from attempting to modify arguments.

      Any property stored in the global object (aka window) is a global
      variable.
    • Fred Lorrain
      ... Extensions. ... const exists in Javascript since version 1.5? JSLint doesn t accept const ?? If yes, why ?
      Message 2 of 4 , Oct 5, 2008
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
        wrote:
        >
        > --- In jslint_com@yahoogroups.com, "saturn_jct" <turner@> wrote:
        > >
        > > After tracking down a bug in 0.8.5.3 of the HTML Validator Firefox
        > > extension, I decided to try out JSLint on some of the code in it. It
        > > doesn't work because of some things that I think are Javascript
        > > extensions usable only by Firefox extensions.
        > >
        > > The first problem I ran into is the use of "const", which isn't
        > > recognized by JSLint.
        > >
        > > The other problem was the use of "window.arguments". JSLint considers
        > > "arguments" to be a reserved word. Try as I might, I couldn't find a
        > > reference anywhere that listed arguments as a current or possible
        > > future reserved word. I did find out that "window.arguments" is an
        > > additional property created when a window is created using
        > > window.OpenDialog, which appears to be part of the Gecko DOM. See
        > > http://developer.mozilla.org/en/DOM/window.openDialog
        > >
        > > Now beyond these two problems, JSLint was showing lots of questionable
        > > things in the Javascript of the extension.
        > >
        > > Where I'm going with this is that I think it would be of significant
        > > use to people to be able to use JSLint on the code for their Firefox
        > > extensions. There would be the problem of sorting out what extensions
        > > and modifications are available when programming for Firefox
        Extensions.
        >
        >
        > Early on JSLint had support for some of JScript's deviations. I
        > decided to remove that because we are better off sticking to the
        > portable standard. I think that is still good advice.
        >
        > Just because Firefox plays fast and loose with the standard doesn't
        > mean that we should.
        >
        > JSLint reserves arguments to prevent a number of bad actions that
        > happen from attempting to modify arguments.
        >
        > Any property stored in the global object (aka window) is a global
        > variable.
        >

        'const' exists in Javascript since version 1.5?
        JSLint doesn't accept 'const' ??

        If yes, why ?
      • Douglas Crockford
        ... const is not in the ECMAScript standard. JSLint accepts a subset of the ECMAScript standard.
        Message 3 of 4 , Oct 5, 2008
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@...> wrote:
          > 'const' exists in Javascript since version 1.5?
          > JSLint doesn't accept 'const' ??

          const is not in the ECMAScript standard.
          JSLint accepts a subset of the ECMAScript standard.
        Your message has been successfully submitted and would be delivered to recipients shortly.