From b15de69c524407b120b01c5a13c55245d556d89d Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 5 Dec 2017 20:31:13 +0100 Subject: [PATCH] [Firefox addon] Temporarily disable the ESLint `semi` rule, around the `DEFAULT_PREFERENCES` declaration, to prevent mozilla-central test errors While this doesn't actually fix the underlying issue, it should prevent the ESLint errors and thus make future PDF.js updates easier. Compared to updating (and testing) the preprocessor, this seems like a reasonable workaround given its simplicity. --- extensions/firefox/bootstrap.js | 4 +++- extensions/firefox/content/PdfJs.jsm | 4 +++- extensions/firefox/content/PdfjsChromeUtils.jsm | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/extensions/firefox/bootstrap.js b/extensions/firefox/bootstrap.js index 16d508f88..1c141190a 100644 --- a/extensions/firefox/bootstrap.js +++ b/extensions/firefox/bootstrap.js @@ -45,11 +45,13 @@ function log(str) { } function initializeDefaultPreferences() { + /* eslint-disable semi */ var DEFAULT_PREFERENCES = //#include ../../web/default_preferences.json //#if false - "end of DEFAULT_PREFERENCES"; + "end of DEFAULT_PREFERENCES" //#endif + /* eslint-enable semi */ var defaultBranch = Services.prefs.getDefaultBranch(EXT_PREFIX + "."); var defaultValue; diff --git a/extensions/firefox/content/PdfJs.jsm b/extensions/firefox/content/PdfJs.jsm index 1cd4259b8..b02cc6e87 100644 --- a/extensions/firefox/content/PdfJs.jsm +++ b/extensions/firefox/content/PdfJs.jsm @@ -79,11 +79,13 @@ function isDefaultHandler() { } function initializeDefaultPreferences() { + /* eslint-disable semi */ var DEFAULT_PREFERENCES = //#include ../../../web/default_preferences.json //#if false - "end of DEFAULT_PREFERENCES"; + "end of DEFAULT_PREFERENCES" //#endif + /* eslint-enable semi */ var defaultBranch = Services.prefs.getDefaultBranch(PREF_PREFIX + "."); var defaultValue; diff --git a/extensions/firefox/content/PdfjsChromeUtils.jsm b/extensions/firefox/content/PdfjsChromeUtils.jsm index af7b4c2fb..0fcc18430 100644 --- a/extensions/firefox/content/PdfjsChromeUtils.jsm +++ b/extensions/firefox/content/PdfjsChromeUtils.jsm @@ -33,11 +33,13 @@ XPCOMUtils.defineLazyServiceGetter(Svc, "mime", "@mozilla.org/mime;1", "nsIMIMEService"); +/* eslint-disable semi */ var DEFAULT_PREFERENCES = //#include ../../../web/default_preferences.json //#if false - "end of DEFAULT_PREFERENCES"; + "end of DEFAULT_PREFERENCES" //#endif +/* eslint-enable semi */ var PdfjsChromeUtils = { // For security purposes when running remote, we restrict preferences