Bug 1273653 - Fix ESLint errors in devtools/client/shared/(components|redux). r=tromey
authorTim Nguyen <ntim.bugs@gmail.com>
Tue, 17 May 2016 23:20:14 +0200
changeset 297745 0fff370636c2b5ff1ac268b6d3d34cd95ba2068b
parent 297744 67eb2faeb2ab2d00f70cda1148baa46a190ccd88
child 297746 f79314b1a23fa5fd403fbcf97b81a59a800d9614
push id30266
push userryanvm@gmail.com
push dateWed, 18 May 2016 15:57:57 +0000
treeherderautoland@47b83c8478a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstromey
bugs1273653
milestone49.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 1273653 - Fix ESLint errors in devtools/client/shared/(components|redux). r=tromey MozReview-Commit-ID: 5hY0uII6wf8
.eslintignore
devtools/client/shared/components/frame.js
devtools/client/shared/components/h-split-box.js
devtools/client/shared/components/notification-box.js
devtools/client/shared/components/reps/array.js
devtools/client/shared/components/reps/attribute.js
devtools/client/shared/components/reps/caption.js
devtools/client/shared/components/reps/date-time.js
devtools/client/shared/components/reps/document.js
devtools/client/shared/components/reps/event.js
devtools/client/shared/components/reps/function.js
devtools/client/shared/components/reps/grip-array.js
devtools/client/shared/components/reps/grip.js
devtools/client/shared/components/reps/named-node-map.js
devtools/client/shared/components/reps/null.js
devtools/client/shared/components/reps/number.js
devtools/client/shared/components/reps/object-box.js
devtools/client/shared/components/reps/object-link.js
devtools/client/shared/components/reps/object-with-text.js
devtools/client/shared/components/reps/object-with-url.js
devtools/client/shared/components/reps/object.js
devtools/client/shared/components/reps/regexp.js
devtools/client/shared/components/reps/rep-utils.js
devtools/client/shared/components/reps/rep.js
devtools/client/shared/components/reps/string.js
devtools/client/shared/components/reps/stylesheet.js
devtools/client/shared/components/reps/text-node.js
devtools/client/shared/components/reps/undefined.js
devtools/client/shared/components/reps/url.js
devtools/client/shared/components/reps/window.js
devtools/client/shared/components/tree.js
devtools/client/shared/components/tree/label-cell.js
devtools/client/shared/components/tree/object-provider.js
devtools/client/shared/components/tree/tree-cell.js
devtools/client/shared/components/tree/tree-header.js
devtools/client/shared/components/tree/tree-row.js
devtools/client/shared/components/tree/tree-view.js
devtools/client/shared/redux/create-store.js
devtools/client/shared/redux/middleware/history.js
devtools/client/shared/redux/middleware/promise.js
devtools/client/shared/redux/middleware/task.js
devtools/client/shared/redux/middleware/test/head.js
devtools/client/shared/redux/middleware/test/test_middleware-task-01.js
devtools/client/shared/redux/middleware/test/test_middleware-task-02.js
devtools/client/shared/redux/middleware/test/test_middleware-task-03.js
devtools/client/shared/redux/middleware/thunk.js
devtools/client/shared/redux/middleware/wait-service.js
devtools/client/shared/redux/non-react-subscriber.js
--- a/.eslintignore
+++ b/.eslintignore
@@ -98,20 +98,19 @@ devtools/client/responsivedesign/**
 devtools/client/scratchpad/**
 devtools/client/shadereditor/**
 devtools/client/shared/*.js
 devtools/client/shared/*.jsm
 !devtools/client/shared/css-angle.js
 !devtools/client/shared/css-color.js
 !devtools/client/shared/css-color-db.js
 !devtools/client/shared/css-parsing-utils.js
-devtools/client/shared/components/**
-devtools/client/shared/redux/**
+devtools/client/shared/components/test/**
+devtools/client/shared/redux/middleware/test/**
 devtools/client/shared/test/**
-devtools/client/shared/vendor/**
 devtools/client/shared/widgets/**
 devtools/client/sourceeditor/**
 devtools/client/webaudioeditor/**
 devtools/client/webconsole/**
 !devtools/client/webconsole/panel.js
 !devtools/client/webconsole/jsterm.js
 devtools/client/webide/**
 devtools/server/**
--- a/devtools/client/shared/components/frame.js
+++ b/devtools/client/shared/components/frame.js
@@ -6,16 +6,18 @@
 
 const { DOM: dom, createClass, PropTypes } = require("devtools/client/shared/vendor/react");
 const { getSourceNames, parseURL, isScratchpadScheme } = require("devtools/client/shared/source-utils");
 const { LocalizationHelper } = require("devtools/client/shared/l10n");
 
 const l10n = new LocalizationHelper("chrome://devtools/locale/components.properties");
 
 module.exports = createClass({
+  displayName: "Frame",
+
   propTypes: {
     // SavedFrame, or an object containing all the required properties.
     frame: PropTypes.shape({
       functionDisplayName: PropTypes.string,
       source: PropTypes.string.isRequired,
       line: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
       column: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
     }).isRequired,
@@ -29,18 +31,16 @@ module.exports = createClass({
 
   getDefaultProps() {
     return {
       showFunctionName: false,
       showHost: false,
     };
   },
 
-  displayName: "Frame",
-
   render() {
     let { onClick, frame, showFunctionName, showHost } = this.props;
     let source = frame.source ? String(frame.source) : "";
     let line = frame.line != void 0 ? Number(frame.line) : null;
     let column = frame.column != void 0 ? Number(frame.column) : null;
 
     const { short, long, host } = getSourceNames(source);
     // Reparse the URL to determine if we should link this; `getSourceNames`
@@ -67,32 +67,35 @@ module.exports = createClass({
 
     let attributes = {
       "data-url": long,
       className: "frame-link",
     };
 
     if (showFunctionName && frame.functionDisplayName) {
       elements.push(
-        dom.span({ className: "frame-link-function-display-name" }, frame.functionDisplayName)
+        dom.span({ className: "frame-link-function-display-name" },
+                 frame.functionDisplayName)
       );
     }
 
     sourceElements.push(dom.span({
       className: "frame-link-filename",
     }, short));
 
     // If source is linkable, and we have a line number > 0
     if (isLinkable && line) {
       sourceElements.push(dom.span({ className: "frame-link-colon" }, ":"));
       sourceElements.push(dom.span({ className: "frame-link-line" }, line));
       // Intentionally exclude 0
       if (column) {
         sourceElements.push(dom.span({ className: "frame-link-colon" }, ":"));
-        sourceElements.push(dom.span({ className: "frame-link-column" }, column));
+        sourceElements.push(
+          dom.span({ className: "frame-link-column" }, column)
+        );
         // Add `data-column` attribute for testing
         attributes["data-column"] = column;
       }
 
       // Add `data-line` attribute for testing
       attributes["data-line"] = line;
     }
 
--- a/devtools/client/shared/components/h-split-box.js
+++ b/devtools/client/shared/components/h-split-box.js
@@ -1,12 +1,15 @@
 /* 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/. */
 
+/* eslint-env browser */
+"use strict";
+
 // A box with a start and a end pane, separated by a dragable splitter that
 // allows the user to resize the relative widths of the panes.
 //
 //     +-----------------------+---------------------+
 //     |                       |                     |
 //     |                       |                     |
 //     |                       S                     |
 //     |      Start Pane       p     End Pane        |
