Bug 1330791 - Enable the no-redeclare rule for eslint in /services and fix the associated errors. r=markh
☠☠ backed out by e34a208d8ac2 ☠ ☠
authorJared Wein <jwein@mozilla.com>
Thu, 12 Jan 2017 18:19:47 -0500
changeset 462779 b35cbfcd801f4ed7a13795aaeb3738c084f8af8d
parent 462778 25a6356de622a04b3cbd5bd83d15bbfa0442c75e
child 462780 53d4b83ccd2251b38652fa51c06580ffec93940f
push id41857
push userbmo:mh+mozilla@glandium.org
push dateWed, 18 Jan 2017 00:24:11 +0000
reviewersmarkh
bugs1330791
milestone53.0a1
Bug 1330791 - Enable the no-redeclare rule for eslint in /services and fix the associated errors. r=markh MozReview-Commit-ID: 7ADLmPB4eSu
services/.eslintrc.js
services/sync/tests/tps/test_bookmark_conflict.js
services/sync/tests/unit/test_utils_deriveKey.js
--- a/services/.eslintrc.js
+++ b/services/.eslintrc.js
@@ -11,11 +11,10 @@ module.exports = {
     "brace-style": "warn",
     "consistent-return": "warn",
     "no-cond-assign": "warn",
     "no-ex-assign": "warn",
     "no-func-assign": "warn",
     "no-native-reassign": "warn",
     "no-nested-ternary": "warn",
     "no-octal": "warn",
-    "no-redeclare": "warn",
   }
 };
--- a/services/sync/tests/tps/test_bookmark_conflict.js
+++ b/services/sync/tests/tps/test_bookmark_conflict.js
@@ -74,17 +74,17 @@ var bookmarkMods = {
     title: "Yahoo",
     changes: { location: "menu/folderd" }
   }],
 
   "menu/folderd": []
 };
 
 // a list of bookmarks to delete during a 'delete' action
-var bookmarksToDelete = {
+bookmarksToDelete = {
   "menu": [
     { folder: "foldera" },
     { folder: "folderb" },
   ],
   "menu/folderc": [
     { uri: "http://www.yahoo.com", title: "Yahoo" },
   ],
 };
--- a/services/sync/tests/unit/test_utils_deriveKey.js
+++ b/services/sync/tests/unit/test_utils_deriveKey.js
@@ -33,17 +33,17 @@ function run_test() {
       Utils.normalizePassphrase("9-5WMNU-95TQC-78Z2H-AMKBW-IZQZI")));
 
   // Base64. We don't actually use this in anger, particularly not with a 32-byte key.
   var der_key = Utils.deriveEncodedKeyFromPassphrase(der_passphrase, der_salt);
   _("Derived key in base64: " + der_key);
   do_check_eq(cryptoSvc.decrypt(cryptoSvc.encrypt("bacon", der_key, iv), der_key, iv), "bacon");
 
   // Base64, 16-byte output.
-  var der_key = Utils.deriveEncodedKeyFromPassphrase(der_passphrase, der_salt, 16);
+  der_key = Utils.deriveEncodedKeyFromPassphrase(der_passphrase, der_salt, 16);
   _("Derived key in base64: " + der_key);
   do_check_eq("d2zG0d2cBfXnRwMUGyMwyg==", der_key);
   do_check_eq(cryptoSvc.decrypt(cryptoSvc.encrypt("bacon", der_key, iv), der_key, iv), "bacon");
 
   // Base32. Again, specify '16' to avoid it generating a 256-bit key string.
   var b32key = Utils.derivePresentableKeyFromPassphrase(der_passphrase, der_salt, 16);
   var hyphenated = Utils.hyphenatePassphrase(b32key);
   do_check_true(Utils.isPassphrase(b32key));