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

Re: Unexpected ' '.

Expand Messages
  • Phil
    I just ran a chunk of code I have not touched for awhile, that was passing all of the jslint tests. This time complained about a single unexpected . In my
    Message 1 of 9 , Sep 20, 2011
    • 0 Attachment
      I just ran a chunk of code I have not touched for awhile, that was passing all of the jslint tests. This time complained about a single unexpected ' '. In my case, that was a blank line that has a single space in it. Removing that extra space got rid of the error. Seems the parse has parser has been upgraded recently. The web page says "Edition 2011-09-16".
      Looks like the new version does not like lines that have only white space. I have NOT explored that. Just an assumption from the minimal test.

      --- 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.
      >
    • Robocoder (TM)
      Remove all trailing whitespace (tabs and/or spaces) from the ends of lines.
      Message 2 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 3 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 4 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 5 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 6 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.