Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop
authorMark Banner <standard8@mozilla.com>
Thu, 08 Jun 2017 10:59:12 +0100
changeset 413543 27f5231ba905f39bc90ee3c56a375b40b7d02569
parent 413542 b63a5b39d75a772d36d3d57a1d8e9d19ea9dcf7d
child 413544 4ed96242e485a46349226ca9a473898e25b31f66
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1371292
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop MozReview-Commit-ID: 5KC23kzaCFN
browser/components/extensions/.eslintrc.js
browser/components/extensions/ext-bookmarks.js
browser/components/extensions/ext-browser.js
browser/components/extensions/ext-browserAction.js
browser/components/extensions/ext-c-devtools-panels.js
browser/components/extensions/ext-c-omnibox.js
browser/components/extensions/ext-commands.js
browser/components/extensions/ext-contextMenus.js
browser/components/extensions/ext-devtools-network.js
browser/components/extensions/ext-devtools-panels.js
browser/components/extensions/ext-devtools.js
browser/components/extensions/ext-geckoProfiler.js
browser/components/extensions/ext-history.js
browser/components/extensions/ext-omnibox.js
browser/components/extensions/ext-pageAction.js
browser/components/extensions/ext-sessions.js
browser/components/extensions/ext-sidebarAction.js
browser/components/extensions/ext-tabs.js
browser/components/extensions/ext-utils.js
browser/components/extensions/ext-windows.js
browser/components/extensions/test/xpcshell/.eslintrc.js
browser/components/migration/.eslintrc.js
browser/extensions/formautofill/.eslintrc.js
browser/extensions/formautofill/test/mochitest/formautofill_parent_utils.js
mobile/android/.eslintrc.js
toolkit/components/extensions/.eslintrc.js
toolkit/components/extensions/Extension.jsm
toolkit/components/extensions/ext-alarms.js
toolkit/components/extensions/ext-c-test.js
toolkit/components/extensions/ext-c-toolkit.js
toolkit/components/extensions/ext-contextualIdentities.js
toolkit/components/extensions/ext-cookies.js
toolkit/components/extensions/ext-downloads.js
toolkit/components/extensions/ext-idle.js
toolkit/components/extensions/ext-management.js
toolkit/components/extensions/ext-notifications.js
toolkit/components/extensions/ext-proxy.js
toolkit/components/extensions/ext-runtime.js
toolkit/components/extensions/ext-storage.js
toolkit/components/extensions/ext-toolkit.js
toolkit/components/extensions/ext-webNavigation.js
toolkit/components/extensions/ext-webRequest.js
toolkit/components/extensions/test/browser/.eslintrc.js
toolkit/components/extensions/test/mochitest/.eslintrc.js
toolkit/components/extensions/test/mochitest/file_ext_test_api_injection.js
toolkit/components/extensions/test/mochitest/file_teardown_test.js
toolkit/components/extensions/test/mochitest/test_chrome_ext_trustworthy_origin.html
toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html
toolkit/components/extensions/test/mochitest/test_ext_contentscript_cache.html
toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
toolkit/components/extensions/test/mochitest/test_ext_webrequest_suspend.html
toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js
toolkit/components/extensions/test/xpcshell/.eslintrc.js
toolkit/components/narrate/.eslintrc.js
toolkit/modules/addons/.eslintrc.js
toolkit/modules/addons/WebNavigationContent.js
toolkit/modules/addons/WebRequestContent.js
tools/lint/eslint/.eslintrc.js
tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
tools/lint/eslint/eslint-plugin-mozilla/package.json
--- a/browser/components/extensions/.eslintrc.js
+++ b/browser/components/extensions/.eslintrc.js
@@ -1,23 +1,5 @@
 "use strict";
 
 module.exports = {
   "extends": "../../../toolkit/components/extensions/.eslintrc.js",
-
-  "globals": {
-    "EventEmitter": true,
-    "IconDetails": true,
-    "Tab": true,
-    "TabContext": true,
-    "Window": true,
-    "WindowEventManager": true,
-    "browserActionFor": true,
-    "getCookieStoreIdForTab": true,
-    "getDevToolsTargetForContext": true,
-    "getTargetTabIdForToolbox": true,
-    "makeWidgetId": true,
-    "pageActionFor": true,
-    "sidebarActionFor": true,
-    "tabTracker": true,
-    "windowTracker": true,
-  },
 };
