Re: [jslint] Re: closure compiler chokes on jslint.js
- 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 firstname.lastname@example.org, "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;
> in 'Retrieval'
> word, then the . notation can be used instead"
> On Page 7 the word `function' is listed as one of these reserved
> 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
[Non-text portions of this message have been removed]
> JSLint strictly conforms to the syntax of ES5.That information of yours got me on the right path:
calling closure with
solves my problem.
No errors are beeing thrown at me.
--language_in defaults to ECMASCRIPT3 in which the thing in question
Thank you !
- 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...
> > I think the question was whether JSLint conforms to the advice in your book.[Non-text portions of this message have been removed]
> The book is dated.
- On Sat, Mar 2, 2013 at 8:39 AM, Heinz Rasched <raschedh@...> wrote:
> 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.
similar spirit to how you can specify it in, for instance, the Perl
programming language). That might reduce problems, or at least make
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.