зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1648149 - Ignore debug and warn in eslint. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D86777
This commit is contained in:
Родитель
7f8f7338d0
Коммит
4488c5be10
|
@ -27,8 +27,17 @@ module.exports = {
|
|||
"chrome/geckoview/**",
|
||||
"components/geckoview/**",
|
||||
"modules/geckoview/**",
|
||||
"actors/**",
|
||||
],
|
||||
rules: {
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
args: "none",
|
||||
vars: "local",
|
||||
varsIgnorePattern: "(debug|warn)",
|
||||
},
|
||||
],
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
"resource://gre/modules/GeckoViewUtils.jsm"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("BrowserTabParent"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("BrowserTabParent");
|
||||
|
||||
class BrowserTabParent extends JSWindowActorParent {
|
||||
async receiveMessage(aMsg) {
|
||||
|
|
|
@ -163,7 +163,6 @@ class ContentDelegateChild extends GeckoViewActorChild {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { debug, warn } = ContentDelegateChild.initLogging(
|
||||
"ContentDelegateChild"
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
"resource://gre/modules/GeckoViewUtils.jsm"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ContentDelegateParent"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ContentDelegateParent");
|
||||
|
||||
class ContentDelegateParent extends JSWindowActorParent {
|
||||
async receiveMessage(aMsg) {
|
||||
|
|
|
@ -349,4 +349,4 @@ class GeckoViewContentChild extends GeckoViewActorChild {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewContentChild.initLogging("GeckoViewContent"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewContentChild.initLogging("GeckoViewContent");
|
||||
|
|
|
@ -120,4 +120,4 @@ LoadURIDelegateChild.prototype.QueryInterface = ChromeUtils.generateQI([
|
|||
"nsILoadURIDelegate",
|
||||
]);
|
||||
|
||||
const { debug, warn } = LoadURIDelegateChild.initLogging("LoadURIDelegate"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = LoadURIDelegateChild.initLogging("LoadURIDelegate");
|
||||
|
|
|
@ -75,4 +75,4 @@ WebBrowserChromeChild.prototype.QueryInterface = ChromeUtils.generateQI([
|
|||
"nsIWebBrowserChrome3",
|
||||
]);
|
||||
|
||||
const { debug, warn } = WebBrowserChromeChild.initLogging("WebBrowserChrome"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = WebBrowserChromeChild.initLogging("WebBrowserChrome");
|
||||
|
|
|
@ -102,5 +102,5 @@ class GeckoViewAutofillChild extends GeckoViewChildModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewAutofillChild.initLogging("GeckoViewAutofill"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewAutofillChild.initLogging("GeckoViewAutofill");
|
||||
const module = GeckoViewAutofillChild.create(this);
|
||||
|
|
|
@ -470,5 +470,5 @@ class GeckoViewMediaChild extends GeckoViewChildModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewMediaChild.initLogging("GeckoViewMedia"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewMediaChild.initLogging("GeckoViewMedia");
|
||||
const module = GeckoViewMediaChild.create(this);
|
||||
|
|
|
@ -310,5 +310,5 @@ const ProgressTracker = {
|
|||
},
|
||||
};
|
||||
|
||||
const { debug, warn } = GeckoViewProgressChild.initLogging("GeckoViewProgress"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewProgressChild.initLogging("GeckoViewProgress");
|
||||
const module = GeckoViewProgressChild.create(this);
|
||||
|
|
|
@ -40,5 +40,5 @@ class GeckoViewScrollChild extends GeckoViewChildModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewScrollChild.initLogging("GeckoViewScroll"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewScrollChild.initLogging("GeckoViewScroll");
|
||||
const module = GeckoViewScrollChild.create(this);
|
||||
|
|
|
@ -301,5 +301,5 @@ class GeckoViewSelectionActionChild extends GeckoViewChildModule {
|
|||
|
||||
const { debug, warn } = GeckoViewSelectionActionChild.initLogging(
|
||||
"GeckoViewSelectionAction"
|
||||
); // eslint-disable-line no-unused-vars
|
||||
);
|
||||
const module = GeckoViewSelectionActionChild.create(this);
|
||||
|
|
|
@ -161,5 +161,5 @@ class GeckoViewSettingsChild extends GeckoViewChildModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewSettingsChild.initLogging("GeckoViewSettings"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewSettingsChild.initLogging("GeckoViewSettings");
|
||||
const module = GeckoViewSettingsChild.create(this);
|
||||
|
|
|
@ -646,5 +646,5 @@ class SessionStateAggregator extends GeckoViewChildModule {
|
|||
|
||||
const { debug, warn } = SessionStateAggregator.initLogging(
|
||||
"SessionStateAggregator"
|
||||
); // eslint-disable-line no-unused-vars
|
||||
);
|
||||
const module = SessionStateAggregator.create(this);
|
||||
|
|
|
@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ColorPickerDelegate"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ColorPickerDelegate");
|
||||
|
||||
class ColorPickerDelegate {
|
||||
init(aParent, aTitle, aInitialColor) {
|
||||
|
|
|
@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("FilePickerDelegate"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("FilePickerDelegate");
|
||||
|
||||
class FilePickerDelegate {
|
||||
/* ---------- nsIFilePicker ---------- */
|
||||
|
|
|
@ -18,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPrompt"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPrompt");
|
||||
|
||||
class PromptFactory {
|
||||
constructor() {
|
||||
|
|
|
@ -11,7 +11,7 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPrompter"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPrompter");
|
||||
|
||||
class GeckoViewPrompter {
|
||||
constructor(aParent) {
|
||||
|
|
|
@ -9,7 +9,7 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
"resource://gre/modules/GeckoViewUtils.jsm"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPush"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPush");
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
|
|
|
@ -20,7 +20,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Startup"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Startup");
|
||||
|
||||
const JSWINDOWACTORS = {
|
||||
BrowserTab: {
|
||||
|
|
|
@ -20,7 +20,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("LoginStorageDelegate"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("LoginStorageDelegate");
|
||||
|
||||
// Sync with LoginSaveOption.Hint in Autocomplete.java.
|
||||
const LoginStorageHint = {
|
||||
|
|
|
@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("PromptCollection"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("PromptCollection");
|
||||
|
||||
class PromptCollection {
|
||||
beforeUnloadCheck(browsingContext) {
|
||||
|
|
|
@ -22,7 +22,7 @@ const domBundle = Services.strings.createBundle(
|
|||
"chrome://global/locale/dom/dom.properties"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ShareDelegate"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ShareDelegate");
|
||||
|
||||
class ShareDelegate {
|
||||
init(aParent) {
|
||||
|
|
|
@ -21,7 +21,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
|
||||
ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ContentCrashHandler"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ContentCrashHandler");
|
||||
|
||||
function getDir(name) {
|
||||
const uAppDataPath = Services.dirsvc.get("UAppData", Ci.nsIFile).path;
|
||||
|
|
|
@ -21,4 +21,4 @@ class GeckoViewActorChild extends JSWindowActorChild {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Actor[C]"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Actor[C]");
|
||||
|
|
|
@ -30,4 +30,4 @@ var GeckoViewActorManager = {
|
|||
},
|
||||
};
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewActorManager"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewActorManager");
|
||||
|
|
|
@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
LoginManagerChild: "resource://gre/modules/LoginManagerChild.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Autofill"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Autofill");
|
||||
|
||||
class GeckoViewAutofill {
|
||||
constructor(aEventDispatcher) {
|
||||
|
|
|
@ -10,7 +10,7 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
"resource://gre/modules/GeckoViewUtils.jsm"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Module[C]"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Module[C]");
|
||||
|
||||
class GeckoViewChildModule {
|
||||
static initLogging(aModuleName) {
|
||||
|
|
|
@ -16,7 +16,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Console"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Console");
|
||||
|
||||
const LOG_EVENT_TOPIC = "console-api-log-event";
|
||||
|
||||
|
|
|
@ -394,4 +394,4 @@ class GeckoViewContent extends GeckoViewModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewContent.initLogging("GeckoViewContent"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewContent.initLogging("GeckoViewContent");
|
||||
|
|
|
@ -116,4 +116,4 @@ class GeckoViewContentBlocking extends GeckoViewModule {
|
|||
|
||||
const { debug, warn } = GeckoViewContentBlocking.initLogging(
|
||||
"GeckoViewContentBlocking"
|
||||
); // eslint-disable-line no-unused-vars
|
||||
);
|
||||
|
|
|
@ -25,7 +25,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging(
|
||||
"GeckoViewContentBlockingController"
|
||||
);
|
||||
|
|
|
@ -129,4 +129,4 @@ const GeckoViewRecordingMedia = {
|
|||
},
|
||||
};
|
||||
|
||||
const { debug, warn } = GeckoViewMedia.initLogging("GeckoViewMedia"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewMedia.initLogging("GeckoViewMedia");
|
||||
|
|
|
@ -10,7 +10,7 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
"resource://gre/modules/GeckoViewUtils.jsm"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Module"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Module");
|
||||
|
||||
class GeckoViewModule {
|
||||
static initLogging(aModuleName) {
|
||||
|
|
|
@ -574,4 +574,4 @@ class GeckoViewNavigation extends GeckoViewModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewNavigation.initLogging("GeckoViewNavigation"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewNavigation.initLogging("GeckoViewNavigation");
|
||||
|
|
|
@ -237,7 +237,6 @@ class GeckoViewProcessHangMonitor extends GeckoViewModule {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewProcessHangMonitor.initLogging(
|
||||
"GeckoViewProcessHangMonitor"
|
||||
);
|
||||
|
|
|
@ -355,4 +355,4 @@ class GeckoViewProgress extends GeckoViewModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewProgress.initLogging("GeckoViewProgress"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewProgress.initLogging("GeckoViewProgress");
|
||||
|
|
|
@ -21,7 +21,6 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIPushNotifier"
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPushController");
|
||||
|
||||
function createScopeAndPrincipal(scopeAndAttrs) {
|
||||
|
|
|
@ -34,7 +34,7 @@ XPCOMUtils.defineLazyGetter(this, "SocketListener", () => {
|
|||
return SocketListener;
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("RemoteDebugger"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("RemoteDebugger");
|
||||
|
||||
var GeckoViewRemoteDebugger = {
|
||||
observe(aSubject, aTopic, aData) {
|
||||
|
|
|
@ -136,4 +136,4 @@ class GeckoViewSettings extends GeckoViewModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewSettings.initLogging("GeckoViewSettings"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewSettings.initLogging("GeckoViewSettings");
|
||||
|
|
|
@ -11,7 +11,6 @@ const { GeckoViewUtils } = ChromeUtils.import(
|
|||
);
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging(
|
||||
"GeckoViewStorageController"
|
||||
);
|
||||
|
|
|
@ -183,4 +183,4 @@ class GeckoViewTab extends GeckoViewModule {
|
|||
}
|
||||
}
|
||||
|
||||
const { debug, warn } = GeckoViewTab.initLogging("GeckoViewTab"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewTab.initLogging("GeckoViewTab");
|
||||
|
|
|
@ -45,7 +45,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIMIMEService"
|
||||
);
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Console"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("Console");
|
||||
|
||||
/** Provides common logic between page and browser actions */
|
||||
class ExtensionActionHelper {
|
||||
|
|
|
@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("LoadURIDelegate"); // eslint-disable-line no-unused-vars
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("LoadURIDelegate");
|
||||
|
||||
const LoadURIDelegate = {
|
||||
// Delegate URI loading to the app.
|
||||
|
|
Загрузка…
Ссылка в новой задаче