From 986c8b56ca14b76a916af8f3436c495c0961808f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 4 Feb 2018 13:44:04 +0100 Subject: [PATCH] Update the `eslint-plugin-mozilla` package to the latest version With the updated compatibility for the addon, we can thus remove a few no longer needed exceptions from `extensions/firefox/.eslintrc`. --- extensions/firefox/.eslintrc | 14 -------------- extensions/firefox/content/PdfJsNetwork.jsm | 2 +- extensions/firefox/content/PdfStreamConverter.jsm | 1 - package.json | 2 +- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/extensions/firefox/.eslintrc b/extensions/firefox/.eslintrc index 87d9db7b7..ac538caa5 100644 --- a/extensions/firefox/.eslintrc +++ b/extensions/firefox/.eslintrc @@ -7,17 +7,6 @@ ], "parserOptions": { - // Note: Remove the ecmaVersion line when Gecko 52 is no longer supported - // to pick up the eslint-plugin-mozilla version (or at least update to - // ecmaVersion 8). - "ecmaVersion": 6, - "ecmaFeatures": { - // Note: We turn this off as it was only added in Gecko 55 (Bug 1339395) - // and we still need to support older versions (eslint-plugin-mozilla turns - // it on). - "experimentalObjectRestSpread": false - }, - "sourceType": "script", }, @@ -28,9 +17,6 @@ "rules": { // Items different from the mozilla/recommended configuration. - // Being enabled soon. - "mozilla/use-services": "error", - // Other rules mozilla/recommended hasn't enabled yet. "no-shadow": "error", "arrow-body-style": ["error", "as-needed"], diff --git a/extensions/firefox/content/PdfJsNetwork.jsm b/extensions/firefox/content/PdfJsNetwork.jsm index ac3d30194..64523aeb1 100644 --- a/extensions/firefox/content/PdfJsNetwork.jsm +++ b/extensions/firefox/content/PdfJsNetwork.jsm @@ -19,7 +19,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); var EXPORTED_SYMBOLS = ["NetworkManager"]; -function log(aMsg) { +function log(aMsg) { // eslint-disable-line no-unused-vars var msg = "PdfJsNetwork.jsm: " + (aMsg.join ? aMsg.join("") : aMsg); Services.console.logStringMessage(msg); } diff --git a/extensions/firefox/content/PdfStreamConverter.jsm b/extensions/firefox/content/PdfStreamConverter.jsm index d6402baae..84e7c289f 100644 --- a/extensions/firefox/content/PdfStreamConverter.jsm +++ b/extensions/firefox/content/PdfStreamConverter.jsm @@ -23,7 +23,6 @@ const Cr = Components.results; const Cu = Components.utils; const PDFJS_EVENT_ID = "pdf.js.message"; -const PDF_CONTENT_TYPE = "application/pdf"; const PREF_PREFIX = "PDFJSSCRIPT_PREF_PREFIX"; const PDF_VIEWER_WEB_PAGE = "resource://pdf.js/web/viewer.html"; const MAX_NUMBER_OF_PREFS = 50; diff --git a/package.json b/package.json index 69ed0bdcf..f808c4a57 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "core-js": "^2.5.3", "escodegen": "^1.9.0", "eslint": "^4.16.0", - "eslint-plugin-mozilla": "^0.5.0", + "eslint-plugin-mozilla": "^0.7.0", "eslint-plugin-no-unsanitized": "^2.0.2", "fancy-log": "^1.3.2", "gulp": "^3.9.1",