@@ -25,30 +28,16 @@ const {
   createClass,
   PropTypes,
 } = require("devtools/client/shared/vendor/react");
 const { assert } = require("devtools/shared/DevToolsUtils");
 
 module.exports = createClass({
   displayName: "HSplitBox",
 
-  getDefaultProps() {
-    return {
-      startWidth: 0.5,
-      minStartWidth: "20px",
-      minEndWidth: "20px",
-    };
-  },
-
-  getInitialState() {
-    return {
-      mouseDown: false
-    };
-  },
-
   propTypes: {
     // The contents of the start pane.
     start: PropTypes.any.isRequired,
 
     // The contents of the end pane.
     end: PropTypes.any.isRequired,
 
     // The relative width of the start pane, expressed as a number between 0 and
@@ -63,16 +52,44 @@ module.exports = createClass({
     minEndWidth: PropTypes.any,
 
     // A callback fired when the user drags the splitter to resize the relative
     // pane widths. The function is passed the startWidth value that would put
     // the splitter underneath the users mouse.
     onResize: PropTypes.func.isRequired,
   },
 
+  getDefaultProps() {
+    return {
+      startWidth: 0.5,
+      minStartWidth: "20px",
+      minEndWidth: "20px",
+    };
+  },
+
+  getInitialState() {
+    return {
+      mouseDown: false
+    };
+  },
+
+  componentDidMount() {
+    document.defaultView.top.addEventListener("mouseup", this._onMouseUp,
+                                              false);
+    document.defaultView.top.addEventListener("mousemove", this._onMouseMove,
+                                              false);
+  },
+
+  componentWillUnmount() {
+    document.defaultView.top.removeEventListener("mouseup", this._onMouseUp,
+                                                 false);
+    document.defaultView.top.removeEventListener("mousemove", this._onMouseMove,
+                                                 false);
+  },
+
   _onMouseDown(event) {
     if (event.button !== 0) {
       return;
     }
 
     this.setState({ mouseDown: true });
     event.preventDefault();
   },
@@ -95,31 +112,22 @@ module.exports = createClass({
     const { left, right } = rect;
     const width = right - left;
     const relative = event.clientX - left;
     this.props.onResize(relative / width);
 
     event.preventDefault();
   },
 
-  componentDidMount() {
-    document.defaultView.top.addEventListener("mouseup", this._onMouseUp, false);
-    document.defaultView.top.addEventListener("mousemove", this._onMouseMove, false);
-  },
-
-  componentWillUnmount() {
-    document.defaultView.top.removeEventListener("mouseup", this._onMouseUp, false);
-    document.defaultView.top.removeEventListener("mousemove", this._onMouseMove, false);
-  },
-
   render() {
+    /* eslint-disable no-shadow */
     const { start, end, startWidth, minStartWidth, minEndWidth } = this.props;
-    assert(0 <= startWidth && startWidth <= 1,
+    assert(startWidth => 0 && startWidth <= 1,
            "0 <= this.props.startWidth <= 1");
-
+    /* eslint-enable */
     return dom.div(
       {
         className: "h-split-box",
         ref: "box",
       },
 
       dom.div(
         {
--- a/devtools/client/shared/components/notification-box.js
+++ b/devtools/client/shared/components/notification-box.js
@@ -28,16 +28,18 @@ const PriorityLevels = {
 /**
  * This component represents Notification Box - HTML alternative for
  * <xul:notifictionbox> binding.
  *
  * See also MDN for more info about <xul:notificationbox>:
  * https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/notificationbox
  */
 var NotificationBox = createClass({
+  displayName: "NotificationBox",
+
   propTypes: {
     // List of notifications appended into the box.
     notifications: PropTypes.arrayOf(PropTypes.shape({
       // label to appear on the notification.
       label: PropTypes.string.isRequired,
 
       // Value used to identify the notification
       value: PropTypes.string.isRequired,
@@ -69,18 +71,16 @@ var NotificationBox = createClass({
       })),
 
       // A function to call to notify you of interesting things that happen
       // with the notification box.
       eventCallback: PropTypes.func,
     })),
   },
 
-  displayName: "NotificationBox",
-
   getInitialState() {
     return {
       notifications: new Immutable.OrderedMap()
     };
   },
 
   /**
    * Create a new notification and display it. If another notification is
--- a/devtools/client/shared/components/reps/array.js
+++ b/devtools/client/shared/components/reps/array.js
@@ -2,81 +2,38 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { Caption } = createFactories(require("./caption"));
 
   // Shortcuts
   const DOM = React.DOM;
 
   /**
    * Renders an array. The array is enclosed by left and right bracket
    * and the max number of rendered items depends on the current mode.
    */
   let ArrayRep = React.createClass({
     displayName: "ArrayRep",
 
-    render: function() {
-      let mode = this.props.mode || "short";
-      let object = this.props.object;
-      let items;
-
-      if (mode == "tiny") {
-        items = DOM.span({className: "length"}, object.length);
-      } else {
-        let max = (mode == "short") ? 3 : 300;
-        items = this.arrayIterator(object, max);
-      }
-
-      return (
-        ObjectBox({
-          className: "array",
-          onClick: this.onToggleProperties},
-          DOM.a({
-            className: "objectLink",
-            onclick: this.onClickBracket},
-            DOM.span({
-              className: "arrayLeftBracket",
-              role: "presentation"},
-              "["
-            )
-          ),
-          items,
-          DOM.a({
-            className: "objectLink",
-            onclick: this.onClickBracket},
-            DOM.span({
-              className: "arrayRightBracket",
-              role: "presentation"},
-              "]"
-            )
-          ),
-          DOM.span({
-            className: "arrayProperties",
-            role: "group"}
-          )
-        )
-      );
-    },
-
-    getTitle: function(object, context) {
+    getTitle: function (object, context) {
       return "[" + object.length + "]";
     },
 
-    arrayIterator: function(array, max) {
+    arrayIterator: function (array, max) {
       let items = [];
       let delim;
 
       for (let i = 0; i < array.length && i <= max; i++) {
         try {
           let value = array[i];
 
           delim = (i == array.length - 1 ? "" : ", ");
@@ -120,17 +77,17 @@ define(function(require, exports, module
      * displayed in extra expandable section.
      *
      * Example array with a custom property.
      * let arr = [0, 1];
      * arr.myProp = "Hello";
      *
      * @param {Array} array The array object.
      */
-    hasSpecialProperties: function(array) {
+    hasSpecialProperties: function (array) {
       function isInteger(x) {
         let y = parseInt(x, 10);
         if (isNaN(y)) {
           return false;
         }
         return x === y.toString();
       }
 
@@ -149,30 +106,73 @@ define(function(require, exports, module
         }
       }
 
       return false;
     },
 
     // Event Handlers
 
-    onToggleProperties: function(event) {
+    onToggleProperties: function (event) {
+    },
+
+    onClickBracket: function (event) {
     },
 
-    onClickBracket: function(event) {
-    }
+    render: function () {
+      let mode = this.props.mode || "short";
+      let object = this.props.object;
+      let items;
+
+      if (mode == "tiny") {
+        items = DOM.span({className: "length"}, object.length);
+      } else {
+        let max = (mode == "short") ? 3 : 300;
+        items = this.arrayIterator(object, max);
+      }
+
+      return (
+        ObjectBox({
+          className: "array",
+          onClick: this.onToggleProperties},
+          DOM.a({
+            className: "objectLink",
+            onclick: this.onClickBracket},
+            DOM.span({
+              className: "arrayLeftBracket",
+              role: "presentation"},
+              "["
+            )
+          ),
+          items,
+          DOM.a({
+            className: "objectLink",
+            onclick: this.onClickBracket},
+            DOM.span({
+              className: "arrayRightBracket",
+              role: "presentation"},
+              "]"
+            )
+          ),
+          DOM.span({
+            className: "arrayProperties",
+            role: "group"}
+          )
+        )
+      );
+    },
   });
 
   /**
    * Renders array item. Individual values are separated by a comma.
    */
   let ItemRep = React.createFactory(React.createClass({
     displayName: "ItemRep",
 
-    render: function() {
+    render: function () {
       const { Rep } = createFactories(require("./rep"));
 
       let object = this.props.object;
       let delim = this.props.delim;
       return (
         DOM.span({},
           Rep({object: object}),
           delim
@@ -182,17 +182,17 @@ define(function(require, exports, module
   }));
 
   /**
    * Renders cycle references in an array.
    */
   let Reference = React.createFactory(React.createClass({
     displayName: "Reference",
 
-    render: function() {
+    render: function () {
       let tooltip = "Circular reference";
       return (
         DOM.span({title: tooltip},
           "[...]")
       );
     }
   }));
 
--- a/devtools/client/shared/components/reps/attribute.js
+++ b/devtools/client/shared/components/reps/attribute.js
@@ -1,44 +1,44 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
   const { StringRep } = require("./string");
 
   // Shortcuts
   const { span } = React.DOM;
   const { rep: StringRepFactory } = createFactories(StringRep);
 
   /**
    * Renders DOM attribute
    */
   let Attribute = React.createClass({
+    displayName: "Attr",
+
     propTypes: {
       object: React.PropTypes.object.isRequired
     },
 
-    displayName: "Attr",
-
-    getTitle: function(grip) {
+    getTitle: function (grip) {
       return grip.preview.nodeName;
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       let value = grip.preview.value;
 
       return (
         ObjectLink({className: "Attr"},
           span({},
             span({className: "attrTitle"},
               this.getTitle(grip)
--- a/devtools/client/shared/components/reps/caption.js
+++ b/devtools/client/shared/components/reps/caption.js
@@ -2,29 +2,29 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const DOM = React.DOM;
 
   /**
    * Renders a caption. This template is used by other components
    * that needs to distinguish between a simple text/value and a label.
    */
   const Caption = React.createClass({
     displayName: "Caption",
 
-    render: function() {
+    render: function () {
       return (
         DOM.span({"className": "caption"}, this.props.object)
       );
     },
   });
 
   // Exports from this module
   exports.Caption = Caption;
--- a/devtools/client/shared/components/reps/date-time.js
+++ b/devtools/client/shared/components/reps/date-time.js
@@ -1,42 +1,42 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Used to render JS built-in Date() object.
    */
   let DateTime = React.createClass({
+    displayName: "Date",
+
     propTypes: {
       object: React.PropTypes.object.isRequired
     },
 
-    displayName: "Date",
-
-    getTitle: function(grip) {
+    getTitle: function (grip) {
       return new Date(grip.preview.timestamp).toString();
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       return (
         ObjectLink({className: "Date"},
           span({className: "objectTitle"},
             this.getTitle(grip)
           )
         )
       );
--- a/devtools/client/shared/components/reps/document.js
+++ b/devtools/client/shared/components/reps/document.js
@@ -1,52 +1,52 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { getFileName } = require("./url");
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Renders DOM document object.
    */
   let Document = React.createClass({
+    displayName: "Document",
+
     propTypes: {
       object: React.PropTypes.object.isRequired
     },
 
-    displayName: "Document",
-
-    getLocation: function(grip) {
+    getLocation: function (grip) {
       let location = grip.preview.location;
       return location ? getFileName(location) : "";
     },
 
-    getTitle: function(win, context) {
+    getTitle: function (win, context) {
       return "document";
     },
 
-    getTooltip: function(doc) {
+    getTooltip: function (doc) {
       return doc.location.href;
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
 
       return (
         ObjectBox({className: "object"},
           span({className: "objectPropValue"},
             this.getLocation(grip)
           )
         )
--- a/devtools/client/shared/components/reps/event.js
+++ b/devtools/client/shared/components/reps/event.js
@@ -1,52 +1,52 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
 
   /**
    * Renders DOM event objects.
    */
   let Event = React.createClass({
+    displayName: "event",
+
     propTypes: {
       object: React.PropTypes.object.isRequired
     },
 
-    displayName: "event",
-
-    summarizeEvent: function(grip) {
+    summarizeEvent: function (grip) {
       let info = [grip.preview.type, " "];
 
       let eventFamily = grip.class;
       let props = grip.preview.properties;
 
       if (eventFamily == "MouseEvent") {
         info.push("clientX=", props.clientX, ", clientY=", props.clientY);
       } else if (eventFamily == "KeyboardEvent") {
         info.push("charCode=", props.charCode, ", keyCode=", props.keyCode);
       } else if (eventFamily == "MessageEvent") {
         info.push("origin=", props.origin, ", data=", props.data);
       }
 
       return info.join("");
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       return (
         ObjectLink({className: "event"},
           this.summarizeEvent(grip)
         )
       );
     },
   });
--- a/devtools/client/shared/components/reps/function.js
+++ b/devtools/client/shared/components/reps/function.js
@@ -1,41 +1,41 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
   const { cropString } = require("./string");
 
   /**
    * This component represents a template for Function objects.
    */
   let Func = React.createClass({
+    displayName: "Func",
+
     propTypes: {
       object: React.PropTypes.object.isRequired
     },
 
-    displayName: "Func",
-
-    summarizeFunction: function(grip) {
+    summarizeFunction: function (grip) {
       let name = grip.displayName || grip.name || "function";
       return cropString(name + "()", 100);
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
 
       return (
         ObjectLink({className: "function"},
           this.summarizeFunction(grip)
         )
       );
     },
--- a/devtools/client/shared/components/reps/grip-array.js
+++ b/devtools/client/shared/components/reps/grip-array.js
@@ -2,48 +2,48 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { Caption } = createFactories(require("./caption"));
 
   // Shortcuts
   const { a, span } = React.DOM;
 
   /**
    * Renders an array. The array is enclosed by left and right bracket
    * and the max number of rendered items depends on the current mode.
    */
   let GripArray = React.createClass({
+    displayName: "GripArray",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
       mode: React.PropTypes.string,
       provider: React.PropTypes.object,
     },
 
-    displayName: "GripArray",
-
-    getLength: function(grip) {
+    getLength: function (grip) {
       return grip.preview ? grip.preview.length : 0;
     },
 
-    getTitle: function(object, context) {
+    getTitle: function (object, context) {
       return "[" + object.length + "]";
     },
 
-    arrayIterator: function(grip, max) {
+    arrayIterator: function (grip, max) {
       let items = [];
 
       if (!grip.preview || !grip.preview.length) {
         return items;
       }
 
       let array = grip.preview.items;
       if (!array) {
@@ -91,29 +91,29 @@ define(function(require, exports, module
           key: "more",
           object: "more..."}
         ));
       }
 
       return items;
     },
 
-    hasSpecialProperties: function(array) {
+    hasSpecialProperties: function (array) {
       return false;
     },
 
     // Event Handlers
 
-    onToggleProperties: function(event) {
+    onToggleProperties: function (event) {
     },
 
-    onClickBracket: function(event) {
+    onClickBracket: function (event) {
     },
 
-    render: function() {
+    render: function () {
       let mode = this.props.mode || "short";
       let object = this.props.object;
 
       let items;
 
       if (mode == "tiny") {
         items = span({className: "length"}, this.getLength(object));
       } else {
@@ -153,23 +153,23 @@ define(function(require, exports, module
     },
   });
 
   /**
    * Renders array item. Individual values are separated by
    * a delimiter (a comma by default).
    */
   let GripArrayItem = React.createFactory(React.createClass({
+    displayName: "GripArrayItem",
+
     propTypes: {
       delim: React.PropTypes.string,
     },
 
-    displayName: "GripArrayItem",
-
-    render: function() {
+    render: function () {
       let { Rep } = createFactories(require("./rep"));
 
       return (
         span({},
           Rep(Object.assign({}, this.props, {
             mode: "tiny"
           })),
           this.props.delim
@@ -179,17 +179,17 @@ define(function(require, exports, module
   }));
 
   /**
    * Renders cycle references in an array.
    */
   let Reference = React.createFactory(React.createClass({
     displayName: "Reference",
 
-    render: function() {
+    render: function () {
       return (
         span({title: "Circular reference"},
           "[...]"
         )
       );
     }
   }));
 
--- a/devtools/client/shared/components/reps/grip.js
+++ b/devtools/client/shared/components/reps/grip.js
@@ -1,62 +1,62 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Dependencies
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { Caption } = createFactories(require("./caption"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * @template TODO docs
    */
   const Grip = React.createClass({
+    displayName: "Grip",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
       mode: React.PropTypes.string,
     },
 
-    displayName: "Grip",
-
-    getTitle: function() {
+    getTitle: function () {
       return "";
     },
 
-    longPropIterator: function(object) {
+    longPropIterator: function (object) {
       try {
         return this.propIterator(object, 100);
       } catch (err) {
         console.error(err);
       }
       return [];
     },
 
-    shortPropIterator: function(object) {
+    shortPropIterator: function (object) {
       try {
         return this.propIterator(object, 3);
       } catch (err) {
         console.error(err);
       }
       return [];
     },
 
-    propIterator: function(object, max) {
+    propIterator: function (object, max) {
       // Property filter. Show only interesting properties to the user.
       let isInterestingProp = (type, value) => {
         return (
           type == "boolean" ||
           type == "number" ||
           type == "string" ||
           type == "object"
         );
@@ -92,17 +92,17 @@ define(function(require, exports, module
         props[last] = React.cloneElement(props[last], {
           delim: ""
         });
       }
 
       return props;
     },
 
-    getProps: function(object, max, filter) {
+    getProps: function (object, max, filter) {
       let props = [];
 
       max = max || 3;
       if (!object) {
         return props;
       }
 
       try {
@@ -134,17 +134,17 @@ define(function(require, exports, module
         }
       } catch (err) {
         console.error(err);
       }
 
       return props;
     },
 
-    render: function() {
+    render: function () {
       let object = this.props.object;
       let props = this.shortPropIterator(object);
 
       if (this.props.mode == "tiny" || !props.length) {
         return (
           ObjectBox({className: "object"},
             span({className: "objectTitle"}, this.getTitle(object)),
             span({className: "objectLeftBrace", role: "presentation"}, "{}")
@@ -162,25 +162,25 @@ define(function(require, exports, module
       );
     },
   });
 
   /**
    * Property for a grip object.
    */
   let PropRep = React.createFactory(React.createClass({
+    displayName: "PropRep",
+
     propTypes: {
       name: React.PropTypes.string,
       equal: React.PropTypes.string,
       delim: React.PropTypes.string,
     },
 
-    displayName: "PropRep",
-
-    render: function() {
+    render: function () {
       let { Rep } = createFactories(require("./rep"));
 
       return (
         span({},
           span({
             "className": "nodeName"},
             this.props.name),
           span({
--- a/devtools/client/shared/components/reps/named-node-map.js
+++ b/devtools/client/shared/components/reps/named-node-map.js
@@ -1,65 +1,66 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
   const { Caption } = createFactories(require("./caption"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Used to render a map of values provided as a grip.
    */
   let NamedNodeMap = React.createClass({
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
       mode: React.PropTypes.string,
       provider: React.PropTypes.object,
     },
 
     className: "NamedNodeMap",
 
-    getLength: function(object) {
+    getLength: function (object) {
       return object.preview.length;
     },
 
-    getTitle: function(object) {
+    getTitle: function (object) {
       return object.class ? object.class : "";
     },
 
-    getItems: function(array, max) {
+    getItems: function (array, max) {
       let items = this.propIterator(array, max);
 
       items = items.map(item => PropRep(item));
 
       if (items.length > max + 1) {
         items.pop();
         items.push(Caption({
           key: "more",
           object: "more...",
         }));
       }
 
       return items;
     },
 
-    propIterator: function(grip, max) {
+    propIterator: function (grip, max) {
       max = max || 3;
 
       let props = [];
 
       let provider = this.props.provider;
       if (!provider) {
         return props;
       }
@@ -80,17 +81,17 @@ define(function(require, exports, module
           equal: ": ",
           delim: ", ",
         }));
       }
 
       return props;
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       let mode = this.props.mode;
 
       let items;
       if (mode == "tiny") {
         items = this.getLength(grip);
       } else {
         let max = (mode == "short") ? 3 : 100;
@@ -117,24 +118,24 @@ define(function(require, exports, module
       );
     },
   });
 
   /**
    * Property for a grip object.
    */
   let PropRep = React.createFactory(React.createClass({
+    displayName: "PropRep",
+
     propTypes: {
       equal: React.PropTypes.string,
       delim: React.PropTypes.string,
     },
 
-    displayName: "PropRep",
-
-    render: function() {
+    render: function () {
       const { Rep } = createFactories(require("./rep"));
 
       return (
         span({},
           span({
             className: "nodeName"},
             "$prop.name"
           ),
--- a/devtools/client/shared/components/reps/null.js
+++ b/devtools/client/shared/components/reps/null.js
@@ -2,29 +2,29 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
 
   /**
    * Renders null value
    */
   const Null = React.createClass({
     displayName: "NullRep",
 
-    render: function() {
+    render: function () {
       return (
         ObjectBox({className: "null"},
           "null"
         )
       );
     },
   });
 
--- a/devtools/client/shared/components/reps/number.js
+++ b/devtools/client/shared/components/reps/number.js
@@ -2,40 +2,40 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
 
   /**
    * Renders a number
    */
   const Number = React.createClass({
     displayName: "Number",
 
-    render: function() {
+    stringify: function (object) {
+      return (Object.is(object, -0) ? "-0" : String(object));
+    },
+
+    render: function () {
       let value = this.props.object;
       return (
         ObjectBox({className: "number"},
           this.stringify(value)
         )
       );
-    },
-
-    stringify: function(object) {
-      return (Object.is(object, -0) ? "-0" : String(object));
-    },
+    }
   });
 
   function supportsObject(object, type) {
     return type == "boolean" || type == "number";
   }
 
   // Exports from this module
 
--- a/devtools/client/shared/components/reps/object-box.js
+++ b/devtools/client/shared/components/reps/object-box.js
@@ -2,28 +2,28 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const DOM = React.DOM;
 
   /**
    * Renders a box for given object.
    */
   const ObjectBox = React.createClass({
     displayName: "ObjectBox",
 
-    render: function() {
+    render: function () {
       let className = this.props.className;
       let boxClassName = className ? " objectBox-" + className : "";
 
       return (
         DOM.span({className: "objectBox" + boxClassName, role: "presentation"},
           this.props.children
         )
       );
--- a/devtools/client/shared/components/reps/object-link.js
+++ b/devtools/client/shared/components/reps/object-link.js
@@ -2,28 +2,28 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const DOM = React.DOM;
 
   /**
    * Renders a link for given object.
    */
   const ObjectLink = React.createClass({
     displayName: "ObjectLink",
 
-    render: function() {
+    render: function () {
       let className = this.props.className;
       let objectClassName = className ? " objectLink-" + className : "";
       let linkClassName = "objectLink" + objectClassName + " a11yFocus";
 
       return (
         DOM.a({className: linkClassName, _repObject: this.props.object},
           this.props.children
         )
--- a/devtools/client/shared/components/reps/object-with-text.js
+++ b/devtools/client/shared/components/reps/object-with-text.js
@@ -1,46 +1,46 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Renders a grip object with textual data.
    */
   let ObjectWithText = React.createClass({
+    displayName: "ObjectWithText",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
     },
 
-    displayName: "ObjectWithText",
-
-    getType: function(grip) {
+    getType: function (grip) {
       return grip.class;
     },
 
-    getDescription: function(grip) {
+    getDescription: function (grip) {
       return (grip.preview.kind == "ObjectWithText") ? grip.preview.text : "";
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       return (
         ObjectLink({className: this.getType(grip)},
           span({className: "objectPropValue"},
             this.getDescription(grip)
           )
         )
       );
--- a/devtools/client/shared/components/reps/object-with-url.js
+++ b/devtools/client/shared/components/reps/object-with-url.js
@@ -1,46 +1,46 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Renders a grip object with URL data.
    */
   let ObjectWithURL = React.createClass({
+    displayName: "ObjectWithURL",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
     },
 
-    displayName: "ObjectWithURL",
-
-    getType: function(grip) {
+    getType: function (grip) {
       return grip.class;
     },
 
-    getDescription: function(grip) {
+    getDescription: function (grip) {
       return grip.preview.url;
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       return (
         ObjectLink({className: this.getType(grip)},
           span({className: "objectPropValue"},
             this.getDescription(grip)
           )
         )
       );
--- a/devtools/client/shared/components/reps/object.js
+++ b/devtools/client/shared/components/reps/object.js
@@ -2,61 +2,61 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { Caption } = createFactories(require("./caption"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Renders an object. An object is represented by a list of its
    * properties enclosed in curly brackets.
    */
   const Obj = React.createClass({
+    displayName: "Obj",
+
     propTypes: {
       object: React.PropTypes.object,
       mode: React.PropTypes.string,
     },
 
-    displayName: "Obj",
-
-    getTitle: function() {
+    getTitle: function () {
       return "";
     },
 
-    longPropIterator: function(object) {
+    longPropIterator: function (object) {
       try {
         return this.propIterator(object, 100);
       } catch (err) {
         console.error(err);
       }
       return [];
     },
 
-    shortPropIterator: function(object) {
+    shortPropIterator: function (object) {
       try {
         return this.propIterator(object, 3);
       } catch (err) {
         console.error(err);
       }
       return [];
     },
 
-    propIterator: function(object, max) {
+    propIterator: function (object, max) {
       let isInterestingProp = (t, value) => {
         // Do not pick objects, it could cause recursion.
         return (t == "boolean" || t == "number" || (t == "string" && value));
       };
 
       // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=945377
       if (Object.prototype.toString.call(object) === "[object Generator]") {
         object = Object.getPrototypeOf(object);
@@ -85,17 +85,17 @@ define(function(require, exports, module
         // Remove the last comma.
         props[props.length - 1] = React.cloneElement(
           props[props.length - 1], { delim: "" });
       }
 
       return props;
     },
 
-    getProps: function(object, max, filter) {
+    getProps: function (object, max, filter) {
       let props = [];
 
       max = max || 3;
       if (!object) {
         return props;
       }
 
       let mode = this.props.mode;
@@ -127,17 +127,17 @@ define(function(require, exports, module
         }
       } catch (err) {
         console.error(err);
       }
 
       return props;
     },
 
-    render: function() {
+    render: function () {
       let object = this.props.object;
       let props = this.shortPropIterator(object);
 
       return (
         ObjectBox({className: "object"},
           span({className: "objectTitle"}, this.getTitle(object)),
           span({className: "objectLeftBrace", role: "presentation"}, "{"),
           props,
@@ -146,27 +146,27 @@ define(function(require, exports, module
       );
     },
   });
 
   /**
    * Renders object property, name-value pair.
    */
   let PropRep = React.createFactory(React.createClass({
+    displayName: "PropRep",
+
     propTypes: {
       object: React.PropTypes.any,
       mode: React.PropTypes.string,
       name: React.PropTypes.string,
       equal: React.PropTypes.string,
       delim: React.PropTypes.string,
     },
 
-    displayName: "PropRep",
-
-    render: function() {
+    render: function () {
       let { Rep } = createFactories(require("./rep"));
       let object = this.props.object;
       let mode = this.props.mode;
 
       return (
         span({},
           span({
             "className": "nodeName"},
--- a/devtools/client/shared/components/reps/regexp.js
+++ b/devtools/client/shared/components/reps/regexp.js
@@ -1,46 +1,46 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
 
   // Shortcuts
   const { span } = React.DOM;
 
   /**
    * Renders a grip object with regular expression.
    */
   let RegExp = React.createClass({
+    displayName: "regexp",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
     },
 
-    displayName: "regexp",
-
-    getTitle: function(grip) {
+    getTitle: function (grip) {
       return grip.class;
     },
 
-    getSource: function(grip) {
+    getSource: function (grip) {
       return grip.displayString;
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       return (
         ObjectLink({className: "regexp"},
           span({className: "objectTitle"},
             this.getTitle(grip)
           ),
           span(" "),
           span({className: "regexpSource"},
--- a/devtools/client/shared/components/reps/rep-utils.js
+++ b/devtools/client/shared/components/reps/rep-utils.js
@@ -2,17 +2,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
 
   /**
    * Create React factories for given arguments.
    * Example:
    *   const { Rep } = createFactories(require("./rep"));
    */
--- a/devtools/client/shared/components/reps/rep.js
+++ b/devtools/client/shared/components/reps/rep.js
@@ -2,17 +2,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
 
   const { isGrip } = require("./rep-utils");
 
   // Load all existing rep templates
   const { Undefined } = require("./undefined");
   const { Null } = require("./null");
@@ -64,24 +64,24 @@ define(function(require, exports, module
 
   /**
    * Generic rep that is using for rendering native JS types or an object.
    * The right template used for rendering is picked automatically according
    * to the current value type. The value must be passed is as 'object'
    * property.
    */
   const Rep = React.createClass({
+    displayName: "Rep",
+
     propTypes: {
       object: React.PropTypes.any,
       defaultRep: React.PropTypes.object,
     },
 
-    displayName: "Rep",
-
-    render: function() {
+    render: function () {
       let rep = getRep(this.props.object, this.props.defaultRep);
       return rep(this.props);
     },
   });
 
   // Helpers
 
   /**
--- a/devtools/client/shared/components/reps/string.js
+++ b/devtools/client/shared/components/reps/string.js
@@ -2,29 +2,29 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
 
   /**
    * Renders a string. String value is enclosed within quotes.
    */
   const StringRep = React.createClass({
     displayName: "StringRep",
 
-    render: function() {
+    render: function () {
       let text = this.props.object;
       let member = this.props.member;
       if (member && member.open) {
         return (
           ObjectBox({className: "string"},
             "\"" + text + "\""
           )
         );
--- a/devtools/client/shared/components/reps/stylesheet.js
+++ b/devtools/client/shared/components/reps/stylesheet.js
@@ -1,45 +1,45 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { getFileName } = require("./url");
 
   // Shortcuts
   const DOM = React.DOM;
 
   /**
    * Renders a grip representing CSSStyleSheet
    */
   let StyleSheet = React.createClass({
+    displayName: "object",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
     },
 
-    displayName: "object",
-
-    getLocation: function(grip) {
+    getLocation: function (grip) {
       // Embedded stylesheets don't have URL and so, no preview.
       let url = grip.preview ? grip.preview.url : "";
       return url ? getFileName(url) : "";
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
 
       return (
         ObjectBox({className: "object"},
           "StyleSheet ",
           DOM.span({className: "objectPropValue"},
             this.getLocation(grip)
           )
--- a/devtools/client/shared/components/reps/text-node.js
+++ b/devtools/client/shared/components/reps/text-node.js
@@ -1,48 +1,48 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectLink } = createFactories(require("./object-link"));
   const { cropMultipleLines } = require("./string");
 
   // Shortcuts
   const DOM = React.DOM;
 
   /**
    * Renders DOM #text node.
    */
   let TextNode = React.createClass({
+    displayName: "TextNode",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
       mode: React.PropTypes.string,
     },
 
-    displayName: "TextNode",
-
-    getTextContent: function(grip) {
+    getTextContent: function (grip) {
       return cropMultipleLines(grip.preview.textContent);
     },
 
-    getTitle: function(win, context) {
+    getTitle: function (win, context) {
       return "textNode";
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
       let mode = this.props.mode || "short";
 
       if (mode == "short" || mode == "tiny") {
         return (
           ObjectLink({className: "textNode"},
             "\"" + this.getTextContent(grip) + "\""
           )
--- a/devtools/client/shared/components/reps/undefined.js
+++ b/devtools/client/shared/components/reps/undefined.js
@@ -2,29 +2,29 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // Dependencies
   const React = require("devtools/client/shared/vendor/react");
   const { createFactories } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
 
   /**
    * Renders undefined value
    */
   const Undefined = React.createClass({
     displayName: "UndefinedRep",
 
-    render: function() {
+    render: function () {
       return (
         ObjectBox({className: "undefined"},
           "undefined"
         )
       );
     },
   });
 
--- a/devtools/client/shared/components/reps/url.js
+++ b/devtools/client/shared/components/reps/url.js
@@ -3,17 +3,17 @@
 /* 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/. */
 /* global URLSearchParams, URL */
 
 "use strict";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   function parseURLParams(url) {
     url = new URL(url);
     return parseURLEncodedText(url.searchParams);
   }
 
   function parseURLEncodedText(text) {
     let params = [];
 
--- a/devtools/client/shared/components/reps/window.js
+++ b/devtools/client/shared/components/reps/window.js
@@ -1,43 +1,43 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { createFactories, isGrip } = require("./rep-utils");
   const { ObjectBox } = createFactories(require("./object-box"));
   const { cropString } = require("./string");
 
   // Shortcuts
   const DOM = React.DOM;
 
   /**
    * Renders a grip representing a window.
    */
   let Window = React.createClass({
+    displayName: "Window",
+
     propTypes: {
       object: React.PropTypes.object.isRequired,
     },
 
-    displayName: "Window",
-
-    getLocation: function(grip) {
+    getLocation: function (grip) {
       return cropString(grip.preview.url);
     },
 
-    render: function() {
+    render: function () {
       let grip = this.props.object;
 
       return (
         ObjectBox({className: "Window"},
           DOM.span({className: "objectPropValue"},
             this.getLocation(grip)
           )
         )
--- a/devtools/client/shared/components/tree.js
+++ b/devtools/client/shared/components/tree.js
@@ -1,16 +1,17 @@
 /* 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/. */
+/* eslint-env browser */
+"use strict";
 
 const { DOM: dom, createClass, createFactory, PropTypes } = require("devtools/client/shared/vendor/react");
-const { ViewHelpers } = require("devtools/client/shared/widgets/view-helpers");
 
-const AUTO_EXPAND_DEPTH = 0; // depth
+const AUTO_EXPAND_DEPTH = 0;
 const NUMBER_OF_OFFSCREEN_ITEMS = 1;
 
 /**
  * A fast, generic, expandable and collapsible tree component.
  *
  * This tree component is fast: it can handle trees with *many* items. It only
  * renders the subset of those items which are visible in the viewport. It's
  * been battle tested on huge trees in the memory panel. We've optimized tree
@@ -90,17 +91,17 @@ const NUMBER_OF_OFFSCREEN_ITEMS = 1;
  *           },
  *
  *           onExpand: item => dispatchExpandActionToRedux(item),
  *           onCollapse: item => dispatchCollapseActionToRedux(item),
  *         });
  *       }
  *     });
  */
-const Tree = module.exports = createClass({
+module.exports = createClass({
   displayName: "Tree",
 
   propTypes: {
     // Required props
 
     // A function to get an item's parent, or null if it is a root.
     //
     // Type: getParent(item: Item) -> Maybe<Item>
@@ -226,25 +227,25 @@ const Tree = module.exports = createClas
   },
 
   componentDidMount() {
     window.addEventListener("resize", this._updateHeight);
     this._autoExpand();
     this._updateHeight();
   },
 
-  componentWillUnmount() {
-    window.removeEventListener("resize", this._updateHeight);
-  },
-
   componentWillReceiveProps(nextProps) {
     this._autoExpand();
     this._updateHeight();
   },
 
+  componentWillUnmount() {
+    window.removeEventListener("resize", this._updateHeight);
+  },
+
   _autoExpand() {
     if (!this.props.autoExpandDepth) {
       return;
     }
 
     // Automatically expand the first autoExpandDepth levels for new items. Do
     // not use the usual DFS infrastructure because we don't want to ignore
     // collapsed nodes.
@@ -266,82 +267,16 @@ const Tree = module.exports = createClas
 
     const roots = this.props.getRoots();
     const length = roots.length;
     for (let i = 0; i < length; i++) {
       autoExpand(roots[i], 0);
     }
   },
 
-  render() {
-    const traversal = this._dfsFromRoots();
-
-    // Remove `NUMBER_OF_OFFSCREEN_ITEMS` from `begin` and add `2 *
-    // NUMBER_OF_OFFSCREEN_ITEMS` to `end` so that the top and bottom of the
-    // page are filled with the `NUMBER_OF_OFFSCREEN_ITEMS` previous and next
-    // items respectively, rather than whitespace if the item is not in full
-    // view.
-    const begin = Math.max(((this.state.scroll / this.props.itemHeight) | 0) - NUMBER_OF_OFFSCREEN_ITEMS, 0);
-    const end = begin + (2 * NUMBER_OF_OFFSCREEN_ITEMS) + ((this.state.height / this.props.itemHeight) | 0);
-    const toRender = traversal.slice(begin, end);
-
-    const nodes = [
-      dom.div({
-        key: "top-spacer",
-        style: {
-          padding: 0,
-          margin: 0,
-          height: begin * this.props.itemHeight + "px"
-        }
-      })
-    ];
-
-    for (let i = 0; i < toRender.length; i++) {
-      let { item, depth } = toRender[i];
-      nodes.push(TreeNode({
-        key: this.props.getKey(item),
-        index: begin + i,
-        item: item,
-        depth: depth,
-        renderItem: this.props.renderItem,
-        focused: this.props.focused === item,
-        expanded: this.props.isExpanded(item),
-        hasChildren: !!this.props.getChildren(item).length,
-        onExpand: this._onExpand,
-        onCollapse: this._onCollapse,
-        onFocus: () => this._focus(begin + i, item),
-      }));
-    }
-
-    nodes.push(dom.div({
-      key: "bottom-spacer",
-      style: {
-        padding: 0,
-        margin: 0,
-        height: (traversal.length - 1 - end) * this.props.itemHeight + "px"
-      }
-    }));
-
-    return dom.div(
-      {
-        className: "tree",
-        ref: "tree",
-        onKeyDown: this._onKeyDown,
-        onKeyPress: this._preventArrowKeyScrolling,
-        onKeyUp: this._preventArrowKeyScrolling,
-        onScroll: this._onScroll,
-        style: {
-          padding: 0,
-          margin: 0
-        }
-      },
-      nodes
-    );
-  },
-
   _preventArrowKeyScrolling(e) {
     switch (e.key) {
       case "ArrowUp":
       case "ArrowDown":
       case "ArrowLeft":
       case "ArrowRight":
         e.preventDefault();
         e.stopPropagation();
@@ -446,22 +381,22 @@ const Tree = module.exports = createClas
    * @param {Object|undefined} item
    *        The item to be focused, or undefined to focus no item.
    */
   _focus(index, item) {
     if (item !== undefined) {
       const itemStartPosition = index * this.props.itemHeight;
       const itemEndPosition = (index + 1) * this.props.itemHeight;
 
-      // Note that if the height of the viewport (this.state.height) is less than
-      // `this.props.itemHeight`, we could accidentally try and scroll both up and
-      // down in a futile attempt to make both the item's start and end positions
-      // visible. Instead, give priority to the start of the item by checking its
-      // position first, and then using an "else if", rather than a separate "if",
-      // for the end position.
+      // Note that if the height of the viewport (this.state.height) is less
+      // than `this.props.itemHeight`, we could accidentally try and scroll both
+      // up and down in a futile attempt to make both the item's start and end
+      // positions visible. Instead, give priority to the start of the item by
+      // checking its position first, and then using an "else if", rather than
+      // a separate "if", for the end position.
       if (this.state.scroll > itemStartPosition) {
         this.refs.tree.scrollTo(0, itemStartPosition);
       } else if ((this.state.scroll + this.state.height) < itemEndPosition) {
         this.refs.tree.scrollTo(0, itemEndPosition - this.state.height);
       }
     }
 
     if (this.props.onFocus) {
@@ -604,16 +539,84 @@ const Tree = module.exports = createClas
     for (; parentIndex < length; parentIndex++) {
       if (traversal[parentIndex].item === parent) {
         break;
       }
     }
 
     this._focus(parentIndex, parent);
   }),
+
+  render() {
+    const traversal = this._dfsFromRoots();
+
+    // Remove `NUMBER_OF_OFFSCREEN_ITEMS` from `begin` and add `2 *
+    // NUMBER_OF_OFFSCREEN_ITEMS` to `end` so that the top and bottom of the
+    // page are filled with the `NUMBER_OF_OFFSCREEN_ITEMS` previous and next
+    // items respectively, rather than whitespace if the item is not in full
+    // view.
+    const begin = Math.max(((this.state.scroll / this.props.itemHeight) | 0)
+                           - NUMBER_OF_OFFSCREEN_ITEMS, 0);
+    const end = begin + (2 * NUMBER_OF_OFFSCREEN_ITEMS)
+                      + ((this.state.height / this.props.itemHeight) | 0);
+    const toRender = traversal.slice(begin, end);
+
+    const nodes = [
+      dom.div({
+        key: "top-spacer",
+        style: {
+          padding: 0,
+          margin: 0,
+          height: begin * this.props.itemHeight + "px"
+        }
+      })
+    ];
+
+    for (let i = 0; i < toRender.length; i++) {
+      let { item, depth } = toRender[i];
+      nodes.push(TreeNode({
+        key: this.props.getKey(item),
+        index: begin + i,
+        item: item,
+        depth: depth,
+        renderItem: this.props.renderItem,
+        focused: this.props.focused === item,
+        expanded: this.props.isExpanded(item),
+        hasChildren: !!this.props.getChildren(item).length,
+        onExpand: this._onExpand,
+        onCollapse: this._onCollapse,
+        onFocus: () => this._focus(begin + i, item),
+      }));
+    }
+
+    nodes.push(dom.div({
+      key: "bottom-spacer",
+      style: {
+        padding: 0,
+        margin: 0,
+        height: (traversal.length - 1 - end) * this.props.itemHeight + "px"
+      }
+    }));
+
+    return dom.div(
+      {
+        className: "tree",
+        ref: "tree",
+        onKeyDown: this._onKeyDown,
+        onKeyPress: this._preventArrowKeyScrolling,
+        onKeyUp: this._preventArrowKeyScrolling,
+        onScroll: this._onScroll,
+        style: {
+          padding: 0,
+          margin: 0
+        }
+      },
+      nodes
+    );
+  }
 });
 
 /**
  * An arrow that displays whether its node is expanded (▼) or collapsed
  * (▶). When its node has no children, it is hidden.
  */
 const ArrowExpander = createFactory(createClass({
   displayName: "ArrowExpander",
@@ -654,16 +657,32 @@ const TreeNode = createFactory(createCla
   },
 
   componentDidUpdate() {
     if (this.props.focused) {
       this.refs.button.focus();
     }
   },
 
+  _buttonAttrs: {
+    ref: "button",
+    style: {
+      opacity: 0,
+      width: "0 !important",
+      height: "0 !important",
+      padding: "0 !important",
+      outline: "none",
+      MozAppearance: "none",
+      // XXX: Despite resetting all of the above properties (and margin), the
+      // button still ends up with ~79px width, so we set a large negative
+      // margin to completely hide it.
+      MozMarginStart: "-1000px !important",
+    }
+  },
+
   render() {
     const arrow = ArrowExpander({
       item: this.props.item,
       expanded: this.props.expanded,
       visible: this.props.hasChildren,
       onExpand: this.props.onExpand,
       onCollapse: this.props.onCollapse,
     });
@@ -686,32 +705,16 @@ const TreeNode = createFactory(createCla
                             this.props.focused,
                             arrow,
                             this.props.expanded),
 
       // XXX: OSX won't focus/blur regular elements even if you set tabindex
       // unless there is an input/button child.
       dom.button(this._buttonAttrs)
     );
-  },
-
-  _buttonAttrs: {
-    ref: "button",
-    style: {
-      opacity: 0,
-      width: "0 !important",
-      height: "0 !important",
-      padding: "0 !important",
-      outline: "none",
-      MozAppearance: "none",
-      // XXX: Despite resetting all of the above properties (and margin), the
-      // button still ends up with ~79px width, so we set a large negative
-      // margin to completely hide it.
-      marginInlineStart: "-1000px !important",
-    }
   }
 }));
 
 /**
  * Create a function that calls the given function `fn` only once per animation
  * frame.
  *
  * @param {Function} fn
--- a/devtools/client/shared/components/tree/label-cell.js
+++ b/devtools/client/shared/components/tree/label-cell.js
@@ -1,37 +1,37 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Shortcuts
   const { td, span } = React.DOM;
   const PropTypes = React.PropTypes;
 
   /**
    * Render the default cell used for toggle buttons
    */
   let LabelCell = React.createClass({
+    displayName: "LabelCell",
+
     // See the TreeView component for details related
     // to the 'member' object.
     propTypes: {
       member: PropTypes.object.isRequired
     },
 
-    displayName: "LabelCell",
-
-    render: function() {
+    render: function () {
       let member = this.props.member;
       let level = member.level || 0;
 
       // Compute indentation dynamically. The deeper the item is
       // inside the hierarchy, the bigger is the left padding.
       let rowStyle = {
         "paddingLeft": (level * 16) + "px",
       };
--- a/devtools/client/shared/components/tree/object-provider.js
+++ b/devtools/client/shared/components/tree/object-provider.js
@@ -1,24 +1,24 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   /**
    * Implementation of the default data provider. A provider is state less
    * object responsible for transformation data (usually a state) to
    * a structure that can be directly consumed by the tree-view component.
    */
   let ObjectProvider = {
-    getChildren: function(object) {
+    getChildren: function (object) {
       let children = [];
 
       if (object instanceof ObjectProperty) {
         object = object.value;
       }
 
       if (!object) {
         return [];
@@ -33,17 +33,17 @@ define(function(require, exports, module
           children.push(new ObjectProperty(prop, object[prop]));
         } catch (e) {
           console.error(e);
         }
       }
       return children;
     },
 
-    hasChildren: function(object) {
+    hasChildren: function (object) {
       if (object instanceof ObjectProperty) {
         object = object.value;
       }
 
       if (!object) {
         return false;
       }
 
@@ -53,32 +53,32 @@ define(function(require, exports, module
 
       if (typeof object !== "object") {
         return false;
       }
 
       return Object.keys(object).length > 0;
     },
 
-    getLabel: function(object) {
+    getLabel: function (object) {
       return (object instanceof ObjectProperty) ?
         object.name : null;
     },
 
-    getValue: function(object) {
+    getValue: function (object) {
       return (object instanceof ObjectProperty) ?
         object.value : null;
     },
 
-    getKey: function(object) {
+    getKey: function (object) {
       return (object instanceof ObjectProperty) ?
         object.name : null;
     },
 
-    getType: function(object) {
+    getType: function (object) {
       return (object instanceof ObjectProperty) ?
         typeof object.value : typeof object;
     }
   };
 
   function ObjectProperty(name, value) {
     this.name = name;
     this.value = value;
--- a/devtools/client/shared/components/tree/tree-cell.js
+++ b/devtools/client/shared/components/tree/tree-cell.js
@@ -1,49 +1,49 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   const React = require("devtools/client/shared/vendor/react");
 
   // Shortcuts
   const { td, span } = React.DOM;
   const PropTypes = React.PropTypes;
 
   /**
    * This template represents a cell in TreeView row. It's rendered
    * using <td> element (the row is <tr> and the entire tree is <table>).
    */
   let TreeCell = React.createClass({
+    displayName: "TreeCell",
+
     // See TreeView component for detailed property explanation.
     propTypes: {
       value: PropTypes.any,
       decorator: PropTypes.object,
       id: PropTypes.string.isRequired,
       member: PropTypes.object.isRequired,
       renderValue: PropTypes.func.isRequired
     },
 
-    displayName: "TreeCell",
-
     /**
      * Optimize cell rendering. Rerender cell content only if
      * the value or expanded state changes.
      */
-    shouldComponentUpdate: function(nextProps) {
+    shouldComponentUpdate: function (nextProps) {
       return (this.props.value != nextProps.value) ||
         (this.props.member.open != nextProps.member.open);
     },
 
-    getCellClass: function(object, id) {
+    getCellClass: function (object, id) {
       let decorator = this.props.decorator;
       if (!decorator || !decorator.getCellClass) {
         return [];
       }
 
       // Decorator can return a simple string or array of strings.
       let classNames = decorator.getCellClass(object, id);
       if (!classNames) {
@@ -52,17 +52,17 @@ define(function(require, exports, module
 
       if (typeof classNames == "string") {
         classNames = [classNames];
       }
 
       return classNames;
     },
 
-    render: function() {
+    render: function () {
       let member = this.props.member;
       let type = member.type || "";
       let id = this.props.id;
       let value = this.props.value;
       let decorator = this.props.decorator;
 
       // Compute class name list for the <td> element.
       let classNames = this.getCellClass(member.object, id) || [];
--- a/devtools/client/shared/components/tree/tree-header.js
+++ b/devtools/client/shared/components/tree/tree-header.js
@@ -1,50 +1,50 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Shortcuts
   const { thead, tr, td, div } = React.DOM;
   const PropTypes = React.PropTypes;
 
   /**
    * This component is responsible for rendering tree header.
    * It's based on <thead> element.
    */
   let TreeHeader = React.createClass({
+    displayName: "TreeHeader",
+
     // See also TreeView component for detailed info about properties.
     propTypes: {
       // Custom tree decorator
       decorator: PropTypes.object,
       // True if the header should be visible
       header: PropTypes.bool,
       // Array with column definition
       columns: PropTypes.array
     },
 
-    displayName: "TreeHeader",
-
-    getDefaultProps: function() {
+    getDefaultProps: function () {
       return {
         columns: [{
           id: "default"
         }]
       };
     },
 
-    getHeaderClass: function(colId) {
+    getHeaderClass: function (colId) {
       let decorator = this.props.decorator;
       if (!decorator || !decorator.getHeaderClass) {
         return [];
       }
 
       // Decorator can return a simple string or array of strings.
       let classNames = decorator.getHeaderClass(colId);
       if (!classNames) {
@@ -53,17 +53,17 @@ define(function(require, exports, module
 
       if (typeof classNames == "string") {
         classNames = [classNames];
       }
 
       return classNames;
     },
 
-    render: function() {
+    render: function () {
       let cells = [];
       let visible = this.props.header;
 
       // Render the rest of the columns (if any)
       this.props.columns.forEach(col => {
         let cellStyle = {
           "width": col.width ? col.width : "",
         };
--- a/devtools/client/shared/components/tree/tree-row.js
+++ b/devtools/client/shared/components/tree/tree-row.js
@@ -1,17 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
   const ReactDOM = require("devtools/client/shared/vendor/react-dom");
 
   // Tree
   const TreeCell = React.createFactory(require("./tree-cell"));
   const LabelCell = React.createFactory(require("./label-cell"));
 
@@ -19,16 +19,18 @@ define(function(require, exports, module
   const { tr } = React.DOM;
   const PropTypes = React.PropTypes;
 
   /**
    * This template represents a node in TreeView component. It's rendered
    * using <tr> element (the entire tree is one big <table>).
    */
   let TreeRow = React.createClass({
+    displayName: "TreeRow",
+
     // See TreeView component for more details about the props and
     // the 'member' object.
     propTypes: {
       member: PropTypes.shape({
         object: PropTypes.obSject,
         name: PropTypes.sring,
         type: PropTypes.string.isRequired,
         rowClass: PropTypes.string.isRequired,
@@ -42,47 +44,45 @@ define(function(require, exports, module
       decorator: PropTypes.object,
       renderCell: PropTypes.object,
       renderLabelCell: PropTypes.object,
       columns: PropTypes.array.isRequired,
       provider: PropTypes.object.isRequired,
       onClick: PropTypes.func.isRequired
     },
 
-    displayName: "TreeRow",
-
-    /**
-     * Optimize row rendering. If props are the same do not render.
-     * This makes the rendering a lot faster!
-     */
-    shouldComponentUpdate: function(nextProps) {
-      let props = ["name", "open", "value", "loading"];
-      for (let p in props) {
-        if (nextProps.member[props[p]] != this.props.member[props[p]]) {
-          return true;
-        }
-      }
-
-      return false;
-    },
-
     componentWillReceiveProps(nextProps) {
       // I don't like accessing the underlying DOM elements directly,
       // but this optimization makes the filtering so damn fast!
       // The row doesn't have to be re-rendered, all we really need
       // to do is toggling a class name.
       // The important part is that DOM elements don't need to be
       // re-created when they should appear again.
       if (nextProps.member.hidden != this.props.member.hidden) {
         let row = ReactDOM.findDOMNode(this);
         row.classList.toggle("hidden");
       }
     },
 
-    getRowClass: function(object) {
+    /**
+     * Optimize row rendering. If props are the same do not render.
+     * This makes the rendering a lot faster!
+     */
+    shouldComponentUpdate: function (nextProps) {
+      let props = ["name", "open", "value", "loading"];
+      for (let p in props) {
+        if (nextProps.member[props[p]] != this.props.member[props[p]]) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+
+    getRowClass: function (object) {
       let decorator = this.props.decorator;
       if (!decorator || !decorator.getRowClass) {
         return [];
       }
 
       // Decorator can return a simple string or array of strings.
       let classNames = decorator.getRowClass(object);
       if (!classNames) {
@@ -91,17 +91,17 @@ define(function(require, exports, module
 
       if (typeof classNames == "string") {
         classNames = [classNames];
       }
 
       return classNames;
     },
 
-    render: function() {
+    render: function () {
       let member = this.props.member;
       let decorator = this.props.decorator;
 
       // Compute class name list for the <tr> element.
       let classNames = this.getRowClass(member.object) || [];
       classNames.push("treeRow");
       classNames.push(member.type + "Row");
 
--- a/devtools/client/shared/components/tree/tree-view.js
+++ b/devtools/client/shared/components/tree/tree-view.js
@@ -1,17 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 // Make this available to both AMD and CJS environments
-define(function(require, exports, module) {
+define(function (require, exports, module) {
   // ReactJS
   const React = require("devtools/client/shared/vendor/react");
 
   // Reps
   const { ObjectProvider } = require("./object-provider");
   const TreeRow = React.createFactory(require("./tree-row"));
   const TreeHeader = React.createFactory(require("./tree-header"));
 
@@ -49,16 +49,18 @@ define(function(require, exports, module
    *   getHeaderClass: function(colId);
    *   renderValue: function(object, colId);
    *   renderRow: function(object);
    *   renderCelL: function(object, colId);
    *   renderLabelCell: function(object);
    * }
    */
   let TreeView = React.createClass({
+    displayName: "TreeView",
+
     // The only required property (not set by default) is the input data
     // object that is used to puputate the tree.
     propTypes: {
       // The input data object.
       object: PropTypes.any,
       className: PropTypes.string,
       // Data provider (see also the interface above)
       provider: PropTypes.shape({
@@ -98,85 +100,83 @@ define(function(require, exports, module
       // Array of columns
       columns: PropTypes.arrayOf(PropTypes.shape({
         id: PropTypes.string.isRequired,
         title: PropTypes.string,
         width: PropTypes.string
       }))
     },
 
-    displayName: "TreeView",
-
-    getDefaultProps: function() {
+    getDefaultProps: function () {
       return {
         object: null,
         renderRow: null,
         provider: ObjectProvider,
         expandedNodes: new Set(),
         columns: []
       };
     },
 
-    getInitialState: function() {
+    getInitialState: function () {
       return {
         expandedNodes: this.props.expandedNodes,
         columns: ensureDefaultColumn(this.props.columns)
       };
     },
 
     // Node expand/collapse
 
-    toggle: function(nodePath) {
+    toggle: function (nodePath) {
       let nodes = this.state.expandedNodes;
       if (this.isExpanded(nodePath)) {
         nodes.delete(nodePath);
       } else {
         nodes.add(nodePath);
       }
 
       // Compute new state and update the tree.
       this.setState(Object.assign({}, this.state, {
         expandedNodes: nodes
       }));
     },
 
-    isExpanded: function(nodePath) {
+    isExpanded: function (nodePath) {
       return this.state.expandedNodes.has(nodePath);
     },
 
     // Event Handlers
 
-    onClickRow: function(nodePath, event) {
+    onClickRow: function (nodePath, event) {
       event.stopPropagation();
       this.toggle(nodePath);
     },
 
     // Filtering & Sorting
 
     /**
      * Filter out nodes that don't correspond to the current filter.
      * @return {Boolean} true if the node should be visible otherwise false.
      */
-    onFilter: function(object) {
+    onFilter: function (object) {
       let onFilter = this.props.onFilter;
       return onFilter ? onFilter(object) : true;
     },
 
-    onSort: function(parent, children) {
+    onSort: function (parent, children) {
       let onSort = this.props.onSort;
       return onSort ? onSort(parent, children) : children;
     },
 
     // Members
 
     /**
      * Return children node objects (so called 'members') for given
      * parent object.
      */
-    getMembers: function(parent, level, path) {
+    getMembers: function (parent, level, path) {
       // Strings don't have children. Note that 'long' strings are using
       // the expander icon (+/-) to display the entire original value,
       // but there are no child items.
       if (typeof parent == "string") {
         return [];
       }
 
       let provider = this.props.provider;
@@ -230,17 +230,17 @@ define(function(require, exports, module
           hidden: !this.onFilter(child)
         };
       });
     },
 
     /**
      * Render tree rows/nodes.
      */
-    renderRows: function(parent, level = 0, path = "") {
+    renderRows: function (parent, level = 0, path = "") {
       let rows = [];
       let decorator = this.props.decorator;
       let renderRow = this.props.renderRow || TreeRow;
 
       // Get children for given parent node, iterate over them and render
       // a row for every one. Use row template (a component) from properties.
       // If the return value is non-array, the children are being loaded
       // asynchronously.
@@ -280,17 +280,17 @@ define(function(require, exports, module
             rows = rows.concat(childRows);
           }
         }
       });
 
       return rows;
     },
 
-    render: function() {
+    render: function () {
       let root = this.props.object;
       let classNames = ["treeTable"];
 
       // Use custom class name from props.
       let className = this.props.className;
       if (className) {
         classNames.push(...className.split(" "));
       }
--- a/devtools/client/shared/redux/create-store.js
+++ b/devtools/client/shared/redux/create-store.js
@@ -17,17 +17,17 @@ const { history } = require("./middlewar
  * various ways, such as logging and recording.
  *
  * @param {object} opts:
  *        - log: log all dispatched actions to console
  *        - history: an array to store every action in. Should only be
  *                   used in tests.
  *        - middleware: array of middleware to be included in the redux store
  */
-module.exports = (opts={}) => {
+module.exports = (opts = {}) => {
   const middleware = [
     task,
     thunk,
     promise,
 
     // Order is important: services must go last as they always
     // operate on "already transformed" actions. Actions going through
     // them shouldn't have any special fields like promises, they
@@ -43,9 +43,9 @@ module.exports = (opts={}) => {
     opts.middleware.forEach(fn => middleware.push(fn));
   }
 
   if (opts.log) {
     middleware.push(log);
   }
 
   return applyMiddleware(...middleware)(createStore);
-}
+};
--- a/devtools/client/shared/redux/middleware/history.js
+++ b/devtools/client/shared/redux/middleware/history.js
@@ -5,19 +5,19 @@
 
 const DevToolsUtils = require("devtools/shared/DevToolsUtils");
 
 /**
  * A middleware that stores every action coming through the store in the passed
  * in logging object. Should only be used for tests, as it collects all
  * action information, which will cause memory bloat.
  */
-exports.history = (log=[]) => ({ dispatch, getState }) => {
+exports.history = (log = []) => ({ dispatch, getState }) => {
   if (!DevToolsUtils.testing) {
-    console.warn(`Using history middleware stores all actions in state for testing\
-                  and devtools is not currently running in test mode. Be sure this is\
-                  intentional.`);
+    console.warn("Using history middleware stores all actions in state for " +
+                 "testing and devtools is not currently running in test " +
+                 "mode. Be sure this is intentional.");
   }
   return next => action => {
     log.push(action);
     next(action);
   };
 };
--- a/devtools/client/shared/redux/middleware/promise.js
+++ b/devtools/client/shared/redux/middleware/promise.js
@@ -1,21 +1,21 @@
 /* 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";
 
 const uuidgen = require("sdk/util/uuid").uuid;
 const promise = require("promise");
 const {
-  entries, toObject, reportException, executeSoon
+  entries, toObject, executeSoon
 } = require("devtools/shared/DevToolsUtils");
 const PROMISE = exports.PROMISE = "@@dispatch/promise";
 
-function promiseMiddleware ({ dispatch, getState }) {
+function promiseMiddleware({ dispatch, getState }) {
   return next => action => {
     if (!(PROMISE in action)) {
       return next(action);
     }
 
     const promiseInst = action[PROMISE];
     const seqId = uuidgen().toString();
 
--- a/devtools/client/shared/redux/middleware/task.js
+++ b/devtools/client/shared/redux/middleware/task.js
@@ -1,42 +1,42 @@
 /* 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";
 
 const { Task } = require("resource://gre/modules/Task.jsm");
-const { executeSoon, isGenerator, isPromise, reportException } = require("devtools/shared/DevToolsUtils");
+const { executeSoon, isGenerator, reportException } = require("devtools/shared/DevToolsUtils");
 const ERROR_TYPE = exports.ERROR_TYPE = "@@redux/middleware/task#error";
 
 /**
  * A middleware that allows generator thunks (functions) and promise
- * to be dispatched. If it's a generator, it is called with `dispatch` and `getState`,
- * allowing the action to create multiple actions (most likely
+ * to be dispatched. If it's a generator, it is called with `dispatch`
+ * and `getState`, allowing the action to create multiple actions (most likely
  * asynchronously) and yield on each. If called with a promise, calls `dispatch`
  * on the results.
  */
 
-function task ({ dispatch, getState }) {
+function task({ dispatch, getState }) {
   return next => action => {
     if (isGenerator(action)) {
       return Task.spawn(action.bind(null, dispatch, getState))
         .then(null, handleError.bind(null, dispatch));
     }
 
     /*
     if (isPromise(action)) {
       return action.then(dispatch, handleError.bind(null, dispatch));
     }
     */
 
     return next(action);
   };
 }
 
-function handleError (dispatch, error) {
+function handleError(dispatch, error) {
   executeSoon(() => {
     reportException(ERROR_TYPE, error);
     dispatch({ type: ERROR_TYPE, error });
   });
 }
 
 exports.task = task;
--- a/devtools/client/shared/redux/middleware/test/head.js
+++ b/devtools/client/shared/redux/middleware/test/head.js
@@ -4,24 +4,24 @@
 
 var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
 var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
 var DevToolsUtils = require("devtools/shared/DevToolsUtils");
 var promise = require("promise");
 
 DevToolsUtils.testing = true;
 
-function waitUntilState (store, predicate) {
+function waitUntilState(store, predicate) {
   let deferred = promise.defer();
   let unsubscribe = store.subscribe(check);
 
-  function check () {
+  function check() {
     if (predicate(store.getState())) {
       unsubscribe();
-      deferred.resolve()
+      deferred.resolve();
     }
   }
 
   // Fire the check immediately incase the action has already occurred
   check();
 
   return deferred.promise;
 }
--- a/devtools/client/shared/redux/middleware/test/test_middleware-task-01.js
+++ b/devtools/client/shared/redux/middleware/test/test_middleware-task-01.js
@@ -9,44 +9,44 @@ const { task } = require("devtools/clien
  * Tests that task middleware allows dispatching generators, promises and objects
  * that return actions;
  */
 
 function run_test() {
   run_next_test();
 }
 
-add_task(function *() {
+add_task(function* () {
   let store = applyMiddleware(task)(createStore)(reducer);
 
   store.dispatch(fetch1("generator"));
   yield waitUntilState(store, () => store.getState().length === 1);
   equal(store.getState()[0].data, "generator", "task middleware async dispatches an action via generator");
 
   store.dispatch(fetch2("sync"));
   yield waitUntilState(store, () => store.getState().length === 2);
   equal(store.getState()[1].data, "sync", "task middleware sync dispatches an action via sync");
 });
 
-function fetch1 (data) {
-  return function *(dispatch, getState) {
+function fetch1(data) {
+  return function* (dispatch, getState) {
     equal(getState().length, 0, "`getState` is accessible in a generator action");
     let moreData = yield new Promise(resolve => resolve(data));
     // Ensure it handles more than one yield
     moreData = yield new Promise(resolve => resolve(data));
     dispatch({ type: "fetch1", data: moreData });
   };
 }
 
-function fetch2 (data) {
+function fetch2(data) {
   return {
     type: "fetch2",
     data
-  }
+  };
 }
 
-function reducer (state=[], action) {
+function reducer(state = [], action) {
   do_print("Action called: " + action.type);
   if (["fetch1", "fetch2"].includes(action.type)) {
     state.push(action);
   }
   return [...state];
 }
--- a/devtools/client/shared/redux/middleware/test/test_middleware-task-02.js
+++ b/devtools/client/shared/redux/middleware/test/test_middleware-task-02.js
@@ -9,51 +9,51 @@
 
 const { createStore, applyMiddleware } = require("devtools/client/shared/vendor/redux");
 const { task } = require("devtools/client/shared/redux/middleware/task");
 
 function run_test() {
   run_next_test();
 }
 
-add_task(function *() {
+add_task(function* () {
   let store = applyMiddleware(task)(createStore)(reducer);
 
   store.dispatch(comboAction());
   yield waitUntilState(store, () => store.getState().length === 3);
 
   equal(store.getState()[0].type, "fetchAsync-start", "Async dispatched actions in a generator task are fired");
   equal(store.getState()[1].type, "fetchAsync-end", "Async dispatched actions in a generator task are fired");
   equal(store.getState()[2].type, "fetchSync", "Return values of yielded sync dispatched actions are correct");
   equal(store.getState()[3].type, "fetch-done", "Return values of yielded async dispatched actions are correct");
   equal(store.getState()[3].data.sync.data, "sync", "Return values of dispatched sync values are correct");
   equal(store.getState()[3].data.async, "async", "Return values of dispatched async values are correct");
 });
 
-function comboAction () {
-  return function *(dispatch, getState) {
+function comboAction() {
+  return function* (dispatch, getState) {
     let data = {};
     data.async = yield dispatch(fetchAsync("async"));
     data.sync = yield dispatch(fetchSync("sync"));
     dispatch({ type: "fetch-done", data });
-  }
+  };
 }
 
-function fetchSync (data) {
+function fetchSync(data) {
   return { type: "fetchSync", data };
 }
 
-function fetchAsync (data) {
-  return function *(dispatch) {
+function fetchAsync(data) {
+  return function* (dispatch) {
     dispatch({ type: "fetchAsync-start" });
     let val = yield new Promise(resolve => resolve(data));
     dispatch({ type: "fetchAsync-end" });
     return val;
   };
 }
 
-function reducer (state=[], action) {
+function reducer(state = [], action) {
   do_print("Action called: " + action.type);
   if (/fetch/.test(action.type)) {
     state.push(action);
   }
   return [...state];
 }
--- a/devtools/client/shared/redux/middleware/test/test_middleware-task-03.js
+++ b/devtools/client/shared/redux/middleware/test/test_middleware-task-03.js
@@ -8,30 +8,30 @@ const { task, ERROR_TYPE } = require("de
 /**
  * Tests that the middleware handles errors thrown in tasks, and rejected promises.
  */
 
 function run_test() {
   run_next_test();
 }
 
-add_task(function *() {
+add_task(function* () {
   let store = applyMiddleware(task)(createStore)(reducer);
 
   store.dispatch(generatorError());
   yield waitUntilState(store, () => store.getState().length === 1);
   equal(store.getState()[0].type, ERROR_TYPE, "generator errors dispatch ERROR_TYPE actions");
   equal(store.getState()[0].error, "task-middleware-error-generator", "generator errors dispatch ERROR_TYPE actions with error");
 });
 
-function generatorError () {
-  return function *(dispatch, getState) {
+function generatorError() {
+  return function* (dispatch, getState) {
     throw "task-middleware-error-generator";
   };
 }
 
-function reducer (state=[], action) {
+function reducer(state = [], action) {
   do_print("Action called: " + action.type);
   if (action.type === ERROR_TYPE) {
     state.push(action);
   }
   return [...state];
 }
--- a/devtools/client/shared/redux/middleware/thunk.js
+++ b/devtools/client/shared/redux/middleware/thunk.js
@@ -9,11 +9,11 @@
  * allowing the action to create multiple actions (most likely
  * asynchronously).
  */
 function thunk({ dispatch, getState }) {
   return next => action => {
     return (typeof action === "function")
       ? action(dispatch, getState)
       : next(action);
-  }
+  };
 }
 exports.thunk = thunk;
--- a/devtools/client/shared/redux/middleware/wait-service.js
+++ b/devtools/client/shared/redux/middleware/wait-service.js
@@ -35,32 +35,30 @@ function waitUntilService({ dispatch, ge
     // Find the pending requests whose predicates are satisfied with
     // this action. Wait to run the requests until after we update the
     // pending queue because the request handler may synchronously
     // dispatch again and run this service (that use case is
     // completely valid).
     for (let request of pending) {
       if (request.predicate(action)) {
         readyRequests.push(request);
-      }
-      else {
+      } else {
         stillPending.push(request);
       }
     }
 
     pending = stillPending;
     for (let request of readyRequests) {
       request.run(dispatch, getState, action);
     }
   }
 
   return next => action => {
     if (action.type === NAME) {
       pending.push(action);
+      return null;
     }
-    else {
-      var result = next(action);
-      checkPending(action);
-      return result;
-    }
-  }
+    let result = next(action);
+    checkPending(action);
+    return result;
+  };
 }
 exports.waitUntilService = waitUntilService;
--- a/devtools/client/shared/redux/non-react-subscriber.js
+++ b/devtools/client/shared/redux/non-react-subscriber.js
@@ -85,17 +85,17 @@ function makeStateBroadcaster(stillAlive
     },
 
     subscribeToStore: store => {
       store.subscribe(() => {
         if (stillAliveFunc()) {
           enqueuedChanges.forEach(([name, payload]) => {
             if (listeners[name]) {
               listeners[name].forEach(listener => {
-                listener(payload)
+                listener(payload);
               });
             }
           });
           enqueuedChanges = [];
         }
       });
     }
   };
@@ -110,41 +110,44 @@ function makeStateBroadcaster(stillAlive
  * @param {Object} broadcaster
  * @return {Object}
  */
 function enhanceStoreWithBroadcaster(store, broadcaster) {
   broadcaster.subscribeToStore(store);
   store.onChange = broadcaster.onChange;
   store.offChange = broadcaster.offChange;
   return store;
-};
+}
 
 /**
  * Function that takes a hash of reducers, like `combineReducers`, and
  * an `emitChange` function and returns a function to be used as a
  * reducer for a Redux store. This allows all reducers defined here to
  * receive a third argument, the `emitChange` function, for
  * event-based subscriptions from within reducers.
  *
  * @param {Object} reducers
  * @param {Function} emitChange
  * @return {Function}
  */
 function combineBroadcastingReducers(reducers, emitChange) {
   // Wrap each reducer with a wrapper function that calls
   // the reducer with a third argument, an `emitChange` function.
   // Use this rather than a new custom top level reducer that would ultimately
-  // have to replicate redux's `combineReducers` so we only pass in correct state,
-  // the error checking, and other edge cases.
+  // have to replicate redux's `combineReducers` so we only pass in correct
+  // state, the error checking, and other edge cases.
   function wrapReduce(newReducers, key) {
-    newReducers[key] = (state, action) => reducers[key](state, action, emitChange);
+    newReducers[key] = (state, action) => {
+      return reducers[key](state, action, emitChange);
+    };
     return newReducers;
   }
 
-  return combineReducers(Object.keys(reducers).reduce(wrapReduce, Object.create(null)));
+  return combineReducers(
+    Object.keys(reducers).reduce(wrapReduce, Object.create(null))
+  );
 }
 
-
 module.exports = {
   makeStateBroadcaster,
   enhanceStoreWithBroadcaster,
   combineBroadcastingReducers
 };