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

1261Re: option.es5

Expand Messages
  • boyopeg
    Apr 6, 2010
    • 0 Attachment
      It seems to me that the trailing comma in object notation is a rather bad coding practice. I'm fine with JS parsers being able to ignore errors such as these. But why should a style and syntax checking tool like JSLint be blind to such sloppy code practices?  Am I missing something with this option? 


      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
      > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@> wrote:
      > >
      > > There is a new option, Tolerate ES5 syntax. If you check this option, JSLint will accept the new get/set syntax in object literals.
      > >
      > > It will require that the get and set functions be declared together, that the get function have no parameters, and that the set function will have a single parameter called 'value'.
      > >
      > > Please let me know if you find any problems.
      > option.es5 will now relax the reserved word restriction on object
      > literals and dot notation, and tolerate a dangling comma, so
      > var object = {
      > class: x.class,
      > };
      > is accepted.
    • Show all 12 messages in this topic