From 7d5e6f23c58c521d5233ac3deae0b17af4baa9a7 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Fri, 3 Mar 2017 10:17:54 +0000 Subject: [PATCH] Bug 1344027 - Move eslint-plugin-mozilla's .eslintrc.js file so that all of the plugin is linted, and fix the resulting issues. r=mossop MozReview-Commit-ID: POYhxkeOaw --HG-- rename : tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/.eslintrc.js extra : rebase_source : efd9a97796e72e94c436df6f4223a12d6daa036a --- .../{lib/rules => }/.eslintrc.js | 0 .../lib/environments/browser-window.js | 21 +++--- .../lib/environments/places-overlay.js | 21 +++--- .../lib/environments/simpletest.js | 4 +- .../eslint-plugin-mozilla/lib/globals.js | 20 +++--- .../eslint-plugin-mozilla/lib/helpers.js | 34 +++++---- .../eslint/eslint-plugin-mozilla/lib/index.js | 13 ++-- .../lib/processors/self-hosted.js | 2 +- .../lib/processors/xbl-bindings.js | 70 ++++++++++++------- .../tests/avoid-removeChild.js | 2 +- .../tests/balanced-listeners.js | 6 +- .../tests/no-useless-parameters.js | 9 ++- .../tests/no-useless-removeEventListener.js | 4 +- .../test-no-import-into-var-and-global.js | 8 +-- .../tests/test-no-single-arg-cu-import.js | 4 +- .../tests/use-ownerGlobal.js | 7 +- 16 files changed, 135 insertions(+), 90 deletions(-) rename tools/lint/eslint/eslint-plugin-mozilla/{lib/rules => }/.eslintrc.js (100%) diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc.js b/tools/lint/eslint/eslint-plugin-mozilla/.eslintrc.js similarity index 100% rename from tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc.js rename to tools/lint/eslint/eslint-plugin-mozilla/.eslintrc.js diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js index 9db2289056cf..313bb240dffa 100644 --- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js @@ -34,18 +34,21 @@ const EXTRA_SCRIPTS = [ // Via editMenuOverlay.xul "toolkit/content/editMenuOverlay.js", // Via baseMenuOverlay.xul - "browser/base/content/utilityOverlay.js", + "browser/base/content/utilityOverlay.js" ]; // Some files in global-scripts.inc need mapping to specific locations. const MAPPINGS = { "printUtils.js": "toolkit/components/printing/content/printUtils.js", - "browserPlacesViews.js": "browser/components/places/content/browserPlacesViews.js", + "browserPlacesViews.js": + "browser/components/places/content/browserPlacesViews.js", "panelUI.js": "browser/components/customizableui/content/panelUI.js", - "viewSourceUtils.js": "toolkit/components/viewsource/content/viewSourceUtils.js", + "viewSourceUtils.js": + "toolkit/components/viewsource/content/viewSourceUtils.js" }; -const globalScriptsRegExp = /