From 314a1804e25458449e6f1bace6d50640f309f580 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Fri, 24 Mar 2017 12:04:36 +0000 Subject: [PATCH] Bug 1350298 - Enable ESLint of nsContextMenu.js, fixing the last issues. Also enable it for finding globals for the browser-window environment. r=jaws MozReview-Commit-ID: Cl8AFvzR6o8 --HG-- extra : rebase_source : 8ad57d20d53def238bbe214aa2f33f6948e49809 --- .eslintignore | 1 - .../eslint/eslint-plugin-mozilla/lib/configs/recommended.js | 2 ++ .../eslint-plugin-mozilla/lib/environments/browser-window.js | 5 +++-- tools/lint/eslint/eslint-plugin-mozilla/package.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.eslintignore b/.eslintignore index 44a937a19187..b2e2210570fc 100644 --- a/.eslintignore +++ b/.eslintignore @@ -55,7 +55,6 @@ b2g/locales/en-US/b2g-l10n.js # browser/ exclusions browser/app/** browser/branding/**/firefox-branding.js -browser/base/content/nsContextMenu.js browser/base/content/sanitizeDialog.js browser/base/content/test/general/file_csp_block_all_mixedcontent.html browser/base/content/test/urlbar/file_blank_but_not_blank.html diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js index 3336046d9c7d..abdb357465f6 100644 --- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js @@ -296,6 +296,8 @@ module.exports = { "ChromeWorker": false, "ChromeUtils": false, "Components": false, + "CSSPrimitiveValue": false, + "CSSValueList": false, "dump": true, // Specific to Firefox // eslint-disable-next-line max-len 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 6c92d535bb41..22f1983284c0 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 @@ -23,7 +23,7 @@ const rootDir = helpers.getRootDir(module.filename); // These are scripts not included in global-scripts.inc, but which are loaded // via overlays. const EXTRA_SCRIPTS = [ - //"browser/base/content/nsContextMenu.js", + "browser/base/content/nsContextMenu.js", "toolkit/content/contentAreaUtils.js", "browser/components/places/content/editBookmarkOverlay.js", "browser/components/downloads/content/downloads.js", @@ -116,5 +116,6 @@ function mapGlobals(fileGlobals) { } module.exports = { - globals: mapGlobals(getScriptGlobals()) + globals: mapGlobals(getScriptGlobals()), + browserjsScripts: getGlobalScriptsIncludes().concat(EXTRA_SCRIPTS) }; diff --git a/tools/lint/eslint/eslint-plugin-mozilla/package.json b/tools/lint/eslint/eslint-plugin-mozilla/package.json index a466347313f6..7c95c90d57d9 100644 --- a/tools/lint/eslint/eslint-plugin-mozilla/package.json +++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-mozilla", - "version": "0.2.33", + "version": "0.2.34", "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.", "keywords": [ "eslint",