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

double underscores

Expand Messages
  • Mark Volkmann
    I m trying to use JSLint to check code that uses the Express module of Node.js. It uses the variable __dirname. Is there an option for JSLint that would allow
    Message 1 of 6 , Aug 3, 2011
    • 0 Attachment
      I'm trying to use JSLint to check code that uses the Express module of Node.js.
      It uses the variable __dirname.
      Is there an option for JSLint that would allow that? nomen seems to
      only ignore one leading underscore.

      --
      R. Mark Volkmann
      Object Computing, Inc.
    • Martin Cooper
      On Wed, Aug 3, 2011 at 12:09 PM, Mark Volkmann ... Try node: true instead (which is Assume Node.js on the web site). -- Martin Cooper
      Message 2 of 6 , Aug 3, 2011
      • 0 Attachment
        On Wed, Aug 3, 2011 at 12:09 PM, Mark Volkmann
        <r.mark.volkmann@...> wrote:
        > I'm trying to use JSLint to check code that uses the Express module of Node.js.
        > It uses the variable __dirname.
        > Is there an option for JSLint that would allow that? nomen seems to
        > only ignore one leading underscore.

        Try "node: true" instead (which is "Assume Node.js" on the web site).

        --
        Martin Cooper


        > --
        > R. Mark Volkmann
        > Object Computing, Inc.
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Mark Volkmann
        ... That doesn t work for me. I ran JSLint on the following: /*jslint node: true */ console.log(__dirname); It complains about the double-underscore in front
        Message 3 of 6 , Aug 3, 2011
        • 0 Attachment
          On Wed, Aug 3, 2011 at 3:53 PM, Martin Cooper <mfncooper@...> wrote:

          > **
          >
          >
          > On Wed, Aug 3, 2011 at 12:09 PM, Mark Volkmann
          > <r.mark.volkmann@...> wrote:
          > > I'm trying to use JSLint to check code that uses the Express module of
          > Node.js.
          > > It uses the variable __dirname.
          > > Is there an option for JSLint that would allow that? nomen seems to
          > > only ignore one leading underscore.
          >
          > Try "node: true" instead (which is "Assume Node.js" on the web site).
          >

          That doesn't work for me. I ran JSLint on the following:

          /*jslint node: true */
          console.log(__dirname);

          It complains about the double-underscore in front of "dirname" despite the
          fact that the "node" option is supposed to define "__dirname" as a global
          variable.

          --
          R. Mark Volkmann
          Object Computing, Inc.


          [Non-text portions of this message have been removed]
        • Douglas Crockford
          ... Double underbar is an ultra bad practice because of its diabolical use by implementations like Spidermonkey. Leading underbar is stupid. Double leading
          Message 4 of 6 , Aug 3, 2011
          • 0 Attachment
            --- In jslint_com@yahoogroups.com, Mark Volkmann <r.mark.volkmann@...> wrote:
            >
            > I'm trying to use JSLint to check code that uses the Express module of Node.js.
            > It uses the variable __dirname.
            > Is there an option for JSLint that would allow that? nomen seems to
            > only ignore one leading underscore.


            Double underbar is an ultra bad practice because of its diabolical use by implementations like Spidermonkey.

            Leading underbar is stupid. Double leading underbar is double stupid.
          • Martin Cooper
            ... It s the Node.js core committers you d need to convince of that, Doug. The consumers of the Node.js API - including the JSLint users here on this list -
            Message 5 of 6 , Aug 3, 2011
            • 0 Attachment
              On Wed, Aug 3, 2011 at 3:26 PM, Douglas Crockford <douglas@...> wrote:
              > --- In jslint_com@yahoogroups.com, Mark Volkmann <r.mark.volkmann@...> wrote:
              >>
              >> I'm trying to use JSLint to check code that uses the Express module of Node.js.
              >> It uses the variable __dirname.
              >> Is there an option for JSLint that would allow that? nomen seems to
              >> only ignore one leading underscore.
              >
              >
              > Double underbar is an ultra bad practice because of its diabolical use by implementations like Spidermonkey.
              >
              > Leading underbar is stupid. Double leading underbar is double stupid.

              It's the Node.js core committers you'd need to convince of that, Doug.
              The consumers of the Node.js API - including the JSLint users here on
              this list - don't have any real say in the matter.

              --
              Martin Cooper


              > ------------------------------------
              >
              > Yahoo! Groups Links
              >
              >
              >
              >
            • Martin Cooper
              ... Okay, it seems you need both. Try: /*jslint node: true, nomen: true */ console.log(__dirname); -- Martin Cooper
              Message 6 of 6 , Aug 3, 2011
              • 0 Attachment
                On Wed, Aug 3, 2011 at 2:17 PM, Mark Volkmann <r.mark.volkmann@...> wrote:
                > On Wed, Aug 3, 2011 at 3:53 PM, Martin Cooper <mfncooper@...> wrote:
                >
                >> **
                >>
                >>
                >> On Wed, Aug 3, 2011 at 12:09 PM, Mark Volkmann
                >> <r.mark.volkmann@...> wrote:
                >> > I'm trying to use JSLint to check code that uses the Express module of
                >> Node.js.
                >> > It uses the variable __dirname.
                >> > Is there an option for JSLint that would allow that? nomen seems to
                >> > only ignore one leading underscore.
                >>
                >> Try "node: true" instead (which is "Assume Node.js" on the web site).
                >>
                >
                > That doesn't work for me. I ran JSLint on the following:
                >
                > /*jslint node: true */
                > console.log(__dirname);
                >
                > It complains about the double-underscore in front of "dirname" despite the
                > fact that the "node" option is supposed to define "__dirname" as a global
                > variable.

                Okay, it seems you need both. Try:

                /*jslint node: true, nomen: true */
                console.log(__dirname);

                --
                Martin Cooper


                > --
                > R. Mark Volkmann
                > Object Computing, Inc.
                >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.