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

Re: [jslint] Cascade format

Expand Messages
  • Erik Eckhardt
    I don t think that s true... I have code with dots on the next line and I don t think jslint complains about it. ... [Non-text portions of this message have
    Message 1 of 7 , Nov 24, 2010
    • 0 Attachment
      I don't think that's true... I have code with dots on the next line and I
      don't think jslint complains about it.

      On Wed, Nov 24, 2010 at 8:48 AM, Tzvika <tzvikam@...> wrote:

      > Rob
      >
      > But due to 'semicolon insertion', you will get an error on line 2.
      >
      > On Wed, Nov 24, 2010 at 5:25 PM, Rob Richardson <erobrich@...<erobrich%40robrich.org>
      > >wrote:
      > > Put the dots at the beginning of the next line rather than at the end of
      > > the
      > > former line.
      > >
      > > Rob
      > >
      > > -----Original Message-----
      > > From: jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com><jslint_com%
      > 40yahoogroups.com> [mailto:
      > > jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com> <jslint_com%
      > 40yahoogroups.com>] On
      > > Behalf Of James
      > > Sent: Wednesday, November 24, 2010 7:45 AM
      > > To: jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com><jslint_com%
      > 40yahoogroups.com>
      > > Subject: [jslint] Cascade format
      > >
      > > In "JavaScript: The Good Parts", page 42, a cascade is formatted very
      > > nicely. In my example, I have:
      > >
      > > var htmlToExamine = returnvalue.
      > > replace(/^Success/, "").
      > > replace(/^<div id="\w+_table_\d+_book_buttons".*?<\/div>/, "").
      > > replace(/<script.*?<\/script>/g, "").
      > > replace(/^\s*<[^>]+>\s*/, "").
      > > replace(/\s*<\/\w+>\s*$/, "");
      > >
      > > I like how this looks, lining up the replace method calls. However,
      > JSLint
      > > does not like it. Is there an option I'm missing that lets this format be
      > > accepted?
      >
      > Tzvika Merchav
      >


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.