Bug 1502048 - Update the list of ESLint globals for recent JSM scope changes. r=nika,mossop
authorMark Banner <standard8@mozilla.com>
Thu, 22 Nov 2018 16:46:19 +0000
changeset 506921 5a48334dcd159b70d813104a4ca6c6c415d5764f
parent 506920 5d83d28c9ae59e31271fc400de7a63f0221a0ebe
child 506922 e6377178d0937fd4fd4a56374c8a5e370b6f66e0
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika, mossop
bugs1502048
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1502048 - Update the list of ESLint globals for recent JSM scope changes. r=nika,mossop This patch creates a new list of privileged globals, based on the webidl bindings. The list of jsm globals is reduced to only the ones specially extended to that scope. The privileged globals are enabled everywhere for the time being - although we likely could limit scopes, doing so is difficult with our current mozilla-central layout and configuration settings. Differential Revision: https://phabricator.services.mozilla.com/D12302
tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
tools/lint/eslint/eslint-plugin-mozilla/lib/environments/jsm.js
tools/lint/eslint/eslint-plugin-mozilla/lib/environments/privileged.js
tools/lint/eslint/eslint-plugin-mozilla/lib/index.js
tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
tools/lint/eslint/eslint-plugin-mozilla/package.json
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -6,80 +6,40 @@
  * be found here:
  *
  * https://eslint.org/docs/rules/
  */
 module.exports = {
   "env": {
     "browser": true,
     "es6": true,
+    "mozilla/privileged": true,
   },
 
   "extends": [
     "eslint:recommended",
   ],
 
   "globals": {
-    "AddonManagerPermissions": false,
-    "BroadcastChannel": false,
-    "CSSAnimation": 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,
     "Debugger": false,
-    "DedicatedWorkerGlobalScope": false,
-    "DeprecationReportBody": false,
-    "DominatorTree": false,
-    "HeapSnapshot": false,
-    "IDBFileRequest": false,
-    "IDBLocaleAwareKeyRange": false,
-    "IDBMutableFile": false,
-    "ImageDocument": false,
     "InstallTrigger": false,
     // Specific to Firefox
     // eslint-disable-next-line max-len
     // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/InternalError
     "InternalError": true,
-    "KeyEvent": false,
-    "MatchGlob": false,
-    "MatchPattern": false,
-    "MatchPatternSet": false,
-    "MenuBoxObject": false,
-    // Specific to Firefox (Chrome code only).
-    "PlacesBookmarkAddition": false,
-    "PlacesEvent": false,
-    "PlacesObservers": false,
-    "PlacesWeakCallbackWrapper": false,
-    "PrioEncoder": false,
-    "ReportingObserver": false,
-    // Specific to Firefox (Chrome code only).
+    "Intl": false,
     "SharedArrayBuffer": false,
-    "SimpleGestureEvent": false,
-    // Note: StopIteration will likely be removed as part of removing legacy
-    // generators, see bug 968038.
     "StopIteration": false,
-    "StructuredCloneHolder": false,
-    "TelemetryStopwatch": false,
-    "TestingDeprecatedInterface": false,
-    "WebAssembly": false,
-    "WebExtensionContentScript": false,
-    "WebExtensionPolicy": false,
-    "WebrtcGlobalInformation": false,
-    // Non-standard, specific to Firefox.
-    "XULElement": false,
-    "console": true,
     "dump": true,
     "openDialog": false,
     "saveStack": false,
     "sizeToContent": false,
     // Specific to Firefox
     // eslint-disable-next-line max-len
     // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/uneval
     "uneval": false,
@@ -88,24 +48,27 @@ module.exports = {
   "overrides": [{
     // Turn off use-services for xml files. XBL bindings are going away, and
     // working out the valid globals for those is difficult.
     "files": "**/*.xml",
     "rules": {
       "mozilla/use-services": "off",
     },
   }, {
-    // Turn off browser env for all *.jsm files, and turn on the jsm environment.
+    // We don't have the general browser environment for jsm files, but we do
+    // have our own special environments for them.
     "env": {
       "browser": false,
       "mozilla/jsm": true,
     },
     "files": "**/*.jsm",
     "rules": {
       "mozilla/mark-exported-symbols-as-used": "error",
+      // JSM modules are far easier to check for no-unused-vars on a global scope,
+      // than our content files. Hence we turn that on here.
       "no-unused-vars": ["error", {
         "args": "none",
         "vars": "all",
       }],
     },
   }],
 
   "parserOptions": {
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/jsm.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/jsm.js
@@ -5,85 +5,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 "use strict";
 
 module.exports = {
   "globals": {
-    // 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 WebIDLGlobalNameHash.
-    // XXX(nika): We should also explicitly include window-defined globals here now.
-    "AbortController": false,
-    "AbortSignal": false,
-    "AddonManagerPermissions": false,
-    "ChannelWrapper": false,
-    "ChromeUtils": false,
-    "ChromeWorker": false,
-    "DOMError": false,
-    "DOMException": false,
-    "DOMRequest": false,
-    "DOMStringList": false,
-    "ErrorEvent": false,
-    "Event": false,
-    "EventTarget": false,
-    "FileReader": false,
-    "HeapSnapshot": false,
-    "IDBCursor": false,
-    "IDBCursorWithValue": false,
-    "IDBDatabase": false,
-    "IDBFactory": false,
-    "IDBFileHandle": false,
-    "IDBFileRequest": false,
-    "IDBIndex": false,
-    "IDBKeyRange": false,
-    "IDBLocaleAwareKeyRange": false,
-    "IDBMutableFile": false,
-    "IDBObjectStore": false,
-    "IDBOpenDBRequest": false,
-    "IDBRequest": false,
-    "IDBTransaction": false,
-    "IDBVersionChangeEvent": false,
-    "IdleDeadline": false,
-    "MatchGlob": false,
-    "MatchPattern": false,
-    "MatchPatternSet": false,
-    "MessageChannel": false,
-    "MessageEvent": false,
-    "MessagePort": false,
-    "MouseEvent": false,
-    "PrecompiledScript": false,
-    "PromiseDebugging": false,
-    "StreamFilter": false,
-    "StreamFilterDataEvent": false,
-    "StructuredCloneHolder": false,
-    "TelemetryStopwatch": false,
-    "TCPServerSocket": false,
-    "TCPServerSocketEvent": false,
-    "TCPSocket": false,
-    "TCPSocketErrorEvent": false,
-    "TCPSocketEvent": false,
-    "TextDecoder": false,
-    "TextEncoder": false,
-    "URLSearchParams": false,
-    "WebExtensionContentScript": false,
-    "WebExtensionPolicy": false,
-    "Worker": false,
-    // Items not defined as System specifically, but available globally.
-    "File": false,
-    "Headers": false,
-    "XMLHttpRequest": false,
-    "URL": false,
   },
 };
new file mode 100644
--- /dev/null
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/privileged.js
@@ -0,0 +1,759 @@
+/**
+ * @fileoverview Defines the environment for jsm files.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+"use strict";
+
+module.exports = {
+  "globals": {
+    // This list of items is currently obtained manually from the list of
+    // mozilla::dom::constructor::id::ID enumerations in an object directory
+    // generated dom/bindings/RegisterBindings.cpp
+    "APZHitResultFlags": false,
+    "AbortController": false,
+    "AbortSignal": false,
+    "AccessibleNode": false,
+    "Addon": false,
+    "AddonEvent": false,
+    "AddonInstall": false,
+    "AddonManager": false,
+    "AddonManagerPermissions": false,
+    "AnalyserNode": false,
+    "Animation": false,
+    "AnimationEffect": false,
+    "AnimationEvent": false,
+    "AnimationPlaybackEvent": false,
+    "AnimationTimeline": false,
+    "AnonymousContent": false,
+    "Attr": false,
+    "AudioBuffer": false,
+    "AudioBufferSourceNode": false,
+    "AudioContext": false,
+    "AudioDestinationNode": false,
+    "AudioListener": false,
+    "AudioNode": false,
+    "AudioParam": false,
+    "AudioParamMap": false,
+    "AudioProcessingEvent": false,
+    "AudioScheduledSourceNode": false,
+    "AudioTrack": false,
+    "AudioTrackList": false,
+    "AudioWorklet": false,
+    "AudioWorkletNode": false,
+    "AuthenticatorAssertionResponse": false,
+    "AuthenticatorAttestationResponse": false,
+    "AuthenticatorResponse": false,
+    "BarProp": false,
+    "BaseAudioContext": false,
+    "BatteryManager": false,
+    "BeforeUnloadEvent": false,
+    "BiquadFilterNode": false,
+    "Blob": false,
+    "BlobEvent": false,
+    "BoxObject": false,
+    "BroadcastChannel": false,
+    "BrowsingContext": false,
+    "CDATASection": false,
+    "CSS": false,
+    "CSS2Properties": false,
+    "CSSAnimation": false,
+    "CSSConditionRule": false,
+    "CSSCounterStyleRule": false,
+    "CSSFontFaceRule": false,
+    "CSSFontFeatureValuesRule": false,
+    "CSSGroupingRule": false,
+    "CSSImportRule": false,
+    "CSSKeyframeRule": false,
+    "CSSKeyframesRule": false,
+    "CSSMediaRule": false,
+    "CSSMozDocumentRule": false,
+    "CSSNamespaceRule": false,
+    "CSSPageRule": false,
+    "CSSPseudoElement": false,
+    "CSSRule": false,
+    "CSSRuleList": false,
+    "CSSStyleDeclaration": false,
+    "CSSStyleRule": false,
+    "CSSStyleSheet": false,
+    "CSSSupportsRule": false,
+    "CSSTransition": false,
+    "Cache": false,
+    "CacheStorage": false,
+    "CanvasCaptureMediaStream": false,
+    "CanvasGradient": false,
+    "CanvasPattern": false,
+    "CanvasRenderingContext2D": false,
+    "CaretPosition": false,
+    "CaretStateChangedEvent": false,
+    "ChannelMergerNode": false,
+    "ChannelSplitterNode": false,
+    "ChannelWrapper": false,
+    "CharacterData": false,
+    "CheckerboardReportService": false,
+    "ChildProcessMessageManager": false,
+    "ChildSHistory": false,
+    "ChromeMessageBroadcaster": false,
+    "ChromeMessageSender": false,
+    "ChromeNodeList": false,
+    "ChromeUtils": false,
+    "ChromeWorker": false,
+    "Clipboard": false,
+    "ClipboardEvent": false,
+    "CloseEvent": false,
+    "CommandEvent": false,
+    "Comment": false,
+    "CompositionEvent": false,
+    "ConsoleInstance": false,
+    "ConstantSourceNode": false,
+    "ContentFrameMessageManager": false,
+    "ContentProcessMessageManager": false,
+    "ConvolverNode": false,
+    "CreateOfferRequest": false,
+    "Credential": false,
+    "CredentialsContainer": false,
+    "Crypto": false,
+    "CryptoKey": false,
+    "CustomElementRegistry": false,
+    "CustomEvent": false,
+    "DOMError": false,
+    "DOMException": false,
+    "DOMImplementation": false,
+    "DOMMatrix": false,
+    "DOMMatrixReadOnly": false,
+    "DOMParser": false,
+    "DOMPoint": false,
+    "DOMPointReadOnly": false,
+    "DOMQuad": false,
+    "DOMRect": false,
+    "DOMRectList": false,
+    "DOMRectReadOnly": false,
+    "DOMRequest": false,
+    "DOMStringList": false,
+    "DOMStringMap": false,
+    "DOMTokenList": false,
+    "DataTransfer": false,
+    "DataTransferItem": false,
+    "DataTransferItemList": false,
+    "DelayNode": false,
+    "DeprecationReportBody": false,
+    "DeviceLightEvent": false,
+    "DeviceMotionEvent": false,
+    "DeviceOrientationEvent": false,
+    "DeviceProximityEvent": false,
+    "Directory": false,
+    "Document": false,
+    "DocumentFragment": false,
+    "DocumentTimeline": false,
+    "DocumentType": false,
+    "DominatorTree": false,
+    "DragEvent": false,
+    "DynamicsCompressorNode": false,
+    "Element": false,
+    "ErrorEvent": false,
+    "Event": false,
+    "EventSource": false,
+    "EventTarget": false,
+    "FeaturePolicyViolationReportBody": false,
+    "FetchObserver": false,
+    "File": false,
+    "FileList": false,
+    "FileReader": false,
+    "FileSystem": false,
+    "FileSystemDirectoryEntry": false,
+    "FileSystemDirectoryReader": false,
+    "FileSystemEntry": false,
+    "FileSystemFileEntry": false,
+    "Flex": false,
+    "FlexItemValues": false,
+    "FlexLineValues": false,
+    "FocusEvent": false,
+    "FontFace": false,
+    "FontFaceSet": false,
+    "FontFaceSetLoadEvent": false,
+    "FormData": false,
+    "FrameLoader": false,
+    "GainNode": false,
+    "Gamepad": false,
+    "GamepadAxisMoveEvent": false,
+    "GamepadButton": false,
+    "GamepadButtonEvent": false,
+    "GamepadEvent": false,
+    "GamepadHapticActuator": false,
+    "GamepadPose": false,
+    "GamepadServiceTest": false,
+    "Grid": false,
+    "GridArea": false,
+    "GridDimension": false,
+    "GridLine": false,
+    "GridLines": false,
+    "GridTrack": false,
+    "GridTracks": false,
+    "HTMLAllCollection": false,
+    "HTMLAnchorElement": false,
+    "HTMLAreaElement": false,
+    "HTMLAudioElement": false,
+    "Audio": false,
+    "HTMLBRElement": false,
+    "HTMLBaseElement": false,
+    "HTMLBodyElement": false,
+    "HTMLButtonElement": false,
+    "HTMLCanvasElement": false,
+    "HTMLCollection": false,
+    "HTMLDListElement": false,
+    "HTMLDataElement": false,
+    "HTMLDataListElement": false,
+    "HTMLDetailsElement": false,
+    "HTMLDialogElement": false,
+    "HTMLDirectoryElement": false,
+    "HTMLDivElement": false,
+    "HTMLDocument": false,
+    "HTMLElement": false,
+    "HTMLEmbedElement": false,
+    "HTMLFieldSetElement": false,
+    "HTMLFontElement": false,
+    "HTMLFormControlsCollection": false,
+    "HTMLFormElement": false,
+    "HTMLFrameElement": false,
+    "HTMLFrameSetElement": false,
+    "HTMLHRElement": false,
+    "HTMLHeadElement": false,
+    "HTMLHeadingElement": false,
+    "HTMLHtmlElement": false,
+    "HTMLIFrameElement": false,
+    "HTMLImageElement": false,
+    "Image": false,
+    "HTMLInputElement": false,
+    "HTMLLIElement": false,
+    "HTMLLabelElement": false,
+    "HTMLLegendElement": false,
+    "HTMLLinkElement": false,
+    "HTMLMapElement": false,
+    "HTMLMarqueeElement": false,
+    "HTMLMediaElement": false,
+    "HTMLMenuElement": false,
+    "HTMLMenuItemElement": false,
+    "HTMLMetaElement": false,
+    "HTMLMeterElement": false,
+    "HTMLModElement": false,
+    "HTMLOListElement": false,
+    "HTMLObjectElement": false,
+    "HTMLOptGroupElement": false,
+    "HTMLOptionElement": false,
+    "Option": false,
+    "HTMLOptionsCollection": false,
+    "HTMLOutputElement": false,
+    "HTMLParagraphElement": false,
+    "HTMLParamElement": false,
+    "HTMLPictureElement": false,
+    "HTMLPreElement": false,
+    "HTMLProgressElement": false,
+    "HTMLQuoteElement": false,
+    "HTMLScriptElement": false,
+    "HTMLSelectElement": false,
+    "HTMLSlotElement": false,
+    "HTMLSourceElement": false,
+    "HTMLSpanElement": false,
+    "HTMLStyleElement": false,
+    "HTMLTableCaptionElement": false,
+    "HTMLTableCellElement": false,
+    "HTMLTableColElement": false,
+    "HTMLTableElement": false,
+    "HTMLTableRowElement": false,
+    "HTMLTableSectionElement": false,
+    "HTMLTemplateElement": false,
+    "HTMLTextAreaElement": false,
+    "HTMLTimeElement": false,
+    "HTMLTitleElement": false,
+    "HTMLTrackElement": false,
+    "HTMLUListElement": false,
+    "HTMLUnknownElement": false,
+    "HTMLVideoElement": false,
+    "HashChangeEvent": false,
+    "Headers": false,
+    "HeapSnapshot": false,
+    "HiddenPluginEvent": false,
+    "History": false,
+    "IDBCursor": false,
+    "IDBCursorWithValue": false,
+    "IDBDatabase": false,
+    "IDBFactory": false,
+    "IDBFileHandle": false,
+    "IDBFileRequest": false,
+    "IDBIndex": false,
+    "IDBKeyRange": false,
+    "IDBLocaleAwareKeyRange": false,
+    "IDBMutableFile": false,
+    "IDBObjectStore": false,
+    "IDBOpenDBRequest": false,
+    "IDBRequest": false,
+    "IDBTransaction": false,
+    "IDBVersionChangeEvent": false,
+    "IIRFilterNode": false,
+    "IdleDeadline": false,
+    "ImageBitmap": false,
+    "ImageBitmapRenderingContext": false,
+    "ImageCapture": false,
+    "ImageCaptureErrorEvent": false,
+    "ImageData": false,
+    "ImageDocument": false,
+    "InputEvent": false,
+    "InspectorFontFace": false,
+    "InspectorUtils": false,
+    "InstallTriggerImpl": false,
+    "IntersectionObserver": false,
+    "IntersectionObserverEntry": false,
+    "KeyEvent": false,
+    "KeyboardEvent": false,
+    "KeyframeEffect": false,
+    "Location": false,
+    "MIDIAccess": false,
+    "MIDIConnectionEvent": false,
+    "MIDIInput": false,
+    "MIDIInputMap": false,
+    "MIDIMessageEvent": false,
+    "MIDIOutput": false,
+    "MIDIOutputMap": false,
+    "MIDIPort": false,
+    "MatchGlob": false,
+    "MatchPattern": false,
+    "MatchPatternSet": false,
+    "MediaCapabilities": false,
+    "MediaCapabilitiesInfo": false,
+    "MediaDeviceInfo": false,
+    "MediaDevices": false,
+    "MediaElementAudioSourceNode": false,
+    "MediaEncryptedEvent": false,
+    "MediaError": false,
+    "MediaKeyError": false,
+    "MediaKeyMessageEvent": false,
+    "MediaKeySession": false,
+    "MediaKeyStatusMap": false,
+    "MediaKeySystemAccess": false,
+    "MediaKeys": false,
+    "MediaList": false,
+    "MediaQueryList": false,
+    "MediaQueryListEvent": false,
+    "MediaRecorder": false,
+    "MediaRecorderErrorEvent": false,
+    "MediaSource": false,
+    "MediaStream": false,
+    "MediaStreamAudioDestinationNode": false,
+    "MediaStreamAudioSourceNode": false,
+    "MediaStreamEvent": false,
+    "MediaStreamTrack": false,
+    "MediaStreamTrackEvent": false,
+    "MerchantValidationEvent": false,
+    "MessageBroadcaster": false,
+    "MessageChannel": false,
+    "MessageEvent": false,
+    "MessageListenerManager": false,
+    "MessagePort": false,
+    "MessageSender": false,
+    "MimeType": false,
+    "MimeTypeArray": false,
+    "MouseEvent": false,
+    "MouseScrollEvent": false,
+    "MozCanvasPrintState": false,
+    "MozDocumentMatcher": false,
+    "MozDocumentObserver": false,
+    "MozQueryInterface": false,
+    "MozSharedMap": false,
+    "MozSharedMapChangeEvent": false,
+    "MozStorageAsyncStatementParams": false,
+    "MozStorageStatementParams": false,
+    "MozStorageStatementRow": false,
+    "MozWritableSharedMap": false,
+    "MutationEvent": false,
+    "MutationObserver": false,
+    "MutationRecord": false,
+    "NamedNodeMap": false,
+    "Navigator": false,
+    "NetworkInformation": false,
+    "Node": false,
+    "NodeFilter": false,
+    "NodeIterator": false,
+    "NodeList": false,
+    "Notification": false,
+    "NotifyPaintEvent": false,
+    "OfflineAudioCompletionEvent": false,
+    "OfflineAudioContext": false,
+    "OfflineResourceList": false,
+    "OffscreenCanvas": false,
+    "OscillatorNode": false,
+    "PageTransitionEvent": false,
+    "PaintRequest": false,
+    "PaintRequestList": false,
+    "PannerNode": false,
+    "ParentProcessMessageManager": false,
+    "ParentSHistory": false,
+    "Path2D": false,
+    "PaymentAddress": false,
+    "PaymentMethodChangeEvent": false,
+    "PaymentRequest": false,
+    "PaymentRequestUpdateEvent": false,
+    "PaymentResponse": false,
+    "PeerConnectionImpl": false,
+    "PeerConnectionObserver": false,
+    "Performance": false,
+    "PerformanceEntry": false,
+    "PerformanceEntryEvent": false,
+    "PerformanceMark": false,
+    "PerformanceMeasure": false,
+    "PerformanceNavigation": false,
+    "PerformanceNavigationTiming": false,
+    "PerformanceObserver": false,
+    "PerformanceObserverEntryList": false,
+    "PerformanceResourceTiming": false,
+    "PerformanceServerTiming": false,
+    "PerformanceTiming": false,
+    "PeriodicWave": false,
+    "PermissionStatus": false,
+    "Permissions": false,
+    "PlacesBookmark": false,
+    "PlacesBookmarkAddition": false,
+    "PlacesEvent": false,
+    "PlacesObservers": false,
+    "PlacesVisit": false,
+    "PlacesWeakCallbackWrapper": false,
+    "Plugin": false,
+    "PluginArray": false,
+    "PluginCrashedEvent": false,
+    "PointerEvent": false,
+    "PopStateEvent": false,
+    "PopupBlockedEvent": false,
+    "PrecompiledScript": false,
+    "Presentation": false,
+    "PresentationAvailability": false,
+    "PresentationConnection": false,
+    "PresentationConnectionAvailableEvent": false,
+    "PresentationConnectionCloseEvent": false,
+    "PresentationConnectionList": false,
+    "PresentationReceiver": false,
+    "PresentationRequest": false,
+    "PrioEncoder": false,
+    "ProcessMessageManager": false,
+    "ProcessingInstruction": false,
+    "ProgressEvent": false,
+    "PromiseDebugging": false,
+    "PromiseRejectionEvent": false,
+    "PublicKeyCredential": false,
+    "PushManager": false,
+    "PushManagerImpl": false,
+    "PushSubscription": false,
+    "PushSubscriptionOptions": false,
+    "RTCCertificate": false,
+    "RTCDTMFSender": false,
+    "RTCDTMFToneChangeEvent": false,
+    "RTCDataChannel": false,
+    "RTCDataChannelEvent": false,
+    "RTCIceCandidate": false,
+    "RTCPeerConnection": false,
+    "RTCPeerConnectionIceEvent": false,
+    "RTCPeerConnectionStatic": false,
+    "RTCRtpReceiver": false,
+    "RTCRtpSender": false,
+    "RTCRtpTransceiver": false,
+    "RTCSessionDescription": false,
+    "RTCStatsReport": false,
+    "RTCTrackEvent": false,
+    "RadioNodeList": false,
+    "Range": false,
+    "Report": false,
+    "ReportBody": false,
+    "ReportingObserver": false,
+    "Request": false,
+    "Response": false,
+    "SVGAElement": false,
+    "SVGAngle": false,
+    "SVGAnimateElement": false,
+    "SVGAnimateMotionElement": false,
+    "SVGAnimateTransformElement": false,
+    "SVGAnimatedAngle": false,
+    "SVGAnimatedBoolean": false,
+    "SVGAnimatedEnumeration": false,
+    "SVGAnimatedInteger": false,
+    "SVGAnimatedLength": false,
+    "SVGAnimatedLengthList": false,
+    "SVGAnimatedNumber": false,
+    "SVGAnimatedNumberList": false,
+    "SVGAnimatedPreserveAspectRatio": false,
+    "SVGAnimatedRect": false,
+    "SVGAnimatedString": false,
+    "SVGAnimatedTransformList": false,
+    "SVGAnimationElement": false,
+    "SVGCircleElement": false,
+    "SVGClipPathElement": false,
+    "SVGComponentTransferFunctionElement": false,
+    "SVGDefsElement": false,
+    "SVGDescElement": false,
+    "SVGElement": false,
+    "SVGEllipseElement": false,
+    "SVGFEBlendElement": false,
+    "SVGFEColorMatrixElement": false,
+    "SVGFEComponentTransferElement": false,
+    "SVGFECompositeElement": false,
+    "SVGFEConvolveMatrixElement": false,
+    "SVGFEDiffuseLightingElement": false,
+    "SVGFEDisplacementMapElement": false,
+    "SVGFEDistantLightElement": false,
+    "SVGFEDropShadowElement": false,
+    "SVGFEFloodElement": false,
+    "SVGFEFuncAElement": false,
+    "SVGFEFuncBElement": false,
+    "SVGFEFuncGElement": false,
+    "SVGFEFuncRElement": false,
+    "SVGFEGaussianBlurElement": false,
+    "SVGFEImageElement": false,
+    "SVGFEMergeElement": false,
+    "SVGFEMergeNodeElement": false,
+    "SVGFEMorphologyElement": false,
+    "SVGFEOffsetElement": false,
+    "SVGFEPointLightElement": false,
+    "SVGFESpecularLightingElement": false,
+    "SVGFESpotLightElement": false,
+    "SVGFETileElement": false,
+    "SVGFETurbulenceElement": false,
+    "SVGFilterElement": false,
+    "SVGForeignObjectElement": false,
+    "SVGGElement": false,
+    "SVGGeometryElement": false,
+    "SVGGradientElement": false,
+    "SVGGraphicsElement": false,
+    "SVGImageElement": false,
+    "SVGLength": false,
+    "SVGLengthList": false,
+    "SVGLineElement": false,
+    "SVGLinearGradientElement": false,
+    "SVGMPathElement": false,
+    "SVGMarkerElement": false,
+    "SVGMaskElement": false,
+    "SVGMatrix": false,
+    "SVGMetadataElement": false,
+    "SVGNumber": false,
+    "SVGNumberList": false,
+    "SVGPathElement": false,
+    "SVGPathSegList": false,
+    "SVGPatternElement": false,
+    "SVGPoint": false,
+    "SVGPointList": false,
+    "SVGPolygonElement": false,
+    "SVGPolylineElement": false,
+    "SVGPreserveAspectRatio": false,
+    "SVGRadialGradientElement": false,
+    "SVGRect": false,
+    "SVGRectElement": false,
+    "SVGSVGElement": false,
+    "SVGScriptElement": false,
+    "SVGSetElement": false,
+    "SVGStopElement": false,
+    "SVGStringList": false,
+    "SVGStyleElement": false,
+    "SVGSwitchElement": false,
+    "SVGSymbolElement": false,
+    "SVGTSpanElement": false,
+    "SVGTextContentElement": false,
+    "SVGTextElement": false,
+    "SVGTextPathElement": false,
+    "SVGTextPositioningElement": false,
+    "SVGTitleElement": false,
+    "SVGTransform": false,
+    "SVGTransformList": false,
+    "SVGUnitTypes": false,
+    "SVGUseElement": false,
+    "SVGViewElement": false,
+    "SVGZoomAndPan": false,
+    "Screen": false,
+    "ScreenLuminance": false,
+    "ScreenOrientation": false,
+    "ScriptProcessorNode": false,
+    "ScrollAreaEvent": false,
+    "ScrollViewChangeEvent": false,
+    "SecurityPolicyViolationEvent": false,
+    "Selection": false,
+    "ServiceWorker": false,
+    "ServiceWorkerContainer": false,
+    "ServiceWorkerRegistration": false,
+    "ShadowRoot": false,
+    "SharedWorker": false,
+    "SimpleGestureEvent": false,
+    "SourceBuffer": false,
+    "SourceBufferList": false,
+    "SpeechGrammar": false,
+    "SpeechGrammarList": false,
+    "SpeechRecognition": false,
+    "SpeechRecognitionAlternative": false,
+    "SpeechRecognitionError": false,
+    "SpeechRecognitionEvent": false,
+    "SpeechRecognitionResult": false,
+    "SpeechRecognitionResultList": false,
+    "SpeechSynthesis": false,
+    "SpeechSynthesisErrorEvent": false,
+    "SpeechSynthesisEvent": false,
+    "SpeechSynthesisUtterance": false,
+    "SpeechSynthesisVoice": false,
+    "StereoPannerNode": false,
+    "Storage": false,
+    "StorageEvent": false,
+    "StorageManager": false,
+    "StreamFilter": false,
+    "StreamFilterDataEvent": false,
+    "StructuredCloneHolder": false,
+    "StructuredCloneTester": false,
+    "StyleRuleChangeEvent": false,
+    "StyleSheet": false,
+    "StyleSheetApplicableStateChangeEvent": false,
+    "StyleSheetChangeEvent": false,
+    "StyleSheetList": false,
+    "SubtleCrypto": false,
+    "SyncMessageSender": false,
+    "TCPServerSocket": false,
+    "TCPServerSocketEvent": false,
+    "TCPSocket": false,
+    "TCPSocketErrorEvent": false,
+    "TCPSocketEvent": false,
+    "TelemetryStopwatch": false,
+    "TestingDeprecatedInterface": false,
+    "Text": false,
+    "TextClause": false,
+    "TextDecoder": false,
+    "TextEncoder": false,
+    "TextMetrics": false,
+    "TextTrack": false,
+    "TextTrackCue": false,
+    "TextTrackCueList": false,
+    "TextTrackList": false,
+    "TimeEvent": false,
+    "TimeRanges": false,
+    "Touch": false,
+    "TouchEvent": false,
+    "TouchList": false,
+    "TrackEvent": false,
+    "TransceiverImpl": false,
+    "TransitionEvent": false,
+    "TreeColumn": false,
+    "TreeColumns": false,
+    "TreeContentView": false,
+    "TreeWalker": false,
+    "U2F": false,
+    "UDPMessageEvent": false,
+    "UDPSocket": false,
+    "UIEvent": false,
+    "URL": false,
+    "URLSearchParams": false,
+    "UserProximityEvent": false,
+    "VRDisplay": false,
+    "VRDisplayCapabilities": false,
+    "VRDisplayEvent": false,
+    "VREyeParameters": false,
+    "VRFieldOfView": false,
+    "VRFrameData": false,
+    "VRMockController": false,
+    "VRMockDisplay": false,
+    "VRPose": false,
+    "VRServiceTest": false,
+    "VRStageParameters": false,
+    "VRSubmitFrameResult": false,
+    "VTTCue": false,
+    "VTTRegion": false,
+    "ValidityState": false,
+    "VideoPlaybackQuality": false,
+    "VideoTrack": false,
+    "VideoTrackList": false,
+    "VisualViewport": false,
+    "WaveShaperNode": false,
+    "WebExtensionContentScript": false,
+    "WebExtensionPolicy": false,
+    "WebGL2RenderingContext": false,
+    "WebGLActiveInfo": false,
+    "WebGLBuffer": false,
+    "WebGLContextEvent": false,
+    "WebGLFramebuffer": false,
+    "WebGLProgram": false,
+    "WebGLQuery": false,
+    "WebGLRenderbuffer": false,
+    "WebGLRenderingContext": false,
+    "WebGLSampler": false,
+    "WebGLShader": false,
+    "WebGLShaderPrecisionFormat": false,
+    "WebGLSync": false,
+    "WebGLTexture": false,
+    "WebGLTransformFeedback": false,
+    "WebGLUniformLocation": false,
+    "WebGLVertexArrayObject": false,
+    "WebGPU": false,
+    "WebGPUAdapter": false,
+    "WebGPUAttachmentState": false,
+    "WebGPUBindGroup": false,
+    "WebGPUBindGroupLayout": false,
+    "WebGPUBindingType": false,
+    "WebGPUBlendFactor": false,
+    "WebGPUBlendOperation": false,
+    "WebGPUBlendState": false,
+    "WebGPUBuffer": false,
+    "WebGPUBufferUsage": false,
+    "WebGPUColorWriteBits": false,
+    "WebGPUCommandBuffer": false,
+    "WebGPUCommandEncoder": false,
+    "WebGPUCompareFunction": false,
+    "WebGPUComputePipeline": false,
+    "WebGPUDepthStencilState": false,
+    "WebGPUDevice": false,
+    "WebGPUFence": false,
+    "WebGPUFilterMode": false,
+    "WebGPUIndexFormat": false,
+    "WebGPUInputState": false,
+    "WebGPUInputStepMode": false,
+    "WebGPULoadOp": false,
+    "WebGPULogEntry": false,
+    "WebGPUPipelineLayout": false,
+    "WebGPUPrimitiveTopology": false,
+    "WebGPUQueue": false,
+    "WebGPURenderPipeline": false,
+    "WebGPUSampler": false,
+    "WebGPUShaderModule": false,
+    "WebGPUShaderStage": false,
+    "WebGPUShaderStageBit": false,
+    "WebGPUStencilOperation": false,
+    "WebGPUStoreOp": false,
+    "WebGPUSwapChain": false,
+    "WebGPUTexture": false,
+    "WebGPUTextureDimension": false,
+    "WebGPUTextureFormat": false,
+    "WebGPUTextureUsage": false,
+    "WebGPUTextureView": false,
+    "WebGPUVertexFormat": false,
+    "WebKitCSSMatrix": false,
+    "WebSocket": false,
+    "WebrtcGlobalInformation": false,
+    "WheelEvent": false,
+    "Window": false,
+    "WindowRoot": false,
+    "Worker": false,
+    "Worklet": false,
+    "XMLDocument": false,
+    "XMLHttpRequest": false,
+    "XMLHttpRequestEventTarget": false,
+    "XMLHttpRequestUpload": false,
+    "XMLSerializer": false,
+    "XPathEvaluator": false,
+    "XPathExpression": false,
+    "XPathResult": false,
+    "XSLTProcessor": false,
+    "XULCommandEvent": false,
+    "XULDocument": false,
+    "XULElement": false,
+    "XULFrameElement": false,
+    "XULMenuElement": false,
+    "XULPopupElement": false,
+    "XULScrollElement": false,
+    "XULTextElement": false,
+    "console": false,
+    "mozRTCIceCandidate": false,
+    "mozRTCPeerConnection": false,
+    "mozRTCSessionDescription": false,
+  },
+};
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/index.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/index.js
@@ -20,16 +20,17 @@ module.exports = {
     "xpcshell-test": require("../lib/configs/xpcshell-test"),
   },
   environments: {
     "browser-window": require("../lib/environments/browser-window.js"),
     "chrome-worker": require("../lib/environments/chrome-worker.js"),
     "frame-script": require("../lib/environments/frame-script.js"),
     "jsm": require("../lib/environments/jsm.js"),
     "simpletest": require("../lib/environments/simpletest.js"),
+    "privileged": require("../lib/environments/privileged.js"),
   },
   processors: {
     ".xml": require("../lib/processors/xbl-bindings"),
   },
   rules: {
     "avoid-Date-timing": require("../lib/rules/avoid-Date-timing"),
     "avoid-removeChild": require("../lib/rules/avoid-removeChild"),
     "balanced-listeners": require("../lib/rules/balanced-listeners"),
--- a/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "0.16.3",
+  "version": "1.0.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
     "acorn": {
       "version": "5.7.1",
       "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",
       "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==",
       "dev": true
--- a/tools/lint/eslint/eslint-plugin-mozilla/package.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "0.16.3",
+  "version": "1.0.0",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],