Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add option to disable the global this warning #227

Open
wants to merge 1 commit into from

2 participants

@lookfirst

kind of hacky, but yea... here you go....

@jrburke
Owner

Can you provide a link to the behavior this enables/disables? I am unfamiliar with the Closure Compiler deeper options.

Maybe it makes sense to group some of these under a "DiagnosticGroups" object under the config, if there are more like these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 13, 2012
  1. @lookfirst
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 build/jslib/rhino/optimize.js
View
4 build/jslib/rhino/optimize.js
@@ -78,6 +78,10 @@ define(['logger'], function (logger) {
}
options.prettyPrint = keepLines || options.prettyPrint;
+ if (config.disableGlobalThisWarning) {
+ options.setWarningLevel(jscomp.DiagnosticGroups.GLOBAL_THIS, jscomp.CheckLevel.OFF);
+ }
+
FLAG_compilation_level = jscomp.CompilationLevel[config.CompilationLevel || 'SIMPLE_OPTIMIZATIONS'];
FLAG_compilation_level.setOptionsForCompilationLevel(options);
Something went wrong with that request. Please try again.