Bug 1572354 - Fix erroneous prefs-related entries in .prettierignore. r=vporof
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 08 Aug 2019 06:40:49 +0000
changeset 486853 bf03499067fbc9fbb00e6b2c45081afb17d2cd44
parent 486852 96e453630656501e8a3ce777e9a5707d19480987
child 486854 828428225701b0ff8abedf3fcff00a1ae6de79f4
push id36409
push userrmaries@mozilla.com
push dateThu, 08 Aug 2019 21:45:31 +0000
treeherdermozilla-central@82ce76b8a96b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs1572354
milestone70.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 1572354 - Fix erroneous prefs-related entries in .prettierignore. r=vporof This patch removes two entries: - devtools/client/netmonitor/launchpad.js: this file no longer exists. - devtools/client/webconsole/test/mocha-test-setup.js: this file is a proper JS file, not a prefs file. The patch also reformats mocha-test-setup.js. Differential Revision: https://phabricator.services.mozilla.com/D41150
.prettierignore
devtools/client/webconsole/test/mocha-test-setup.js
--- a/.prettierignore
+++ b/.prettierignore
@@ -9,20 +9,18 @@
 
 # Ignore default pref files which have a .js suffix but aren't parsed normally as JavaScript.
 browser/app/profile/channel-prefs.js
 browser/app/profile/firefox.js
 browser/branding/aurora/pref/firefox-branding.js
 browser/branding/nightly/pref/firefox-branding.js
 browser/branding/official/pref/firefox-branding.js
 browser/branding/unofficial/pref/firefox-branding.js
-devtools/client/netmonitor/launchpad.js
 devtools/client/preferences/debugger.js
 devtools/client/preferences/devtools-client.js
-devtools/client/webconsole/test/mocha-test-setup.js
 devtools/client/webide/preferences/webide.js
 devtools/shared/preferences/devtools-shared.js
 devtools/startup/preferences/devtools-startup.js
 extensions/pref/autoconfig/test/unit/autoconfig.js
 mobile/android/app/geckoview-prefs.js
 mobile/android/app/mobile.js
 mobile/android/installer/mobile-l10n.js
 modules/libpref/init/all.js
--- a/devtools/client/webconsole/test/mocha-test-setup.js
+++ b/devtools/client/webconsole/test/mocha-test-setup.js
@@ -3,17 +3,19 @@
 
 /* eslint-env node */
 
 "use strict";
 
 const mcRoot = `${__dirname}/../../../../`;
 const getModule = mcPath => `module.exports = require("${mcRoot}${mcPath}");`;
 
-const { Services: { pref } } = require("devtools-modules");
+const {
+  Services: { pref },
+} = require("devtools-modules");
 pref("devtools.debugger.remote-timeout", 10000);
 pref("devtools.hud.loglimit", 10000);
 pref("devtools.webconsole.filter.error", true);
 pref("devtools.webconsole.filter.warn", true);
 pref("devtools.webconsole.filter.info", true);
 pref("devtools.webconsole.filter.log", true);
 pref("devtools.webconsole.filter.debug", true);
 pref("devtools.webconsole.filter.css", false);
@@ -27,22 +29,22 @@ pref("devtools.webconsole.groupWarningMe
 pref("devtools.webconsole.input.editor", false);
 pref("devtools.webconsole.input.autocomplete", true);
 pref("devtools.browserconsole.contentMessages", true);
 pref("devtools.webconsole.features.editor", true);
 pref("devtools.webconsole.input.editorWidth", 800);
 
 global.loader = {
   lazyServiceGetter: () => {},
-  lazyGetter: (context, name, fn) => {
-
-  },
+  lazyGetter: (context, name, fn) => {},
   lazyRequireGetter: (context, name, path, destruct) => {
     if (path === "devtools/shared/async-storage") {
-      global[name] = require("devtools/client/webconsole/test/fixtures/async-storage");
+      global[
+        name
+      ] = require("devtools/client/webconsole/test/fixtures/async-storage");
     }
     const excluded = [
       "Debugger",
       "devtools/shared/event-emitter",
       "devtools/client/shared/autocomplete-popup",
       "devtools/client/framework/devtools",
       "devtools/client/shared/keycodes",
       "devtools/client/shared/sourceeditor/editor",
@@ -54,17 +56,17 @@ global.loader = {
       const module = require(path);
       global[name] = destruct ? module[name] : module;
     }
   },
 };
 
 // Setting up globals used in some modules.
 global.isWorker = false;
-global.indexedDB = {open: () => ({})};
+global.indexedDB = { open: () => ({}) };
 
 // URLSearchParams was added to the global object in Node 10.0.0. To not cause any issue
 // with prior versions, we add it to the global object if it is not defined there.
 if (!global.URLSearchParams) {
   global.URLSearchParams = require("url").URLSearchParams;
 }
 
 if (!global.ResizeObserver) {
@@ -87,36 +89,38 @@ const requireHacker = require("require-h
 requireHacker.global_hook("default", (path, module) => {
   switch (path) {
     // For Enzyme
     case "react-dom":
       return getModule("devtools/client/shared/vendor/react-dom");
     case "react-dom/server":
       return getModule("devtools/client/shared/vendor/react-dom-server");
     case "react-dom/test-utils":
-      return getModule("devtools/client/shared/vendor/react-dom-test-utils-dev");
+      return getModule(
+        "devtools/client/shared/vendor/react-dom-test-utils-dev"
+      );
     case "react-redux":
       return getModule("devtools/client/shared/vendor/react-redux");
     // Use react-dev. This would be handled by browserLoader in Firefox.
     case "react":
     case "devtools/client/shared/vendor/react":
       return getModule("devtools/client/shared/vendor/react-dev");
     case "chrome":
       return `module.exports = { Cc: {}, Ci: {}, Cu: {} }`;
   }
 
   // Some modules depend on Chrome APIs which don't work in mocha. When such a module
   // is required, replace it with a mock version.
   switch (path) {
     case "devtools/shared/l10n":
       return getModule(
-        "devtools/client/webconsole/test/fixtures/LocalizationHelper");
+        "devtools/client/webconsole/test/fixtures/LocalizationHelper"
+      );
     case "devtools/shared/plural-form":
-      return getModule(
-        "devtools/client/webconsole/test/fixtures/PluralForm");
+      return getModule("devtools/client/webconsole/test/fixtures/PluralForm");
     case "Services":
     case "Services.default":
       return `module.exports = require("devtools-modules/src/Services")`;
     case "devtools/shared/client/object-client":
     case "devtools/shared/client/long-string-client":
       return `() => {}`;
     case "devtools/client/shared/components/SmartTrace":
     case "devtools/client/netmonitor/src/components/TabboxPanel":