Please sign in to comment.
[[FIX]] Do not require global USD for any envs
In web browsers, enabling ES5 "strict mode" at a global level effects all scripts executed in the same context. For this reason, the `strict` option was originally implemented to enforce the directive's use in function scope only. However: the Browserify, Node.js, and PhantomJS environments do not suffer from this problem. Recent improvements to the option's behavior included making JSHint's interpretation of `strict: true` to be contextual: in those environments where a global `use strict` directive is "safe," enabling the option would require the global directive. Although this change is an improvement (because it encourages more code to be written in strict mode), it is backwards incompatible. Moreover, the option's documentation in JSHint 2.8.0 explicitly described the sub-optimal behavior: > *Note:* This option enables strict mode for function scope only. It > *prohibits* the global scoped strict mode because it might break > third-party widgets on your page. If you really want to use global > strict mode, see the *globalstrict* option. For this reason, `strict: true` should continue to trigger the "legacy" behavior. The change brings that configuration completely in-line with the recently-introduced `strict: func`, and because `strict: func` has not been released in a stable version, it can safely be removed.
- Loading branch information...
Showing with 42 additions and 28 deletions.