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

question about console.log statements

Expand Messages
  • Simon Kenyon Shepard
    Hi, apologies if this has already been covered. I was wondering whether there are any plans to bring in the option to be able to flag console.log statements in
    Message 1 of 4 , Nov 16, 2009
    • 0 Attachment
      Hi,

      apologies if this has already been covered.
      I was wondering whether there are any plans to bring in the option to
      be able to flag console.log statements in JSLint.
      I often find console.log's in javascript where someone has been using
      them for debugging in firebug but then it breaks in IE (or firefox
      without firebug) but have failed to remove them for production code.
      Ideally I would like to fold this into my CI checks with JSLint, I was
      hoping someone might be able to point me in the right direction...

      Cheers

      Simon
    • Douglas Crockford
      ... That is a great suggestion. Perhaps there could be an option that determines whether console, Debug, and Opera are predefined. You would turn it on for
      Message 2 of 4 , Nov 16, 2009
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, Simon Kenyon Shepard wrote:
        > I was wondering whether there are any plans to bring in the option to
        > be able to flag console.log statements in JSLint.

        That is a great suggestion. Perhaps there could be an option that determines whether console, Debug, and Opera are predefined. You would turn it on for development, and off for deployment.

        Are there other useful development time globals?
      • sks0001010
        Hmmm, not that I can think of off the top of my head, those 3 are the only ones that get reused repeatedly for JS debugging in the different browsers. In
        Message 3 of 4 , Nov 16, 2009
        • 0 Attachment
          Hmmm, not that I can think of off the top of my head, those 3 are the only ones that get reused repeatedly for JS debugging in the different browsers.

          In another topic, I've been trying to use JSLint to validate HTML fragments, but the templating system being used relies on having files with backend blocks in it like <% print(someValue); %>
          it would be awesome, if there was a switch for tags with different starting and ending delimeters that could be filtered out of the validation process, but I don't know whether this becomes a bit out of the scope of the software ;-)




          --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
          >
          > --- In jslint_com@yahoogroups.com, Simon Kenyon Shepard wrote:
          > > I was wondering whether there are any plans to bring in the option to
          > > be able to flag console.log statements in JSLint.
          >
          > That is a great suggestion. Perhaps there could be an option that determines whether console, Debug, and Opera are predefined. You would turn it on for development, and off for deployment.
          >
          > Are there other useful development time globals?
          >
        • Toby Maxwell-Lyte
          What about alert() ? ... -- Toby Maxwell-Lyte 07816 836300 01443 449003
          Message 4 of 4 , Nov 17, 2009
          • 0 Attachment
            What about alert() ?

            2009/11/16 sks0001010 <simon.shepard@...>:
            >
            >
            > Hmmm, not that I can think of off the top of my head, those 3 are the only ones that get reused repeatedly for JS debugging in the different browsers.
            >
            > In another topic, I've been trying to use JSLint to validate HTML fragments, but the templating system being used relies on having files with backend blocks in it like <% print(someValue); %>
            > it would be awesome, if there was a switch for tags with different starting and ending delimeters that could be filtered out of the validation process, but I don't know whether this becomes a bit out of the scope of the software ;-)
            >
            >
            >
            >
            > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
            >>
            >> --- In jslint_com@yahoogroups.com, Simon Kenyon Shepard wrote:
            >> > I was wondering whether there are any plans to bring in the option to
            >> > be able to flag console.log statements in JSLint.
            >>
            >> That is a great suggestion. Perhaps there could be an option that determines whether console, Debug, and Opera are predefined. You would turn it on for development, and off for deployment.
            >>
            >> Are there other useful development time globals?
            >>
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            >



            --
            Toby Maxwell-Lyte
            07816 836300
            01443 449003
          Your message has been successfully submitted and would be delivered to recipients shortly.