diff --git a/.eslintignore b/.eslintignore index 00c15aacdd21..38a3ebdda2df 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,3 @@ -# Allow linting of .eslintrc.js files. -!**/.eslintrc.js - # Always ignore node_modules. **/node_modules/**/*.* diff --git a/browser/base/content/aboutNetError.xhtml b/browser/base/content/aboutNetError.xhtml index 8cf7e926eaf9..2fd1e7c6396e 100644 --- a/browser/base/content/aboutNetError.xhtml +++ b/browser/base/content/aboutNetError.xhtml @@ -101,7 +101,7 @@ } function toggleDisplay(node) { - toggle = { + const toggle = { "": "block", "none": "block", "block": "none" diff --git a/browser/base/content/abouthome/aboutHome.js b/browser/base/content/abouthome/aboutHome.js index 5afe9b97b856..50f3e01cd070 100644 --- a/browser/base/content/abouthome/aboutHome.js +++ b/browser/base/content/abouthome/aboutHome.js @@ -4,6 +4,8 @@ "use strict"; +/* import-globals-from ../contentSearchUI.js */ + // The process of adding a new default snippet involves: // * add a new entity to aboutHome.dtd // * add a for it in aboutHome.xhtml diff --git a/browser/components/contextualidentity/test/browser/.eslintrc.js b/browser/components/contextualidentity/test/browser/.eslintrc.js index 7c80211924ef..c6c715ae3ccf 100644 --- a/browser/components/contextualidentity/test/browser/.eslintrc.js +++ b/browser/components/contextualidentity/test/browser/.eslintrc.js @@ -3,5 +3,9 @@ module.exports = { "extends": [ "../../../../../testing/mochitest/browser.eslintrc.js" - ] + ], + + "rules": { + "no-undef": 2 + } }; diff --git a/browser/components/contextualidentity/test/browser/browser_windowName.js b/browser/components/contextualidentity/test/browser/browser_windowName.js index 1bc1ed069d56..555c421cecde 100644 --- a/browser/components/contextualidentity/test/browser/browser_windowName.js +++ b/browser/components/contextualidentity/test/browser/browser_windowName.js @@ -40,7 +40,7 @@ add_task(function* test() { // Let's try to open a window from tab1 with a name 'tab-2'. info("Opening a window from the first tab..."); - yield ContentTask.spawn(browser1, { url: BASE_URI + '?new' }, function(opts) { + yield ContentTask.spawn(browser1, { url: BASE_URI + '?new' }, function* (opts) { yield (new content.window.wrappedJSObject.Promise(resolve => { let w = content.window.wrappedJSObject.open(opts.url, 'tab-2'); w.onload = function() { resolve(); } diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index 5c9fbbc68bdc..56a993a64c70 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -1259,8 +1259,9 @@ if (AppConstants.E10S_TESTING_ONLY) { id: "e10s-button", defaultArea: CustomizableUI.AREA_PANEL, onBuild: function(aDocument) { - node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label")); - node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext")); + let node = aDocument.createElementNS(kNSXUL, "toolbarbutton"); + node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label")); + node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext")); }, onCommand: function(aEvent) { let win = aEvent.view; diff --git a/browser/components/customizableui/test/browser_988072_sidebar_events.js b/browser/components/customizableui/test/browser_988072_sidebar_events.js index 1aef291ed13f..6791be67a679 100644 --- a/browser/components/customizableui/test/browser_988072_sidebar_events.js +++ b/browser/components/customizableui/test/browser_988072_sidebar_events.js @@ -137,7 +137,7 @@ function add_sidebar_task(description, setup, teardown) { add_sidebar_task( "Check that a sidebar that uses a command event listener works", function*() { - gTestSidebarItem.addEventListener("command", sawEvent); + gTestSidebarItem.addEventListener("command", window.sawEvent); }, function*() { checkExpectedEvents({ command: 1 }); }); @@ -145,7 +145,7 @@ function*() { add_sidebar_task( "Check that a sidebar that uses a click event listener works", function*() { - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ click: 1 }); }); @@ -153,8 +153,8 @@ function*() { add_sidebar_task( "Check that a sidebar that uses both click and command event listeners works", function*() { - gTestSidebarItem.addEventListener("command", sawEvent); - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.addEventListener("command", window.sawEvent); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ command: 1, click: 1 }); }); @@ -162,7 +162,7 @@ function*() { add_sidebar_task( "Check that a sidebar that uses an oncommand attribute works", function*() { - gTestSidebarItem.setAttribute("oncommand", "sawEvent(event, true)"); + gTestSidebarItem.setAttribute("oncommand", "window.sawEvent(event, true)"); }, function*() { checkExpectedEvents({ oncommand: 1 }); }); @@ -170,7 +170,7 @@ function*() { add_sidebar_task( "Check that a sidebar that uses an onclick attribute works", function*() { - gTestSidebarItem.setAttribute("onclick", "sawEvent(event, true)"); + gTestSidebarItem.setAttribute("onclick", "window.sawEvent(event, true)"); }, function*() { checkExpectedEvents({ onclick: 1 }); }); @@ -178,8 +178,8 @@ function*() { add_sidebar_task( "Check that a sidebar that uses both onclick and oncommand attributes works", function*() { - gTestSidebarItem.setAttribute("onclick", "sawEvent(event, true)"); - gTestSidebarItem.setAttribute("oncommand", "sawEvent(event, true)"); + gTestSidebarItem.setAttribute("onclick", "window.sawEvent(event, true)"); + gTestSidebarItem.setAttribute("oncommand", "window.sawEvent(event, true)"); }, function*() { checkExpectedEvents({ onclick: 1, oncommand: 1 }); }); @@ -187,8 +187,8 @@ function*() { add_sidebar_task( "Check that a sidebar that uses an onclick attribute and a command listener works", function*() { - gTestSidebarItem.setAttribute("onclick", "sawEvent(event, true)"); - gTestSidebarItem.addEventListener("command", sawEvent); + gTestSidebarItem.setAttribute("onclick", "window.sawEvent(event, true)"); + gTestSidebarItem.addEventListener("command", window.sawEvent); }, function*() { checkExpectedEvents({ onclick: 1, command: 1 }); }); @@ -196,8 +196,8 @@ function*() { add_sidebar_task( "Check that a sidebar that uses an oncommand attribute and a click listener works", function*() { - gTestSidebarItem.setAttribute("oncommand", "sawEvent(event, true)"); - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.setAttribute("oncommand", "window.sawEvent(event, true)"); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ click: 1, oncommand: 1 }); }); @@ -205,8 +205,8 @@ function*() { add_sidebar_task( "A sidebar with both onclick attribute and click listener sees only one event :(", function*() { - gTestSidebarItem.setAttribute("onclick", "sawEvent(event, true)"); - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.setAttribute("onclick", "window.sawEvent(event, true)"); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ onclick: 1 }); }); @@ -214,8 +214,8 @@ function*() { add_sidebar_task( "A sidebar with both oncommand attribute and command listener sees only one event :(", function*() { - gTestSidebarItem.setAttribute("oncommand", "sawEvent(event, true)"); - gTestSidebarItem.addEventListener("command", sawEvent); + gTestSidebarItem.setAttribute("oncommand", "window.sawEvent(event, true)"); + gTestSidebarItem.addEventListener("command", window.sawEvent); }, function*() { checkExpectedEvents({ oncommand: 1 }); }); @@ -225,7 +225,7 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("oncommand", "sawEvent(event, true)"); + broadcaster.setAttribute("oncommand", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); @@ -240,7 +240,7 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("onclick", "sawEvent(event, true)"); + broadcaster.setAttribute("onclick", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); @@ -255,8 +255,8 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("onclick", "sawEvent(event, true)"); - broadcaster.setAttribute("oncommand", "sawEvent(event, true)"); + broadcaster.setAttribute("onclick", "window.sawEvent(event, true)"); + broadcaster.setAttribute("oncommand", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); @@ -271,12 +271,12 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("oncommand", "sawEvent(event, true)"); + broadcaster.setAttribute("oncommand", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); gTestSidebarItem.setAttribute("observes", "testbroadcaster"); - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ click: 1, oncommand: 1 }); document.getElementById("testbroadcaster").remove(); @@ -287,12 +287,12 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("onclick", "sawEvent(event, true)"); + broadcaster.setAttribute("onclick", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); gTestSidebarItem.setAttribute("observes", "testbroadcaster"); - gTestSidebarItem.addEventListener("command", sawEvent); + gTestSidebarItem.addEventListener("command", window.sawEvent); }, function*() { checkExpectedEvents({ onclick: 1, command: 1 }); document.getElementById("testbroadcaster").remove(); @@ -304,12 +304,12 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("onclick", "sawEvent(event, true)"); + broadcaster.setAttribute("onclick", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); gTestSidebarItem.setAttribute("observes", "testbroadcaster"); - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ onclick: 1 }); document.getElementById("testbroadcaster").remove(); @@ -321,12 +321,12 @@ add_sidebar_task( function*() { let broadcaster = document.createElement("broadcaster"); broadcaster.setAttribute("id", "testbroadcaster"); - broadcaster.setAttribute("oncommand", "sawEvent(event, true)"); + broadcaster.setAttribute("oncommand", "window.sawEvent(event, true)"); broadcaster.setAttribute("label", "Test Sidebar"); document.getElementById("mainBroadcasterSet").appendChild(broadcaster); gTestSidebarItem.setAttribute("observes", "testbroadcaster"); - gTestSidebarItem.addEventListener("command", sawEvent); + gTestSidebarItem.addEventListener("command", window.sawEvent); }, function*() { checkExpectedEvents({ oncommand: 1 }); document.getElementById("testbroadcaster").remove(); @@ -338,7 +338,7 @@ function*() { let command = document.createElement("command"); command.setAttribute("id", "testcommand"); document.getElementById("mainCommandSet").appendChild(command); - command.addEventListener("command", sawEvent); + command.addEventListener("command", window.sawEvent); gTestSidebarItem.setAttribute("command", "testcommand"); }, function*() { @@ -351,7 +351,7 @@ add_sidebar_task( function*() { let command = document.createElement("command"); command.setAttribute("id", "testcommand"); - command.setAttribute("oncommand", "sawEvent(event, true)"); + command.setAttribute("oncommand", "window.sawEvent(event, true)"); document.getElementById("mainCommandSet").appendChild(command); gTestSidebarItem.setAttribute("command", "testcommand"); @@ -365,9 +365,9 @@ add_sidebar_task("Check that a sidebar that uses a command element with a " + function*() { let command = document.createElement("command"); command.setAttribute("id", "testcommand"); - command.setAttribute("oncommand", "sawEvent(event, true)"); + command.setAttribute("oncommand", "window.sawEvent(event, true)"); document.getElementById("mainCommandSet").appendChild(command); - command.addEventListener("command", sawEvent); + command.addEventListener("command", window.sawEvent); gTestSidebarItem.setAttribute("command", "testcommand"); }, function*() { @@ -380,12 +380,12 @@ add_sidebar_task( function*() { let command = document.createElement("command"); command.setAttribute("id", "testcommand"); - command.setAttribute("oncommand", "sawEvent(event, true)"); + command.setAttribute("oncommand", "window.sawEvent(event, true)"); document.getElementById("mainCommandSet").appendChild(command); - command.addEventListener("command", sawEvent); + command.addEventListener("command", window.sawEvent); gTestSidebarItem.setAttribute("command", "testcommand"); - gTestSidebarItem.addEventListener("click", sawEvent); + gTestSidebarItem.addEventListener("click", window.sawEvent); }, function*() { checkExpectedEvents({ click: 1, command: 1, oncommand: 1 }); document.getElementById("testcommand").remove(); diff --git a/browser/components/originattributes/test/browser/file_sharedworker.js b/browser/components/originattributes/test/browser/file_sharedworker.js index e5f0b35946d1..82f075a37899 100644 --- a/browser/components/originattributes/test/browser/file_sharedworker.js +++ b/browser/components/originattributes/test/browser/file_sharedworker.js @@ -1,5 +1,7 @@ self.randomValue = Math.random(); +/* global onconnect:true */ + onconnect = function (e) { let port = e.ports[0]; port.postMessage(self.randomValue); diff --git a/browser/components/preferences/applicationManager.js b/browser/components/preferences/applicationManager.js index adbcc3977496..2e0f47a692b6 100644 --- a/browser/components/preferences/applicationManager.js +++ b/browser/components/preferences/applicationManager.js @@ -2,6 +2,8 @@ // 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/. +/* import-globals-from in-content/applications.js */ + var Cc = Components.classes; var Ci = Components.interfaces; diff --git a/browser/components/preferences/fonts.js b/browser/components/preferences/fonts.js index bfdc1a589d8f..bf6f43159357 100644 --- a/browser/components/preferences/fonts.js +++ b/browser/components/preferences/fonts.js @@ -3,6 +3,8 @@ * 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/. */ +/* import-globals-from ../../../toolkit/mozapps/preferences/fontbuilder.js */ + // browser.display.languageList LOCK ALL when LOCKED const kDefaultFontType = "font.default.%LANG%"; @@ -101,4 +103,3 @@ var gFontsDialog = { return buttonChosen == 0; }, }; - diff --git a/browser/components/preferences/handlers.xml b/browser/components/preferences/handlers.xml index 5fb915ceef39..ad07a493c0ae 100644 --- a/browser/components/preferences/handlers.xml +++ b/browser/components/preferences/handlers.xml @@ -3,6 +3,7 @@ + diff --git a/browser/components/preferences/in-content/preferences.js b/browser/components/preferences/in-content/preferences.js index 274719867e86..51158b66081d 100644 --- a/browser/components/preferences/in-content/preferences.js +++ b/browser/components/preferences/in-content/preferences.js @@ -2,6 +2,18 @@ - 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/. */ +// Import globals from the files imported by the .xul files. +/* import-globals-from subdialogs.js */ +/* import-globals-from advanced.js */ +/* import-globals-from main.js */ +/* import-globals-from search.js */ +/* import-globals-from content.js */ +/* import-globals-from privacy.js */ +/* import-globals-from applications.js */ +/* import-globals-from security.js */ +/* import-globals-from sync.js */ +/* import-globals-from ../../../base/content/utilityOverlay.js */ + "use strict"; var Cc = Components.classes; diff --git a/browser/components/syncedtabs/test/browser/.eslintrc.js b/browser/components/syncedtabs/test/browser/.eslintrc.js new file mode 100644 index 000000000000..7c80211924ef --- /dev/null +++ b/browser/components/syncedtabs/test/browser/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../../testing/mochitest/browser.eslintrc.js" + ] +}; diff --git a/browser/components/syncedtabs/test/xpcshell/.eslintrc.js b/browser/components/syncedtabs/test/xpcshell/.eslintrc.js new file mode 100644 index 000000000000..d35787cd2c49 --- /dev/null +++ b/browser/components/syncedtabs/test/xpcshell/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../../testing/xpcshell/xpcshell.eslintrc.js" + ] +}; diff --git a/browser/components/tests/unit/.eslintrc.js b/browser/components/tests/unit/.eslintrc.js new file mode 100644 index 000000000000..fee088c17903 --- /dev/null +++ b/browser/components/tests/unit/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../testing/xpcshell/xpcshell.eslintrc.js" + ] +}; diff --git a/browser/components/tests/unit/test_distribution.js b/browser/components/tests/unit/test_distribution.js index 75648298d12f..183ab85d6314 100644 --- a/browser/components/tests/unit/test_distribution.js +++ b/browser/components/tests/unit/test_distribution.js @@ -9,6 +9,7 @@ Cu.import("resource://gre/modules/LoadContextInfo.jsm"); // Import common head. var commonFile = do_get_file("../../../../toolkit/components/places/tests/head_common.js", false); +/* import-globals-from ../../../../toolkit/components/places/tests/head_common.js */ if (commonFile) { let uri = Services.io.newFileURI(commonFile); Services.scriptloader.loadSubScript(uri.spec, this); diff --git a/browser/extensions/e10srollout/bootstrap.js b/browser/extensions/e10srollout/bootstrap.js index 16714067ebdf..77756d3f5f05 100644 --- a/browser/extensions/e10srollout/bootstrap.js +++ b/browser/extensions/e10srollout/bootstrap.js @@ -242,7 +242,7 @@ let performLongSpinnerCheck = Task.async(function*() { let histogram = ping.payload.histograms[LONG_SPINNER_HISTOGRAM]; - for (spinnerTime of Object.keys(histogram.values)) { + for (let spinnerTime of Object.keys(histogram.values)) { // Only consider spinners that took more than 2 seconds. // Note: the first bucket size that fits this criteria is // 2297ms. And the largest bucket is 64000ms, meaning that diff --git a/browser/extensions/formautofill/test/unit/.eslintrc b/browser/extensions/formautofill/test/unit/.eslintrc index a96768bcf7cd..8e33fb0c6c39 100644 --- a/browser/extensions/formautofill/test/unit/.eslintrc +++ b/browser/extensions/formautofill/test/unit/.eslintrc @@ -1,5 +1,5 @@ { "extends": [ - "../../../../../testing/xpcshell/xpcshell.eslintrc" + "../../../../../testing/xpcshell/xpcshell.eslintrc.js" ], } diff --git a/browser/extensions/pocket/test/.eslintrc.js b/browser/extensions/pocket/test/.eslintrc.js new file mode 100644 index 000000000000..c764b133dc9c --- /dev/null +++ b/browser/extensions/pocket/test/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../testing/mochitest/browser.eslintrc.js" + ] +}; diff --git a/browser/extensions/webcompat/test/browser/.eslintrc.js b/browser/extensions/webcompat/test/browser/.eslintrc.js new file mode 100644 index 000000000000..7c80211924ef --- /dev/null +++ b/browser/extensions/webcompat/test/browser/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../../testing/mochitest/browser.eslintrc.js" + ] +}; diff --git a/browser/modules/WindowsPreviewPerTab.jsm b/browser/modules/WindowsPreviewPerTab.jsm index 2ce48055d493..bc89dbd35f62 100644 --- a/browser/modules/WindowsPreviewPerTab.jsm +++ b/browser/modules/WindowsPreviewPerTab.jsm @@ -606,7 +606,7 @@ TabWindow.prototype = { if (aIconURL) { let shouldRequestFaviconURL = true; try { - urlObject = NetUtil.newURI(aIconURL); + let urlObject = NetUtil.newURI(aIconURL); shouldRequestFaviconURL = !this.directRequestProtocols.has(urlObject.scheme); } catch (ex) {} diff --git a/browser/modules/test/head.js b/browser/modules/test/head.js index e407f22f39af..8095cf9fda47 100644 --- a/browser/modules/test/head.js +++ b/browser/modules/test/head.js @@ -29,6 +29,6 @@ function waitForConditionPromise(condition, timeoutMsg, tryCount=NUMBER_OF_TRIES function waitForCondition(condition, nextTest, errorMsg) { waitForConditionPromise(condition, errorMsg).then(nextTest, (reason) => { - ok(false, reason + (reason.stack ? "\n" + e.stack : "")); + ok(false, reason + (reason.stack ? "\n" + reason.stack : "")); }); } diff --git a/browser/tools/mozscreenshots/.eslintrc.js b/browser/tools/mozscreenshots/.eslintrc.js new file mode 100644 index 000000000000..462e8c25246e --- /dev/null +++ b/browser/tools/mozscreenshots/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { // eslint-disable-line no-undef + "extends": [ + "../../../testing/mochitest/browser.eslintrc.js" + ], +}; diff --git a/browser/tools/mozscreenshots/controlCenter/browser_controlCenter.js b/browser/tools/mozscreenshots/controlCenter/browser_controlCenter.js index 5dd47b0327b8..7e1ffb125563 100644 --- a/browser/tools/mozscreenshots/controlCenter/browser_controlCenter.js +++ b/browser/tools/mozscreenshots/controlCenter/browser_controlCenter.js @@ -2,6 +2,8 @@ * 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/. */ +/* import-globals-from ../head.js */ + "use strict"; add_task(function* capture() { diff --git a/browser/tools/mozscreenshots/devtools/browser_devtools.js b/browser/tools/mozscreenshots/devtools/browser_devtools.js index cee5d6b074fb..a47548958dad 100644 --- a/browser/tools/mozscreenshots/devtools/browser_devtools.js +++ b/browser/tools/mozscreenshots/devtools/browser_devtools.js @@ -2,6 +2,8 @@ * 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/. */ +/* import-globals-from ../head.js */ + "use strict"; add_task(function* capture() { diff --git a/browser/tools/mozscreenshots/permissionPrompts/browser_permissionPrompts.js b/browser/tools/mozscreenshots/permissionPrompts/browser_permissionPrompts.js index 42883cd30064..af63217f2d1e 100644 --- a/browser/tools/mozscreenshots/permissionPrompts/browser_permissionPrompts.js +++ b/browser/tools/mozscreenshots/permissionPrompts/browser_permissionPrompts.js @@ -2,6 +2,8 @@ * 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/. */ +/* import-globals-from ../head.js */ + "use strict"; add_task(function* capture() { diff --git a/browser/tools/mozscreenshots/preferences/browser_preferences.js b/browser/tools/mozscreenshots/preferences/browser_preferences.js index a17596b19727..c590f194fef5 100644 --- a/browser/tools/mozscreenshots/preferences/browser_preferences.js +++ b/browser/tools/mozscreenshots/preferences/browser_preferences.js @@ -2,6 +2,8 @@ * 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/. */ +/* import-globals-from ../head.js */ + "use strict"; add_task(function* capture() { diff --git a/browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js b/browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js index b9b41068dae6..6d0eaa1d66c7 100644 --- a/browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js +++ b/browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js @@ -2,6 +2,8 @@ * 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/. */ +/* import-globals-from ../head.js */ + "use strict"; add_task(function* capture() { diff --git a/testing/mochitest/browser.eslintrc.js b/testing/mochitest/browser.eslintrc.js index 80fe312b5bc6..841a82531f4d 100644 --- a/testing/mochitest/browser.eslintrc.js +++ b/testing/mochitest/browser.eslintrc.js @@ -29,6 +29,7 @@ module.exports = { "getTestFilePath": false, "gTestPath": false, "info": false, + "ignoreAllUncaughtExceptions": false, "is": false, "isnot": false, "ok": false, diff --git a/testing/xpcshell/xpcshell.eslintrc.js b/testing/xpcshell/xpcshell.eslintrc.js index c6e503785e98..8b6493fb5097 100644 --- a/testing/xpcshell/xpcshell.eslintrc.js +++ b/testing/xpcshell/xpcshell.eslintrc.js @@ -20,6 +20,7 @@ module.exports = { "do_get_file": false, "do_get_idle": false, "do_get_profile": false, + "do_get_tempdir": false, "do_load_module": false, "do_parse_document": false, "do_print": false,