Bug 1372427 - add rule "no-fallthrough" in switch cases. r=mattn. draft
authorJonathan Guillotte-Blouin <jguillotteblouin@mozilla.com>
Tue, 13 Jun 2017 17:10:34 -0700
changeset 597777 ef174c734cb3cee2cfd7f58d281e8b72f4181b1a
parent 597776 c027d8e6f58829d6fd0dbeaa6770fd94fc3e3420
child 597778 cd378409d15c8f7965bf9dbc265d3122a5fc2bd9
push id65025
push userbmo:jguillotteblouin@mozilla.com
push dateTue, 20 Jun 2017 23:10:16 +0000
reviewersmattn
bugs1372427
milestone56.0a1
Bug 1372427 - add rule "no-fallthrough" in switch cases. r=mattn. MozReview-Commit-ID: 7kmc7Ze9v0J
toolkit/components/satchel/.eslintrc.js
toolkit/components/satchel/FormHistoryStartup.js
--- a/toolkit/components/satchel/.eslintrc.js
+++ b/toolkit/components/satchel/.eslintrc.js
@@ -37,10 +37,11 @@ module.exports = {
     "no-use-before-define": ["error", {
       functions: false,
     }],
     complexity: ["error", {
       max: 20,
     }],
     "dot-location": ["error", "property"],
     "max-len": ["error", 100],
+    "no-fallthrough": "error",
   },
 };
--- a/toolkit/components/satchel/FormHistoryStartup.js
+++ b/toolkit/components/satchel/FormHistoryStartup.js
@@ -30,17 +30,16 @@ FormHistoryStartup.prototype = {
       case "formhistory-expire-now":
         FormHistory.expireOldEntries();
         break;
       case "profile-before-change":
         FormHistory.shutdown();
         break;
       case "profile-after-change":
         this.init();
-      default:
         break;
     }
   },
 
   inited: false,
   pendingQuery: null,
 
   init() {