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

Re: function_strict warning and CommonJS modules

Expand Messages
  • Zhami
    ... Great. Thanks. Validated. ... In the context we (the op, me, and other nodeJS module coders) are using, the code is effectively wrapped/contained in an
    Message 1 of 9 , Jun 4, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:

      >
      > When using the Assume node.js option, JSLint will now tolerate the file level use strict pragma.

      Great. Thanks. Validated.

      >
      > I think you would be smarter to use the function use strict pragma.

      In the context we (the op, me, and other nodeJS module coders) are using, the code is effectively wrapped/contained in an anonymous function, though not one that appears in the file. It would be functionally redundant to wrap the content of a CommonJS module file in yet another (anonymous, immediate) function.
    Your message has been successfully submitted and would be delivered to recipients shortly.