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

Re: closure compiler chokes on jslint.js

Expand Messages
  • douglascrockford
    ... JSLint strictly conforms to the syntax of ES5. File a bug report with closure.
    Message 1 of 8 , Mar 2 1:14 AM
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Heinz Rasched" <raschedh@...> wrote:
      >
      > running the closure compiler from The Google
      > over jslint.js now throws errors.
      >
      > it is offended for example by the usage of 'function' as a
      > property name.
      > For example in line 1980 of jslint.js one finds
      >
      > token.function = funct;
      >
      > Now in 'JavaScript: The Good Parts' one finds on page 21
      > in 'Retrieval'
      >
      > "[...] and if it is a legal JavaScript name and not a reserved
      > word, then the . notation can be used instead"
      >
      > On Page 7 the word `function' is listed as one of these reserved
      > words.
      >
      > so closure seems to be rightly offended.
      >
      >
      > i use jslint from the cmdline, attaching some stuff to its
      > butt, so that i can run it through node.js.
      > after the attachment i run closure to minify it.
      > so it's not a big deal; i can still run it.


      JSLint strictly conforms to the syntax of ES5. File a bug report with closure.
    • Mark Volkmann
      I think the question was whether JSLint conforms to the advice in your book. ... R. Mark Volkmann Object Computing, Inc. ... JSLint strictly conforms to the
      Message 2 of 8 , Mar 2 3:29 AM
      • 0 Attachment
        I think the question was whether JSLint conforms to the advice in your book.

        ---
        R. Mark Volkmann
        Object Computing, Inc.

        On Mar 2, 2013, at 3:21 AM, douglascrockford <douglas@...> wrote:



        --- In jslint_com@yahoogroups.com, "Heinz Rasched" wrote:
        >
        > running the closure compiler from The Google
        > over jslint.js now throws errors.
        >
        > it is offended for example by the usage of 'function' as a
        > property name.
        > For example in line 1980 of jslint.js one finds
        >
        > token.function = funct;
        >
        > Now in 'JavaScript: The Good Parts' one finds on page 21
        > in 'Retrieval'
        >
        > "[...] and if it is a legal JavaScript name and not a reserved
        > word, then the . notation can be used instead"
        >
        > On Page 7 the word `function' is listed as one of these reserved
        > words.
        >
        > so closure seems to be rightly offended.
        >
        >
        > i use jslint from the cmdline, attaching some stuff to its
        > butt, so that i can run it through node.js.
        > after the attachment i run closure to minify it.
        > so it's not a big deal; i can still run it.

        JSLint strictly conforms to the syntax of ES5. File a bug report with
        closure.




        [Non-text portions of this message have been removed]
      • Felix E. Klee
        ... The book is dated.
        Message 3 of 8 , Mar 2 3:32 AM
        • 0 Attachment
          > I think the question was whether JSLint conforms to the advice in your book.

          The book is dated.
        • Heinz Rasched
          ... That information of yours got me on the right path: calling closure with --language_in ECMASCRIPT5 solves my problem. No errors are beeing thrown at me.
          Message 4 of 8 , Mar 2 5:39 AM
          • 0 Attachment
            > JSLint strictly conforms to the syntax of ES5.

            That information of yours got me on the right path:

            calling closure with

            --language_in ECMASCRIPT5

            solves my problem.
            No errors are beeing thrown at me.


            --language_in defaults to ECMASCRIPT3 in which the thing in question
            isn't allowed.

            Thank you !
          • IcedNet Development Team
            Have brought to light another question: is there an update planned for The Good Parts? I for one would purchase it again, we re it updated and in any way
            Message 5 of 8 , Mar 2 5:51 AM
            • 0 Attachment
              Have brought to light another question: is there an update planned for The Good Parts?
              I for one would purchase it again, we're it updated and in any way expanded to reflect Douglas' more recent views...

              Peace,
              Dan

              > > I think the question was whether JSLint conforms to the advice in your book.
              >
              > The book is dated.
              >


              [Non-text portions of this message have been removed]
            • Heinz Rasched
              Yeah ! I d love to be taught the good parts of ES5.
              Message 6 of 8 , Mar 2 6:12 AM
              • 0 Attachment
                Yeah !

                I'd love to be taught the good parts of ES5.
              • Joseph R. Justice
                ... Speaking as a non-active user of Javascript or of JSLint... I wonder if there s a way to specify at the beginning of a Javascript program file the
                Message 7 of 8 , Mar 2 6:58 AM
                • 0 Attachment
                  On Sat, Mar 2, 2013 at 8:39 AM, Heinz Rasched <raschedh@...> wrote:

                  > > JSLint strictly conforms to the syntax of ES5.
                  >
                  > That information of yours got me on the right path:
                  >
                  > calling closure with
                  >
                  > --language_in ECMASCRIPT5
                  >
                  > solves my problem.
                  > No errors are beeing thrown at me.
                  >
                  > --language_in defaults to ECMASCRIPT3 in which the thing in question
                  > isn't allowed.

                  Speaking as a non-active user of Javascript or of JSLint... I wonder
                  if there's a way to specify at the beginning of a Javascript program
                  file the Javascript standards level that program requires (in a
                  similar spirit to how you can specify it in, for instance, the Perl
                  programming language). That might reduce problems, or at least make
                  it clearer what the real problem is (since a Javascript interpreter or
                  compiler that does not provide that standards level could presumably
                  throw an error saying "I don't support this").

                  Thanks for your time. Hope this is of some use, interest. Be well.



                  Joseph
                Your message has been successfully submitted and would be delivered to recipients shortly.