2251Re: function_strict warning and CommonJS modules
- Jun 3, 2011--- In firstname.lastname@example.org, "mariuszn3" <medikoo.yahxo.com@...> wrote:
> Sorry, if I wasn't clear enough.When using the Assume node.js option, JSLint will now tolerate the file level use strict pragma.
> It's about this warning:
> "Use the function form of 'use strict'."
> I use JSLint against modules I write for Node.js (modules according to CommonJS spec).
> Module is file that is handled in Node.js differently than file in browser.
> Each module is executed in it's own sandbox (as if it was anonymous function instantly executed).
> So what I meant is that in that case, when I put 'use strict' at begin of file, this warning doesn't make sense. Implications of using 'use strict' in global mode doesn't apply to this case, as it doesn't invoke strict mode in global mode.
> It would be good to have an option to turn off this warning and make it by default off for node mode, with current version of JSLint I cannot turn off this warning.
I think you would be smarter to use the function use strict pragma.
- << Previous post in topic Next post in topic >>