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

1746Re: [jslint] Strict mode

Expand Messages
  • Dominic Mitchell
    Jan 10, 2011
      On Mon, Jan 10, 2011 at 2:12 PM, roman_lcf <roman.lcf@...> wrote:

      > We want to not add "use strict" to every our js-file for now, but still
      > take advantage of the strictest JSLint code quality setting.
      > I see 'strict_mode' variable in JSLint source code, but how to set it? Is
      > able to set it through options?
      You can add it on a per-function basis:

      function foo() {
      "use strict";
      // ...

      You can also wrap parts of your code in an anonymous function in order to
      isolate it.

      (function() {
      "use strict";

      function foo() {
      // …


      [Non-text portions of this message have been removed]
    • Show all 2 messages in this topic