Bug 1532937 - Enable ESLint for dom/flex and dom/grid (manual changes). r=Standard8,smaug
authorShashank kaushik <shashank.kaushik@walmartlabs.com>
Mon, 03 Jun 2019 10:35:57 +0000
changeset 476593 eb279dbdefe4e94be1e5d7e3387bdc0c770b6bd7
parent 476592 7d65d293dc730910f71fcae3df120cac20681f79
child 476594 cf13d6e64f975cbdb9d18a10a19ebbd680baa0fa
push id113298
push usercsabou@mozilla.com
push dateMon, 03 Jun 2019 16:36:38 +0000
treeherdermozilla-inbound@3ed9612c94ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, smaug
bugs1532937
milestone69.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 1532937 - Enable ESLint for dom/flex and dom/grid (manual changes). r=Standard8,smaug Depends on D33345 Differential Revision: https://phabricator.services.mozilla.com/D33352
.eslintignore
dom/flex/test/chrome/test_flex_lines.html
dom/grid/test/chrome/test_grid_implicit.html
--- a/.eslintignore
+++ b/.eslintignore
@@ -18,18 +18,16 @@ dom/base/test/*.*
 dom/base/test/unit/test_serializers_entities*.js
 dom/base/test/unit_ipc/**
 dom/base/test/jsmodules/**
 dom/canvas/**
 dom/encoding/**
 dom/events/**
 dom/fetch/**
 dom/file/**
-dom/flex/**
-dom/grid/**
 dom/html/**
 dom/jsurl/**
 dom/media/test/**
 !dom/media/test/marionette/yttest/*.js
 dom/media/tests/**
 dom/media/webaudio/**
 dom/media/webspeech/**
 dom/messagechannel/**
--- a/dom/flex/test/chrome/test_flex_lines.html
+++ b/dom/flex/test/chrome/test_flex_lines.html
@@ -246,44 +246,44 @@ function runTests() {
        itemCount: 3 }],
     [{ crossStart: 3,
        crossSize: 10,
        itemCount: 2 },
      { crossStart: 19,
        crossSize: 20,
        itemCount: 3 }],
 
-	// other strange types of flex containers
+    // other strange types of flex containers
     [{ itemCount: 3 }],
     [{ crossStart: 100,
        crossSize: 300,
        mainSize: 40,
        itemCount: 3 },
      { crossStart: 400,
        crossSize: 300,
        mainSize: 20,
        itemCount: 2 }],
   ];
 
   let children = document.body.children;
   is(children.length, expectedValues.length, "Document has expected number of flex containers.");
 
   for (let i = 0; i < children.length; ++i) {
     let flex = children.item(i).getAsFlexContainer();
-	ok(flex, "Document child index " + i + " is a flex container.");
-	if (flex) {
-	  let values = expectedValues[i];
+    ok(flex, "Document child index " + i + " is a flex container.");
+    if (flex) {
+      let values = expectedValues[i];
 
-	  let lines = flex.getLines();
-	  is(lines.length, values.length, "Flex index " + i + " has expected number of lines.");
+      let lines = flex.getLines();
+      is(lines.length, values.length, "Flex index " + i + " has expected number of lines.");
 
-      for (let j = 0; j < lines.length; ++j) {
-	    testLineMatchesExpectedValues(lines[j], values[j], j, i);
-	  }
-	}
+       for (let j = 0; j < lines.length; ++j) {
+        testLineMatchesExpectedValues(lines[j], values[j], j, i);
+      }
+    }
   }
 
   SimpleTest.finish();
 }
 </script>
 </head>
 
 <body onLoad="runTests();">
--- a/dom/grid/test/chrome/test_grid_implicit.html
+++ b/dom/grid/test/chrome/test_grid_implicit.html
@@ -149,18 +149,18 @@ function runTests() {
     is(grid.rows.tracks[2].type, "explicit", "Grid row track 3 is explicit.");
   }
 
   // test area count
   is(grid.areas.length, 3,
     "Grid.areas property has length that respects implicit expansion."
   );
 
-  for (var i = 0; i < grid.areas.length; i++) {
-    var area = grid.areas[i];
+  for (let i = 0; i < grid.areas.length; i++) {
+    let area = grid.areas[i];
     if (area.name == "areaD") {
       is(area.type, "implicit", area.name + " is implicit.");
 
       // test lines of implicit areas
       is(area.rowStart, 3, area.name + " has start row line of 3.");
       is(area.rowEnd, 4, area.name + " has end row line of 4.");
       is(area.columnStart, 5, area.name + " has start column line of 5.");
       is(area.columnEnd, 6, area.name + " has end column line of 6.");
@@ -182,18 +182,18 @@ function runTests() {
     "Grid.rows.lines property has length that respects implicit expansion."
   );
 
   // test area count
   is(grid.areas.length, 1,
     "Grid.areas property has length that respects implicit expansion."
   );
 
-  for (var i = 0; i < grid.areas.length; i++) {
-    var area = grid.areas[i];
+  for (let i = 0; i < grid.areas.length; i++) {
+    let area = grid.areas[i];
     if (area.name == "areaA") {
       is(area.type, "implicit", area.name + " is implicit.");
 
       // test lines of implicit areas
       is(area.rowStart, 1, area.name + " has start row line of 1.");
       is(area.rowEnd, 2, area.name + " has end row line of 2.");
       is(area.columnStart, 1, area.name + " has start column line of 1.");
       is(area.columnEnd, 3, area.name + " has end column line of 3.");
@@ -233,18 +233,18 @@ function runTests() {
     );
   }
 
   // test area count
   is(grid.areas.length, 4,
     "Grid.areas property reports 4 areas."
   );
 
-  for (var i = 0; i < grid.areas.length; i++) {
-    var area = grid.areas[i];
+  for (let i = 0; i < grid.areas.length; i++) {
+    let area = grid.areas[i];
     if (area.name == "areaC") {
       // test lines of implicit area
       is(area.rowStart, 1, area.name + " has start row line of 1.");
       is(area.rowEnd, 2, area.name + " has end row line of 2.");
       is(area.columnStart, 1, area.name + " has start column line of 1.");
       is(area.columnEnd, 2, area.name + " has end column line of 2.");
     }
   }
@@ -302,18 +302,18 @@ function runTests() {
     }
   }
 
   // Test the fifth grid wrapper
   wrapper = document.getElementById("wrapper5");
   grid = wrapper.getGridFragments()[0];
 
   // Test that lineName-reversed implicit areas have the correct names.
-  for (var i = 0; i < grid.areas.length; i++) {
-    var area = grid.areas[i];
+  for (let i = 0; i < grid.areas.length; i++) {
+    let area = grid.areas[i];
     // test the resulting start/end lines of the areas has:
     // Start line: [a-end]
     // End Line: [a-start]
     if (area.name == "a") {
       const startLineNames = grid.cols.lines[area.columnStart - 1].names;
       const endLineNames = grid.cols.lines[area.columnEnd - 1].names;
 
       isnot(startLineNames.indexOf("a-end"), -1,