Bug 1330791 - Enable the no-native-reassign rule for eslint in /services and fix the associated error. r=markh
☠☠ backed out by e34a208d8ac2 ☠ ☠
authorJared Wein <jwein@mozilla.com>
Thu, 12 Jan 2017 18:28:48 -0500
changeset 377096 eada8de7256f96997b44296c9d37805a4024dceb
parent 377095 a3c656a9f3ca909c07dcb98134dd8711b6753cb6
child 377097 64dcf6b92394480d0546657f3615a31a24c0f3b4
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1330791
milestone53.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 1330791 - Enable the no-native-reassign rule for eslint in /services and fix the associated error. r=markh MozReview-Commit-ID: 65EsZGCJPMD
services/.eslintrc.js
services/sync/tests/unit/test_status.js
--- a/services/.eslintrc.js
+++ b/services/.eslintrc.js
@@ -5,12 +5,11 @@ module.exports = {
     "../toolkit/.eslintrc.js"
   ],
   rules: {
     /* These rules are only set to warn temporarily
        until they get fixed, at which point their
        respective line in this file should be removed. */
     "consistent-return": "warn",
     "no-func-assign": "warn",
-    "no-native-reassign": "warn",
     "no-nested-ternary": "warn",
   }
 };
--- a/services/sync/tests/unit/test_status.js
+++ b/services/sync/tests/unit/test_status.js
@@ -68,17 +68,17 @@ function run_test() {
 
 
   // Check resetSync
   Status.sync = SYNC_FAILED;
   Status.resetSync();
 
   do_check_eq(Status.service, STATUS_OK);
   do_check_eq(Status.sync, SYNC_SUCCEEDED);
-  for (name in Status.engines) {
+  if (Status.engines.length) {
     do_throw("Status.engines should be empty.");
   }
 
 
   // Check resetBackoff
   Status.enforceBackoff = true;
   Status.backOffInterval = 4815162342;
   Status.backOffInterval = 42;