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

Re: SV: [jslint] incorrect error about missing space after '['

Expand Messages
  • neonstalwart
    thanks... you re right. i don t know how i missed that.
    Message 1 of 3 , Nov 10, 2010
      thanks... you're right. i don't know how i missed that.


      --- In jslint_com@yahoogroups.com, "Jakob Kruse" <kruse@...> wrote:
      >
      > The error is correct. Specifically there needs to be a space between the single quote character and the plus sign.
      >
      > /Jakob
      >
      >
      > Fra: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] På vegne af neonstalwart
      > Sendt: 9. november 2010 18:18
      > Til: jslint_com@yahoogroups.com
      > Emne: [jslint] incorrect error about missing space after '['
      >
      >
      > i have found a bug. when running the following code through JSLint, it gives me the error below.
      >
      > /*global
      > define: false
      > */
      > /*jslint
      > newcap: true,
      > onevar: true,
      > white: true
      > */
      >
      > define(['foo'], function (f) {
      > var attr = 'data-bar';
      >
      > return f.declare([null], {
      > getList: function (e) {
      > return f.query('['+ attr + ']', e.target);
      > }
      > });
      > });
      >
      > Error:
      > Problem at line 15 character 34: Missing space after '['.
      >
      > return f.query('['+ attr + ']', e.target);
      >
      > i don't need to have a space after the '[' and in fact, in my use case, i need to *not* have a space after the '['.
      >
      > thanks,
      >
      > ben...
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • Erik Eckhardt
      I m sure it was the confusion over reference vs. use with the single quote marks. You read [ as indicating only the square bracket was the thing being
      Message 2 of 3 , Nov 10, 2010
        I'm sure it was the confusion over reference vs. use with the single quote
        marks. You read '[' as indicating only the square bracket was the thing
        being complained about. Whereas " '[' " would have made it clear but been
        confusing in its own way.

        On Wed, Nov 10, 2010 at 11:49 AM, neonstalwart <neonstalwart@...>wrote:

        >
        >
        > thanks... you're right. i don't know how i missed that.
        >
        >
        > --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>, "Jakob
        > Kruse" <kruse@...> wrote:
        > >
        > > The error is correct. Specifically there needs to be a space between the
        > single quote character and the plus sign.
        > >
        > > /Jakob
        > >
        > >
        > > Fra: jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com> [mailto:
        > jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>] P� vegne af
        > neonstalwart
        > > Sendt: 9. november 2010 18:18
        > > Til: jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>
        > > Emne: [jslint] incorrect error about missing space after '['
        > >
        > >
        > > i have found a bug. when running the following code through JSLint, it
        > gives me the error below.
        > >
        > > /*global
        > > define: false
        > > */
        > > /*jslint
        > > newcap: true,
        > > onevar: true,
        > > white: true
        > > */
        > >
        > > define(['foo'], function (f) {
        > > var attr = 'data-bar';
        > >
        > > return f.declare([null], {
        > > getList: function (e) {
        > > return f.query('['+ attr + ']', e.target);
        > > }
        > > });
        > > });
        > >
        > > Error:
        > > Problem at line 15 character 34: Missing space after '['.
        > >
        > > return f.query('['+ attr + ']', e.target);
        > >
        > > i don't need to have a space after the '[' and in fact, in my use case, i
        > need to *not* have a space after the '['.
        > >
        > > thanks,
        > >
        > > ben...
        > >
        > >
        > > [Non-text portions of this message have been removed]
        > >
        >
        >
        >


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