Bug 767640, part 2 - Update eslint rules to take into account the definitions of Ci, Cr, Cc and Cu. r=florian draft
authorAndrew McCreight <continuation@gmail.com>
Thu, 25 Jan 2018 09:45:45 -0800
changeset 750225 e40f5a8bad5fee6c76f4048af4901b253fa8f989
parent 750224 8c66dd90fd087c91a9fb83f4af8382edf92227e0
push id97585
push userbmo:continuation@gmail.com
push dateThu, 01 Feb 2018 19:07:29 +0000
reviewersflorian
bugs767640
milestone60.0a1
Bug 767640, part 2 - Update eslint rules to take into account the definitions of Ci, Cr, Cc and Cu. r=florian MozReview-Commit-ID: 4PyMh0WeA4r
tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
tools/lint/eslint/eslint-plugin-mozilla/lib/environments/jsm.js
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -7,21 +7,25 @@ module.exports = {
   },
 
   "globals": {
     "AddonManagerPermissions": false,
     "BroadcastChannel": false,
     "BrowserFeedWriter": false,
     "CSSPrimitiveValue": false,
     "CSSValueList": false,
+    "Cc": false,
     "CheckerboardReportService": false,
     // Specific to Firefox (Chrome code only).
     "ChromeUtils": false,
     "ChromeWorker": false,
+    "Ci": false,
     "Components": false,
+    "Cr": false,
+    "Cu": false,
     "DOMRequest": false,
     "DedicatedWorkerGlobalScope": false,
     "IDBFileRequest": false,
     "IDBLocaleAwareKeyRange": false,
     "IDBMutableFile": false,
     "ImageDocument": false,
     "InstallTrigger": false,
     // Specific to Firefox
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/jsm.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/jsm.js
@@ -13,16 +13,21 @@ module.exports = {
     // Intl is standard JS availability.
     "Intl": false,
     // These globals are hard-coded and available in .jsm scopes.
     // https://searchfox.org/mozilla-central/rev/ed212c79cfe86357e9a5740082b9364e7f6e526f/js/xpconnect/loader/mozJSComponentLoader.cpp#134-140
     "atob": false,
     "btoa": false,
     "debug": false,
     "dump": false,
+    // These globals are defined in XPCWrappedNativeScope::AttachComponentsObject.
+    "Cc": false,
+    "Ci": false,
+    "Cr": false,
+    "Cu": false,
     // These globals are made available via WebIDL files, see ResolveSystemBinding in:
     // https://searchfox.org/mozilla-central/source/__GENERATED__/dom/bindings/ResolveSystemBinding.cpp
     "AbortController": false,
     "AbortSignal": false,
     "AddonManagerPermissions": false,
     "ChannelWrapper": false,
     "ChromeUtils": false,
     "ChromeWorker": false,