diff --git a/.eslintrc.js b/.eslintrc.js index 74b87ab13a..b10d30525c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,8 @@ const { esNextPaths, } = require('./scripts/shared/pathsByLanguageVersion'); +const restrictedGlobals = require('confusing-browser-globals'); + const OFF = 0; const ERROR = 2; @@ -45,6 +47,7 @@ module.exports = { 'no-bitwise': OFF, 'no-inner-declarations': [ERROR, 'functions'], 'no-multi-spaces': ERROR, + 'no-restricted-globals': [ERROR].concat(restrictedGlobals), 'no-restricted-syntax': [ERROR, 'WithStatement'], 'no-shadow': ERROR, 'no-unused-expressions': ERROR, diff --git a/package.json b/package.json index 89d8426a8e..07ebb1cc54 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "chalk": "^3.0.0", "cli-table": "^0.3.1", "coffee-script": "^1.12.7", + "confusing-browser-globals": "^1.0.9", "core-js": "^3.6.4", "coveralls": "^3.0.9", "create-react-class": "^15.6.3", diff --git a/yarn.lock b/yarn.lock index 1456c34cc4..f9466e1a36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3871,6 +3871,11 @@ configstore@^4.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" +confusing-browser-globals@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" + integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== + connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"