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

Leading Commas / laxbreak

Expand Messages
  • nospamas
    Feelings have been hurt! I m a fan of the leading comma style of coding. Until recently jslint partially supported it via the laxbreak option to prevent errors
    Message 1 of 3 , Jan 23, 2011
    • 0 Attachment
      Feelings have been hurt!

      I'm a fan of the leading comma style of coding. Until recently jslint partially supported it via the laxbreak option to prevent errors of this type. This seems to have been removed in the latest round of changes and unfortunately I've been unable to find much information on the subject.

      Could the use of leading commas be supported in jslint officially with the new white-space changes?
    • Douglas Crockford
      ... Ok, but it doesn t make sense to me why you would want to break your programs like that.
      Message 2 of 3 , Jan 23, 2011
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "nospamas" <nospamas@...> wrote:
        > I'm a fan of the leading comma style of coding. Until recently jslint partially supported it via the laxbreak option to prevent errors of this type. This seems to have been removed in the latest round of changes and unfortunately I've been unable to find much information on the subject.
        >
        > Could the use of leading commas be supported in jslint officially with the new white-space changes?


        Ok, but it doesn't make sense to me why you would want to break your programs like that.
      • John Sampson
        ... Initially I found it to simply easier to read, but saki gave a couple of other good reasons on his blog at
        Message 3 of 3 , Jan 23, 2011
        • 0 Attachment
          > Ok, but it doesn't make sense to me why you would want to break your programs like that.

          Initially I found it to simply easier to read, but saki gave a couple of other good reasons on his blog at http://blog.extjs.eu/philosophy/leading-comma-or-trailing-comma-that-is-the-question/ which solidified it for me.

          Given good reason I'd switch back to the norm of using trailing commas.
        Your message has been successfully submitted and would be delivered to recipients shortly.