Bug 1215455 - eslint consistent-return [r=Standard8]
authorEd Lee <edilee@mozilla.com>
Sat, 17 Oct 2015 00:25:22 -0700
changeset 304189 ef65374a93d6353004c78091cb65a2f41fec7aeb
parent 304188 9b5bd211ecde43cc4131c9aeeddd457d72ab878a
child 304190 93932fd90589df350c0d3f2a79f3e9cd43419c57
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1215455
milestone44.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 1215455 - eslint consistent-return [r=Standard8]
browser/components/loop/.eslintrc
browser/components/loop/content/shared/js/activeRoomStore.js
browser/components/loop/modules/LoopRoomsCache.jsm
--- a/browser/components/loop/.eslintrc
+++ b/browser/components/loop/.eslintrc
@@ -36,17 +36,17 @@
     // Eslint built-in rules are documented at <http://eslint.org/docs/rules/>
     "array-bracket-spacing": [2, "never"],
     "block-spacing": [2, "always"],
     "callback-return": 0,         // TBD
     "camelcase": 0,               // TODO: set to 2
     "comma-spacing": 2,
     "comma-style": 2,
     "computed-property-spacing": [2, "never"],
-    "consistent-return": 0,       // TODO: set to 2
+    "consistent-return": 2,
     "curly": [2, "all"],
     "dot-location": [2, "property"],
     "eol-last": 2,
     "eqeqeq": [2, "smart"],
     "jsx-quotes": [2, "prefer-double"],
     "key-spacing": [2, {"beforeColon": false, "afterColon": true }],
     "linebreak-style": [2, "unix"],
     "new-cap": 0,                 // TODO: set to 2
--- a/browser/components/loop/content/shared/js/activeRoomStore.js
+++ b/browser/components/loop/content/shared/js/activeRoomStore.js
@@ -345,17 +345,17 @@ loop.store.ActiveRoomStore = (function()
      * @param {sharedActions.FetchServerData} actionData
      * @return {Promise} For testing purposes, returns a promise that is resolved
      *                   once data is received from the server, and it is determined
      *                   if Firefox handles the room or not.
      */
     fetchServerData: function(actionData) {
       if (actionData.windowType !== "room") {
         // Nothing for us to do here, leave it to other stores.
-        return;
+        return Promise.resolve();
       }
 
       this.setStoreState({
         roomState: ROOM_STATES.GATHER,
         roomToken: actionData.token,
         standalone: true
       });
 
--- a/browser/components/loop/modules/LoopRoomsCache.jsm
+++ b/browser/components/loop/modules/LoopRoomsCache.jsm
@@ -126,17 +126,17 @@ LoopRoomsCache.prototype = {
    *
    * @param {LOOP_SESSION_TYPE} sessionType  The session type for the room.
    * @param {String}            roomToken    The token for the room.
    * @param {String}            roomKey      The encryption key for the room.
    * @return {Promise} A promise that is resolved when the data has been stored.
    */
   setKey: Task.async(function* (sessionType, roomToken, roomKey) {
     if (sessionType != LOOP_SESSION_TYPE.FXA) {
-      return;
+      return Promise.resolve();
     }
 
     let cache = yield this._getCache();
 
     // Create these objects if they don't exist.
     // We aim to do this creation and setting of the room key in a
     // forwards-compatible way so that if new fields are added to rooms later
     // then we don't mess them up (if there's no keys).