--- a/browser/components/extensions/ext-bookmarks.js
+++ b/browser/components/extensions/ext-bookmarks.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-browserAction.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
                                   "resource://gre/modules/PlacesUtils.jsm");
 
 let listenerCount = 0;
 
 function getTree(rootGuid, onlyChildren) {
   function convert(node, parent) {
     let treenode = {
--- a/browser/components/extensions/ext-browser.js
+++ b/browser/components/extensions/ext-browser.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyModuleGetter(global, "EventEmitter",
                                   "resource://gre/modules/EventEmitter.jsm");
 
 // This function is pretty tightly tied to Extension.jsm.
 // Its job is to fill in the |tab| property of the sender.
 function getSender(extension, target, sender) {
   let tabId;
   if ("tabId" in sender) {
--- a/browser/components/extensions/ext-browserAction.js
+++ b/browser/components/extensions/ext-browserAction.js
@@ -1,12 +1,18 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+/* exported browserActionFor, sidebarActionFor, pageActionFor */
+/* global browserActionFor:false, sidebarActionFor:false, pageActionFor:false */
+
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
                                   "resource:///modules/CustomizableUI.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "clearTimeout",
                                   "resource://gre/modules/Timer.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
                                   "resource://gre/modules/Timer.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ViewPopup",
                                   "resource:///modules/ExtensionPopups.jsm");
--- a/browser/components/extensions/ext-c-devtools-panels.js
+++ b/browser/components/extensions/ext-c-devtools-panels.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ../../../toolkit/components/extensions/ext-c-toolkit.js */
+
 Cu.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
                                   "resource://gre/modules/EventEmitter.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionChildDevToolsUtils",
                                   "resource://gre/modules/ExtensionChildDevToolsUtils.jsm");
 
 var {
--- a/browser/components/extensions/ext-c-omnibox.js
+++ b/browser/components/extensions/ext-c-omnibox.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ../../../toolkit/components/extensions/ext-c-toolkit.js */
+
 this.omnibox = class extends ExtensionAPI {
   getAPI(context) {
     return {
       omnibox: {
         onInputChanged: new SingletonEventManager(context, "omnibox.onInputChanged", fire => {
           let listener = (text, id) => {
             fire.asyncWithoutClone(text, suggestions => {
               context.childManager.callParentFunctionNoReturn("omnibox_internal.addSuggestions", [
--- a/browser/components/extensions/ext-commands.js
+++ b/browser/components/extensions/ext-commands.js
@@ -1,12 +1,16 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-browserAction.js */
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionParent",
                                   "resource://gre/modules/ExtensionParent.jsm");
 
 var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 this.commands = class extends ExtensionAPI {
   onManifestEntry(entryName) {
     let {extension} = this;
--- a/browser/components/extensions/ext-contextMenus.js
+++ b/browser/components/extensions/ext-contextMenus.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 Cu.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
                                   "resource://gre/modules/NetUtil.jsm");
 
 var {
   ExtensionError,
 } = ExtensionUtils;
--- a/browser/components/extensions/ext-devtools-network.js
+++ b/browser/components/extensions/ext-devtools-network.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-devtools.js */
+
 this.devtools_network = class extends ExtensionAPI {
   getAPI(context) {
     return {
       devtools: {
         network: {
           onNavigated: new SingletonEventManager(context, "devtools.onNavigated", fire => {
             let listener = (event, data) => {
               fire.async(data.url);
--- a/browser/components/extensions/ext-devtools-panels.js
+++ b/browser/components/extensions/ext-devtools-panels.js
@@ -1,12 +1,16 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-devtools.js */
+/* import-globals-from ext-utils.js */
+
 Cu.import("resource://gre/modules/ExtensionParent.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
                                   "resource:///modules/E10SUtils.jsm");
 
 var {
   IconDetails,
   watchExtensionProxyContextLoad,
--- a/browser/components/extensions/ext-devtools.js
+++ b/browser/components/extensions/ext-devtools.js
@@ -1,13 +1,17 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-/* global getTargetTabIdForToolbox */
+/* exported getDevToolsTargetForContext */
+/* global getTargetTabIdForToolbox, getDevToolsTargetForContext */
+
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
 
 /**
  * This module provides helpers used by the other specialized `ext-devtools-*.js` modules
  * and the implementation of the `devtools_page`.
  */
 
 XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
                                   "resource://devtools/client/framework/gDevTools.jsm");
--- a/browser/components/extensions/ext-geckoProfiler.js
+++ b/browser/components/extensions/ext-geckoProfiler.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ../../../toolkit/components/extensions/ext-toolkit.js */
+
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.importGlobalProperties(["fetch", "TextEncoder"]);
 
 XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ParseSymbols", "resource:///modules/ParseSymbols.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Subprocess", "resource://gre/modules/Subprocess.jsm");
 
 const PREF_ASYNC_STACK = "javascript.options.asyncstack";
--- a/browser/components/extensions/ext-history.js
+++ b/browser/components/extensions/ext-history.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-browserAction.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
                                   "resource://gre/modules/NetUtil.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
                                   "resource://gre/modules/PlacesUtils.jsm");
 
 var {
   normalizeTime,
 } = ExtensionUtils;
--- a/browser/components/extensions/ext-omnibox.js
+++ b/browser/components/extensions/ext-omnibox.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ../../../toolkit/components/extensions/ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSearchHandler",
                                   "resource://gre/modules/ExtensionSearchHandler.jsm");
 
 this.omnibox = class extends ExtensionAPI {
   onManifestEntry(entryName) {
     let {extension} = this;
     let {manifest} = extension;
 
--- a/browser/components/extensions/ext-pageAction.js
+++ b/browser/components/extensions/ext-pageAction.js
@@ -1,12 +1,16 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-browserAction.js */
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "PanelPopup",
                                   "resource:///modules/ExtensionPopups.jsm");
 
 
 var {
   DefaultWeakMap,
 } = ExtensionUtils;
 
--- a/browser/components/extensions/ext-sessions.js
+++ b/browser/components/extensions/ext-sessions.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 var {
   ExtensionError,
   promiseObserved,
 } = ExtensionUtils;
 
 XPCOMUtils.defineLazyModuleGetter(this, "SessionStore",
                                   "resource:///modules/sessionstore/SessionStore.jsm");
 
--- a/browser/components/extensions/ext-sidebarAction.js
+++ b/browser/components/extensions/ext-sidebarAction.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
                                   "resource:///modules/CustomizableUI.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
                                   "resource://gre/modules/Services.jsm");
 
 Cu.import("resource://gre/modules/ExtensionParent.jsm");
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
                                   "resource://gre/modules/PromiseUtils.jsm");
--- a/browser/components/extensions/ext-utils.js
+++ b/browser/components/extensions/ext-utils.js
@@ -1,12 +1,17 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+/* exported WindowEventManager, makeWidgetId */
+/* global EventEmitter:false, TabContext:false, WindowEventManager:false,
+          makeWidgetId:false, tabTracker:true, windowTracker:true */
+/* import-globals-from ../../../toolkit/components/extensions/ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 Cu.import("resource://gre/modules/ExtensionTabs.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "styleSheetService",
                                    "@mozilla.org/content/style-sheet-service;1",
                                    "nsIStyleSheetService");
--- a/browser/components/extensions/ext-windows.js
+++ b/browser/components/extensions/ext-windows.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-utils.js */
+
 XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
--- a/browser/components/extensions/test/xpcshell/.eslintrc.js
+++ b/browser/components/extensions/test/xpcshell/.eslintrc.js
@@ -1,9 +1,11 @@
 "use strict";
 
 module.exports = {
   "extends": "plugin:mozilla/xpcshell-test",
 
-  "globals": {
-    "browser": false,
-  },
+  "env": {
+    // The tests in this folder are testing based on WebExtensions, so lets
+    // just define the webextensions environment here.
+    "webextensions": true
+  }
 };
--- a/browser/components/migration/.eslintrc.js
+++ b/browser/components/migration/.eslintrc.js
@@ -1,15 +1,11 @@
 "use strict";
 
 module.exports = {
-  "globals": {
-    "Iterator": true
-  },
-
   "rules": {
     "block-scoped-var": "error",
     "comma-dangle": "off",
     "comma-style": ["error", "last"],
     "complexity": ["error", {"max": 21}],
     "dot-notation": "error",
     "indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first", "ObjectExpression": "first"}],
     "max-nested-callbacks": ["error", 3],
--- a/browser/extensions/formautofill/.eslintrc.js
+++ b/browser/extensions/formautofill/.eslintrc.js
@@ -1,19 +1,11 @@
 "use strict";
 
 module.exports = {
-  "globals": {
-    "addMessageListener": false,
-    "removeMessageListener": false,
-    "sendAsyncMessage": false,
-    "TextDecoder": false,
-    "TextEncoder": false,
-  },
-
   "rules": {
     // Rules from the mozilla plugin
     "mozilla/balanced-listeners": "error",
     "mozilla/no-aArgs": "error",
     "mozilla/no-cpows-in-tests": "error",
     "mozilla/var-only-at-top-level": "error",
 
     "valid-jsdoc": ["error", {
--- a/browser/extensions/formautofill/test/mochitest/formautofill_parent_utils.js
+++ b/browser/extensions/formautofill/test/mochitest/formautofill_parent_utils.js
@@ -1,10 +1,11 @@
 // assert is available to chrome scripts loaded via SpecialPowers.loadChromeScript.
 /* global assert */
+/* eslint-env mozilla/frame-script */
 
 "use strict";
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
 var ParentUtils = {
--- a/mobile/android/.eslintrc.js
+++ b/mobile/android/.eslintrc.js
@@ -27,18 +27,16 @@ module.exports = {
     "UserAgentOverrides": 0,
     "XPCOMUtils": false,
     "ctypes": false,
     "exports": false,
     "importScripts": false,
     "module": false,
     "require": false,
     "uuidgen": false,
-
-    "Iterator": false // TODO: Remove - deprecated!
   },
   rules: {
     // XXX Bug 1358949 - This should be reduced down - probably to 20 or to
     // be removed & synced with the mozilla/recommended value.
     "complexity": ["error", 31],
 
     // Rules enabled in mozilla/recommended, and disabled for now, we should
     // re-enable these over time.
--- a/toolkit/components/extensions/.eslintrc.js
+++ b/toolkit/components/extensions/.eslintrc.js
@@ -1,51 +1,26 @@
 "use strict";
 
 module.exports = {
 
   "globals": {
+    // These are defined in the WebExtension script scopes by ExtensionCommon.jsm
     "Cc": true,
     "Ci": true,
     "Cr": true,
     "Cu": true,
-    "StructuredCloneHolder": false,
-    "TextDecoder": false,
-    "TextEncoder": false,
-
-    "MatchGlob": false,
-    "MatchPattern": true,
-    "MatchPatternSet": false,
-    "WebExtensionContentScript": false,
-    "WebExtensionPolicy": false,
-
-    // Specific to WebExtensions:
     "AppConstants": true,
-    "Extension": true,
     "ExtensionAPI": true,
     "ExtensionCommon": true,
-    "ExtensionManagement": true,
     "ExtensionUtils": true,
     "extensions": true,
-    "getContainerForCookieStoreId": true,
-    "getCookieStoreIdForContainer": true,
     "global": true,
-    "isContainerCookieStoreId": true,
-    "isDefaultCookieStoreId": true,
-    "isPrivateCookieStoreId": true,
-    "isValidCookieStoreId": true,
-    "NetUtil": true,
-    "openOptionsPage": true,
     "require": false,
-    "runSafe": true,
-    "runSafeSync": true,
-    "runSafeSyncWithoutClone": true,
     "Services": true,
-    "SingletonEventManager": true,
-    "tabTracker": false,
     "XPCOMUtils": true,
   },
 
   "rules": {
     // Rules from the mozilla plugin
     "mozilla/balanced-listeners": "error",
     "mozilla/no-aArgs": "error",
     "mozilla/no-cpows-in-tests": "warn",
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = ["Extension", "ExtensionData"];
 
+/* exported Extension, ExtensionData */
 /* globals Extension ExtensionData */
 
 /*
  * This file is the main entry point for extensions. When an extension
  * loads, its bootstrap.js file creates a Extension instance
  * and calls .startup() on it. It calls .shutdown() when the extension
  * unloads. Extension manages any extension-specific state in
  * the chrome process.
--- a/toolkit/components/extensions/ext-alarms.js
+++ b/toolkit/components/extensions/ext-alarms.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 // WeakMap[Extension -> Map[name -> Alarm]]
 let alarmsMap = new WeakMap();
 
 // WeakMap[Extension -> Set[callback]]
 let alarmCallbacksMap = new WeakMap();
 
 // Manages an alarm created by the extension (alarms API).
 function Alarm(extension, name, alarmInfo) {
--- a/toolkit/components/extensions/ext-c-test.js
+++ b/toolkit/components/extensions/ext-c-test.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-c-* files are imported into the same scopes.
+/* import-globals-from ext-c-toolkit.js */
+
 /**
  * Checks whether the given error matches the given expectations.
  *
  * @param {*} error
  *        The error to check.
  * @param {string|RegExp|function|null} expectedError
  *        The expectation to check against. If this parameter is:
  *
--- a/toolkit/components/extensions/ext-c-toolkit.js
+++ b/toolkit/components/extensions/ext-c-toolkit.js
@@ -1,12 +1,17 @@
 "use strict";
 
 Cu.import("resource://gre/modules/ExtensionCommon.jsm");
 
+// These are defined on "global" which is used for the same scopes as the other
+// ext-c-*.js files.
+/* exported SingletonEventManager */
+/* global SingletonEventManager: false */
+
 global.SingletonEventManager = ExtensionCommon.SingletonEventManager;
 
 global.initializeBackgroundPage = (contentWindow) => {
   // Override the `alert()` method inside background windows;
   // we alias it to console.log().
   // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1203394
   let alertDisplayedWarning = false;
   let alertOverwrite = text => {
--- a/toolkit/components/extensions/ext-contextualIdentities.js
+++ b/toolkit/components/extensions/ext-contextualIdentities.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
                                   "resource://gre/modules/ContextualIdentityService.jsm");
 XPCOMUtils.defineLazyPreferenceGetter(this, "containersEnabled",
                                       "privacy.userContext.enabled");
 
 function convert(identity) {
   let result = {
     name: ContextualIdentityService.getUserContextLabel(identity.userContextId),
--- a/toolkit/components/extensions/ext-cookies.js
+++ b/toolkit/components/extensions/ext-cookies.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
                                   "resource://gre/modules/ContextualIdentityService.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
                                   "resource://gre/modules/NetUtil.jsm");
 
 /* globals DEFAULT_STORE, PRIVATE_STORE */
 
 function convert({cookie, isPrivate}) {
--- a/toolkit/components/extensions/ext-downloads.js
+++ b/toolkit/components/extensions/ext-downloads.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
                                   "resource://gre/modules/Downloads.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
                                   "resource://gre/modules/DownloadPaths.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "OS",
                                   "resource://gre/modules/osfile.jsm");
--- a/toolkit/components/extensions/ext-idle.js
+++ b/toolkit/components/extensions/ext-idle.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
                                   "resource://gre/modules/EventEmitter.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "idleService",
                                    "@mozilla.org/widget/idleservice;1",
                                    "nsIIdleService");
 
 // WeakMap[Extension -> Object]
 let observersMap = new WeakMap();
--- a/toolkit/components/extensions/ext-management.js
+++ b/toolkit/components/extensions/ext-management.js
@@ -1,12 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyGetter(this, "strBundle", function() {
   const stringSvc = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
   return stringSvc.createBundle("chrome://global/locale/extensions.properties");
 });
 XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
                                   "resource://gre/modules/AddonManager.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "promptService",
                                    "@mozilla.org/embedcomp/prompt-service;1",
--- a/toolkit/components/extensions/ext-notifications.js
+++ b/toolkit/components/extensions/ext-notifications.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
                                   "resource://gre/modules/EventEmitter.jsm");
 
 var {
   ignoreEvent,
 } = ExtensionCommon;
 
 // WeakMap[Extension -> Map[id -> Notification]]
--- a/toolkit/components/extensions/ext-proxy.js
+++ b/toolkit/components/extensions/ext-proxy.js
@@ -1,15 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 "use strict";
 
 XPCOMUtils.defineLazyModuleGetter(this, "ProxyScriptContext",
                                   "resource://gre/modules/ProxyScriptContext.jsm");
 
 // WeakMap[Extension -> ProxyScriptContext]
 let proxyScriptContextMap = new WeakMap();
 
--- a/toolkit/components/extensions/ext-runtime.js
+++ b/toolkit/components/extensions/ext-runtime.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
                                   "resource://gre/modules/AddonManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AddonManagerPrivate",
                                   "resource://gre/modules/AddonManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Extension",
                                   "resource://gre/modules/Extension.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionParent",
                                   "resource://gre/modules/ExtensionParent.jsm");
@@ -105,16 +108,19 @@ this.runtime = class extends ExtensionAP
           return Promise.resolve(ExtensionParent.PlatformInfo);
         },
 
         openOptionsPage: function() {
           if (!extension.manifest.options_ui) {
             return Promise.reject({message: "No `options_ui` declared"});
           }
 
+          // This expects openOptionsPage to be defined in the file using this,
+          // e.g. the browser/ version of ext-runtime.js
+          /* global openOptionsPage:false */
           return openOptionsPage(extension).then(() => {});
         },
 
         setUninstallURL: function(url) {
           if (url.length == 0) {
             return Promise.resolve();
           }
 
--- a/toolkit/components/extensions/ext-storage.js
+++ b/toolkit/components/extensions/ext-storage.js
@@ -1,10 +1,13 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionStorage",
                                   "resource://gre/modules/ExtensionStorage.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "extensionStorageSync",
                                   "resource://gre/modules/ExtensionStorageSync.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AddonManagerPrivate",
                                   "resource://gre/modules/AddonManager.jsm");
 
 var {
--- a/toolkit/components/extensions/ext-toolkit.js
+++ b/toolkit/components/extensions/ext-toolkit.js
@@ -1,10 +1,22 @@
 "use strict";
 
+// These are defined on "global" which is used for the same scopes as the other
+// ext-*.js files.
+/* exported getCookieStoreIdForTab, getCookieStoreIdForContainer,
+            getContainerForCookieStoreId,
+            isValidCookieStoreId, isContainerCookieStoreId,
+            SingletonEventManager */
+/* global getCookieStoreIdForTab:false, getCookieStoreIdForContainer:false,
+          getContainerForCookieStoreId: false,
+          isValidCookieStoreId:false, isContainerCookieStoreId:false,
+          isDefaultCookieStoreId: false, isPrivateCookieStoreId:false,
+          SingletonEventManager: false */
+
 XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
                                   "resource://gre/modules/ContextualIdentityService.jsm");
 
 Cu.import("resource://gre/modules/ExtensionCommon.jsm");
 
 global.SingletonEventManager = ExtensionCommon.SingletonEventManager;
 
 /* globals DEFAULT_STORE, PRIVATE_STORE, CONTAINER_STORE */
--- a/toolkit/components/extensions/ext-webNavigation.js
+++ b/toolkit/components/extensions/ext-webNavigation.js
@@ -1,10 +1,17 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
+// This file expectes tabTracker to be defined in the global scope (e.g.
+// by ext-utils.js).
+/* global tabTracker */
+
 XPCOMUtils.defineLazyModuleGetter(this, "MatchURLFilters",
                                   "resource://gre/modules/MatchPattern.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "WebNavigation",
                                   "resource://gre/modules/WebNavigation.jsm");
 
 const defaultTransitionTypes = {
   topFrame: "link",
   subFrame: "auto_subframe",
--- a/toolkit/components/extensions/ext-webRequest.js
+++ b/toolkit/components/extensions/ext-webRequest.js
@@ -1,10 +1,17 @@
 "use strict";
 
+// The ext-* files are imported into the same scopes.
+/* import-globals-from ext-toolkit.js */
+
+// This file expectes tabTracker to be defined in the global scope (e.g.
+// by ext-utils.js).
+/* global tabTracker */
+
 XPCOMUtils.defineLazyModuleGetter(this, "WebRequest",
                                   "resource://gre/modules/WebRequest.jsm");
 
 // EventManager-like class specifically for WebRequest. Inherits from
 // SingletonEventManager. Takes care of converting |details| parameter
 // when invoking listeners.
 function WebRequestEventManager(context, eventName) {
   let name = `webRequest.${eventName}`;
--- a/toolkit/components/extensions/test/browser/.eslintrc.js
+++ b/toolkit/components/extensions/test/browser/.eslintrc.js
@@ -1,19 +1,13 @@
 "use strict";
 
 module.exports = {
-  "extends": "plugin:mozilla/mochitest-test",
+  "extends": "plugin:mozilla/browser-test",
 
   "env": {
     "webextensions": true,
   },
 
-  "globals": {
-    "BrowserTestUtils": true,
-    "ExtensionTestUtils": false,
-    "XPCOMUtils": true,
-  },
-
   "rules": {
     "no-shadow": "off",
   },
 };
--- a/toolkit/components/extensions/test/mochitest/.eslintrc.js
+++ b/toolkit/components/extensions/test/mochitest/.eslintrc.js
@@ -1,35 +1,14 @@
 "use strict";
 
-module.exports = { // eslint-disable-line no-undef
+module.exports = {
   "extends": "plugin:mozilla/mochitest-test",
 
   "env": {
     "browser": true,
     "webextensions": true,
   },
 
-  "globals": {
-    "onmessage": true,
-    "sendAsyncMessage": false,
-
-    "waitForLoad": true,
-    "promiseConsoleOutput": true,
-
-    "ExtensionTestUtils": false,
-    "NetUtil": true,
-    "webrequest_test": false,
-    "XPCOMUtils": true,
-
-    // head_webrequest.js symbols
-    "addStylesheet": true,
-    "addLink": true,
-    "addImage": true,
-    "addScript": true,
-    "addFrame": true,
-    "makeExtension": false,
-  },
-
   "rules": {
     "no-shadow": 0,
   },
 };
--- a/toolkit/components/extensions/test/mochitest/file_ext_test_api_injection.js
+++ b/toolkit/components/extensions/test/mochitest/file_ext_test_api_injection.js
@@ -1,10 +1,12 @@
 "use strict";
 
+/* eslint-env mozilla/frame-script */
+
 var {interfaces: Ci} = Components;
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 Services.console.registerListener(function listener(message) {
   if (/WebExt Privilege Escalation/.test(message.message)) {
     Services.console.unregisterListener(listener);
     sendAsyncMessage("console-message", {message: message.message});
--- a/toolkit/components/extensions/test/mochitest/file_teardown_test.js
+++ b/toolkit/components/extensions/test/mochitest/file_teardown_test.js
@@ -1,11 +1,12 @@
 "use strict";
 
-/* globals addMessageListener */
+/* eslint-env mozilla/frame-script */
+
 let {Management} = Components.utils.import("resource://gre/modules/Extension.jsm", {});
 let events = [];
 function record(type, extensionContext) {
   let eventType = type == "proxy-context-load" ? "load" : "unload";
   let url = extensionContext.uri.spec;
   let extensionId = extensionContext.extension.id;
   events.push({eventType, url, extensionId});
 }
--- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_trustworthy_origin.html
+++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_trustworthy_origin.html
@@ -9,16 +9,18 @@
   <script type="text/javascript" src="head.js"></script>
   <link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body>
 
 <script type="text/javascript">
 "use strict";
 
+/* import-globals-from chrome_head.js */
+
 /**
  * This test is asserting that moz-extension: URLs are recognized as trustworthy local origins
  */
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gContentSecurityManager",
                                    "@mozilla.org/contentsecuritymanager;1",
--- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html
+++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html
@@ -9,16 +9,17 @@
   <script type="text/javascript" src="head.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body>
 
 <script type="text/javascript">
 "use strict";
 
+/* global webrequest_test */
 Cu.import(SimpleTest.getTestFileURL("webrequest_test.jsm"));
 let {testFetch, testXHR} = webrequest_test;
 
 // Here we test that any requests originating from a system principal are not
 // accessible through WebRequest.  text_ext_webrequest_background_events tests
 // non-system principal requests.
 
 let testExtension = {
--- a/toolkit/components/extensions/test/mochitest/test_ext_contentscript_cache.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_contentscript_cache.html
@@ -8,16 +8,19 @@
   <script type="text/javascript" src="head.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 
 <script type="text/javascript">
 "use strict";
 
+// This file defines content scripts.
+/* eslint-env mozilla/frame-script */
+
 add_task(async function test_contentscript_cache() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       content_scripts: [{
         "matches": ["http://example.com/"],
         "js": ["content_script.js"],
         "run_at": "document_start",
       }],
--- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
@@ -7,16 +7,19 @@
   <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
   <script type="text/javascript" src="head_webrequest.js"></script>
   <script type="text/javascript" src="head.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 <script>
 "use strict";
 
+// This file defines content scripts.
+/* eslint-env mozilla/frame-script */
+
 let baseUrl = "http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/authenticate.sjs";
 function testXHR(url) {
   return new Promise((resolve, reject) => {
     let xhr = new XMLHttpRequest();
     xhr.open("GET", url);
     xhr.onload = resolve;
     xhr.onabort = reject;
     xhr.onerror = reject;
--- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_suspend.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_suspend.html
@@ -8,16 +8,19 @@
   <script type="text/javascript" src="head.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 
 <script type="text/javascript">
 "use strict";
 
+// This file defines content scripts.
+/* eslint-env mozilla/frame-script */
+
 add_task(async function test_suspend() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       permissions: [
         "webRequest",
         "webRequestBlocking",
         "http://mochi.test/",
       ],
--- a/toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js
+++ b/toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js
@@ -1,8 +1,9 @@
 "use strict";
 
+/* eslint-env worker */
+
 onmessage = function(event) {
   fetch("https://example.com/example.txt").then(() => {
     postMessage("Done!");
   });
 };
-
--- a/toolkit/components/extensions/test/xpcshell/.eslintrc.js
+++ b/toolkit/components/extensions/test/xpcshell/.eslintrc.js
@@ -1,13 +1,11 @@
 "use strict";
 
 module.exports = {
   "extends": "plugin:mozilla/xpcshell-test",
 
-  "globals": {
-    "browser": false,
-  },
-
   "env": {
-    "browser": true,
+    // The tests in this folder are testing based on WebExtensions, so lets
+    // just define the webextensions environment here.
+    "webextensions": true
   }
 };
--- a/toolkit/components/narrate/.eslintrc.js
+++ b/toolkit/components/narrate/.eslintrc.js
@@ -1,15 +1,11 @@
 "use strict";
 
 module.exports = {
-  "globals": {
-    "Iterator": true
-  },
-
   "rules": {
     "mozilla/no-aArgs": "warn",
     "mozilla/reject-importGlobalProperties": "warn",
     "mozilla/var-only-at-top-level": "warn",
     "block-scoped-var": "error",
     "camelcase": "warn",
     "comma-dangle": "off",
     "comma-style": ["warn", "last"],
--- a/toolkit/modules/addons/.eslintrc.js
+++ b/toolkit/modules/addons/.eslintrc.js
@@ -1,15 +1,5 @@
 "use strict";
 
 module.exports = {
   "extends": "../../components/extensions/.eslintrc.js",
-
-  "globals": {
-    "addEventListener": false,
-    "addMessageListener": false,
-    "removeEventListener": false,
-    "sendAsyncMessage": false,
-    "AddonManagerPermissions": false,
-
-    "initialProcessData": true,
-  },
 };
--- a/toolkit/modules/addons/WebNavigationContent.js
+++ b/toolkit/modules/addons/WebNavigationContent.js
@@ -1,11 +1,11 @@
 "use strict";
 
-/* globals docShell */
+/* eslint-env mozilla/frame-script */
 
 var Ci = Components.interfaces;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "WebNavigationFrames",
                                   "resource://gre/modules/WebNavigationFrames.jsm");
--- a/toolkit/modules/addons/WebRequestContent.js
+++ b/toolkit/modules/addons/WebRequestContent.js
@@ -1,12 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+// Managed via the message managers.
+/* global initialProcessData */
+
 "use strict";
 
 var Ci = Components.interfaces;
 var Cc = Components.classes;
 var Cu = Components.utils;
 var Cr = Components.results;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
--- a/tools/lint/eslint/.eslintrc.js
+++ b/tools/lint/eslint/.eslintrc.js
@@ -27,20 +27,9 @@ module.exports = {
     "no-shadow": "error",
     "no-undef-init": "error",
     "object-curly-spacing": "off",
     "one-var": ["error", "never"],
     "operator-linebreak": ["error", "after"],
     "semi": ["error", "always"],
     "strict": ["error", "global"],
   },
-
-  // Globals accessible within node modules.
-  "globals": {
-    "DTRACE_HTTP_CLIENT_REQUEST": true,
-    "DTRACE_HTTP_CLIENT_RESPONSE": true,
-    "DTRACE_HTTP_SERVER_REQUEST": true,
-    "DTRACE_HTTP_SERVER_RESPONSE": true,
-    "DTRACE_NET_SERVER_CONNECTION": true,
-    "DTRACE_NET_STREAM_END": true,
-    "Intl": true,
-  },
 };
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -2,16 +2,17 @@
 
 module.exports = {
   "env": {
     "browser": true,
     "es6": true
   },
 
   "globals": {
+    "AddonManagerPermissions": false,
     "BroadcastChannel": false,
     "BrowserFeedWriter": false,
     "CSSPrimitiveValue": false,
     "CSSValueList": false,
     "CheckerboardReportService": false,
     // Specific to Firefox (Chrome code only).
     "ChromeUtils": false,
     "ChromeWindow": false,
@@ -24,25 +25,31 @@ module.exports = {
     "IDBMutableFile": false,
     "ImageDocument": false,
     "InstallTrigger": false,
     // Specific to Firefox
     // eslint-disable-next-line max-len
     // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/InternalError
     "InternalError": true,
     "KeyEvent": false,
+    "MatchGlob": false,
+    "MatchPattern": false,
+    "MatchPatternSet": false,
     "MenuBoxObject": false,
     // Specific to Firefox (Chrome code only).
     "MozSelfSupport": false,
     "SharedArrayBuffer": false,
     "SimpleGestureEvent": false,
     // Note: StopIteration will likely be removed as part of removing legacy
     // generators, see bug 968038.
     "StopIteration": false,
+    "StructuredCloneHolder": false,
     "WebAssembly": false,
+    "WebExtensionContentScript": false,
+    "WebExtensionPolicy": false,
     "WebrtcGlobalInformation": false,
     // Non-standard, specific to Firefox.
     "XULElement": false,
     "dump": true,
     "openDialog": false,
     "sizeToContent": false,
     // Specific to Firefox
     // eslint-disable-next-line max-len
--- a/tools/lint/eslint/eslint-plugin-mozilla/package.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "0.3.2",
+  "version": "0.3.3",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],