Skip to content

Commit

Permalink
Add compiler warning for dangerous use of this (ampproject#5244)
Browse files Browse the repository at this point in the history
* add checkGlobalThisLevel(warn) to compiler opts

* malte's pr comment
  • Loading branch information
William Chou authored and Vanessa Pasque committed Dec 22, 2016
1 parent 2080430 commit 15cefb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build-system/tasks/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,11 @@ function compile(entryModuleFilenames, outputDir,
// it won't do strict type checking if its whitespace only.
compilerOptions.compilerFlags.define.push('TYPECHECK_ONLY=true');
compilerOptions.compilerFlags.jscomp_error.push(
'checkTypes', 'accessControls', 'const', 'constantProperty');
'checkTypes',
'accessControls',
'const',
'constantProperty',
'globalThis');

// TODO(aghassemi): Remove when NTI is the default.
if (argv.nti) {
Expand Down

0 comments on commit 15cefb7

Please sign in to comment.