Bug 1425244 - Enable ESLint rule no-cond-assign for accessible/tests/mochitest/. r=surkov
authorMark Banner <standard8@mozilla.com>
Mon, 11 Dec 2017 13:36:16 +0000
changeset 448272 86a980a403db4ac4f3552b02b40d9d15dee34e1f
parent 448271 899e79132bbecc07d33d6ac9487db30c48b66918
child 448273 f0802f46c9d9713f015f3396d78b8fdac18bea9a
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1425244
milestone59.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 1425244 - Enable ESLint rule no-cond-assign for accessible/tests/mochitest/. r=surkov MozReview-Commit-ID: 59yovY1BQ0p
accessible/tests/mochitest/.eslintrc.js
accessible/tests/mochitest/actions/test_link.html
accessible/tests/mochitest/name/markup.js
--- a/accessible/tests/mochitest/.eslintrc.js
+++ b/accessible/tests/mochitest/.eslintrc.js
@@ -6,17 +6,16 @@ module.exports = {
   ],
   "rules": {
     "mozilla/no-cpows-in-tests": "error",
     "mozilla/reject-importGlobalProperties": "error",
 
     // XXX These are rules that are enabled in the recommended configuration, but
     // disabled here due to failures when initially implemented. They should be
     // removed (and hence enabled) at some stage.
-    "no-cond-assign": "off",
     "no-lonely-if": "off",
     "no-nested-ternary": "off",
     "no-new-object": "off",
     "no-redeclare": "off",
     "no-shadow": "off",
     "no-undef": "off",
     "space-unary-ops": "off",
   }
--- a/accessible/tests/mochitest/actions/test_link.html
+++ b/accessible/tests/mochitest/actions/test_link.html
@@ -19,17 +19,17 @@
   <script type="application/javascript">
     function getAnchorTargetDocumentAcc() {
       var thisTabDocAcc = getTabDocAccessible();
       var thisDocTabPanelAcc = thisTabDocAcc.parent.parent;
       var tabPanelsAcc = thisDocTabPanelAcc.parent;
       var newDocTabPanelAcc = tabPanelsAcc.firstChild;
       var nextAcc = newDocTabPanelAcc;
 
-      while (nextAcc = nextAcc.nextSibling) {
+      while ((nextAcc = nextAcc.nextSibling)) {
         // Find the last accessible for a browser with about:mozilla loaded.
         if (nextAcc.firstChild.DOMNode.currentURI.spec == "about:mozilla") {
           newDocTabPanelAcc = nextAcc;
         }
       }
 
       return newDocTabPanelAcc.firstChild.firstChild;
     }
--- a/accessible/tests/mochitest/name/markup.js
+++ b/accessible/tests/mochitest/name/markup.js
@@ -347,17 +347,17 @@ function evaluateXPath(aNode, aExpr, aRe
     var node = aNode.ownerDocument == null ?
       aNode.documentElement : aNode.ownerDocument.documentElement;
     resolver = xpe.createNSResolver(node);
   }
 
   var result = xpe.evaluate(aExpr, aNode, resolver, 0, null);
   var found = [];
   var res;
-  while (res = result.iterateNext())
+  while ((res = result.iterateNext()))
     found.push(res);
 
   return found;
 }
 
 function htmlDocResolver(aPrefix) {
   var ns = {
     "html": "http://www.w3.org/1999/xhtml"