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

Re: Unexpected ' '.

Expand Messages
  • Robocoder (TM)
    Remove all trailing whitespace (tabs and/or spaces) from the ends of lines.
    Message 1 of 9 , Sep 20, 2011
    • 0 Attachment
      Remove all trailing whitespace (tabs and/or spaces) from the ends of lines.

      --- In jslint_com@yahoogroups.com, "mocthadoohay" <mocthadoohay@...> wrote:
      >
      > I've been working on a JS file for a week or so with frequent trips thru JSLint along the way. Today, I getting tons of errors that look like this:
      >
      > Problem at line 243 character 62: Unexpected ' '.
      >
      > The "Tolerate messy white space" option has no affect on this error. This is also not a "mixed tabs and spaces" error. Can anyone offer some insight into why this error is triggered and how to tolerate whatever problem it's picking up?
      >
      > Thanks.
      >
    • mocthadoohay
      I m using TextMate. Does anyone know of an automated way to remove extra whitespace from lines? It would be incredibly time consuming to do it manually. Also,
      Message 2 of 9 , Sep 21, 2011
      • 0 Attachment
        I'm using TextMate. Does anyone know of an automated way to remove extra whitespace from lines? It would be incredibly time consuming to do it manually.

        Also, why is this error not optional if "Tolerate messy white space" is an option?

        --- In jslint_com@yahoogroups.com, "Robocoder (TM)" <apang@...> wrote:
        >
        > Remove all trailing whitespace (tabs and/or spaces) from the ends of lines.
        >
        > --- In jslint_com@yahoogroups.com, "mocthadoohay" <mocthadoohay@> wrote:
        > >
        > > I've been working on a JS file for a week or so with frequent trips thru JSLint along the way. Today, I getting tons of errors that look like this:
        > >
        > > Problem at line 243 character 62: Unexpected ' '.
        > >
        > > The "Tolerate messy white space" option has no affect on this error. This is also not a "mixed tabs and spaces" error. Can anyone offer some insight into why this error is triggered and how to tolerate whatever problem it's picking up?
        > >
        > > Thanks.
        > >
        >
      • mocthadoohay
        Answering my own question: TextMate: Bundles: Text: Converting/Stripping: Remove Trailing Spaces in Document Looks like a must before running thru JSLint.
        Message 3 of 9 , Sep 21, 2011
        • 0 Attachment
          Answering my own question: TextMate: Bundles: Text: Converting/Stripping: Remove Trailing Spaces in Document

          Looks like a must before running thru JSLint.

          --- In jslint_com@yahoogroups.com, "mocthadoohay" <mocthadoohay@...> wrote:
          >
          > I'm using TextMate. Does anyone know of an automated way to remove extra whitespace from lines? It would be incredibly time consuming to do it manually.
          >
          > Also, why is this error not optional if "Tolerate messy white space" is an option?
          >
          > --- In jslint_com@yahoogroups.com, "Robocoder (TM)" <apang@> wrote:
          > >
          > > Remove all trailing whitespace (tabs and/or spaces) from the ends of lines.
          > >
          > > --- In jslint_com@yahoogroups.com, "mocthadoohay" <mocthadoohay@> wrote:
          > > >
          > > > I've been working on a JS file for a week or so with frequent trips thru JSLint along the way. Today, I getting tons of errors that look like this:
          > > >
          > > > Problem at line 243 character 62: Unexpected ' '.
          > > >
          > > > The "Tolerate messy white space" option has no affect on this error. This is also not a "mixed tabs and spaces" error. Can anyone offer some insight into why this error is triggered and how to tolerate whatever problem it's picking up?
          > > >
          > > > Thanks.
          > > >
          > >
          >
        • Rob Richardson
          This works nicely for me: #!/bin/sh cat - | sed s/[ t]+$//g &1 Rob ... From: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] On Behalf Of
          Message 4 of 9 , Sep 21, 2011
          • 0 Attachment
            This works nicely for me:

            #!/bin/sh
            cat - | sed s/[ \t]+$//g > &1

            Rob


            -----Original Message-----
            From: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] On
            Behalf Of mocthadoohay
            Sent: Wednesday, September 21, 2011 11:41 AM
            To: jslint_com@yahoogroups.com
            Subject: [jslint] Re: Unexpected ' '.

            Answering my own question: TextMate: Bundles: Text: Converting/Stripping:
            Remove Trailing Spaces in Document

            Looks like a must before running thru JSLint.

            --- In jslint_com@yahoogroups.com, "mocthadoohay" <mocthadoohay@...> wrote:
            >
            > I'm using TextMate. Does anyone know of an automated way to remove extra
            whitespace from lines? It would be incredibly time consuming to do it
            manually.
            >
            > Also, why is this error not optional if "Tolerate messy white space" is an
            option?
            >
            > --- In jslint_com@yahoogroups.com, "Robocoder (TM)" <apang@> wrote:
            > >
            > > Remove all trailing whitespace (tabs and/or spaces) from the ends of
            lines.
            > >
            > > --- In jslint_com@yahoogroups.com, "mocthadoohay" <mocthadoohay@> wrote:
            > > >
            > > > I've been working on a JS file for a week or so with frequent trips
            thru JSLint along the way. Today, I getting tons of errors that look like
            this:
            > > >
            > > > Problem at line 243 character 62: Unexpected ' '.
            > > >
            > > > The "Tolerate messy white space" option has no affect on this error.
            This is also not a "mixed tabs and spaces" error. Can anyone offer some
            insight into why this error is triggered and how to tolerate whatever
            problem it's picking up?
            > > >
            > > > Thanks.
            > > >
            > >
            >
          • Michael Mikowski
            ... Add this to your .vimrc and then type ;k anytime you want to klean : =====[ klean - removes trailing whitespace ]===== map ;k :%s? s +$??
            Message 5 of 9 , Sep 21, 2011
            • 0 Attachment
              If anyone besides me is using vim:


              :%s?\s\+$??g

              Add this to your .vimrc and then type ;k anytime you want to "klean":
              "=====[ klean - removes trailing whitespace ]=====
              map ;k :%s?\s\+$??<CR>




              ________________________________
              From: Rob Richardson <erobrich@...>
              To: jslint_com@yahoogroups.com
              Sent: Wednesday, September 21, 2011 12:27 PM
              Subject: RE: [jslint] Re: Unexpected ' '.


               
              This works nicely for me:

              #!/bin/sh
              cat - | sed s/[ \t]+$//g > &1

              Rob






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