From c329f1cc44cf0055e3c4d7f2f280e85fb1e8a572 Mon Sep 17 00:00:00 2001 From: Shashank kaushik Date: Mon, 3 Jun 2019 10:35:57 +0000 Subject: [PATCH] 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 --HG-- extra : moz-landing-system : lando --- .eslintignore | 2 -- dom/flex/test/chrome/test_flex_lines.html | 20 ++++++++++---------- dom/grid/test/chrome/test_grid_implicit.html | 16 ++++++++-------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.eslintignore b/.eslintignore index ace04c34483b..c363e2cfee94 100644 --- a/.eslintignore +++ b/.eslintignore @@ -23,8 +23,6 @@ dom/encoding/** dom/events/** dom/fetch/** dom/file/** -dom/flex/** -dom/grid/** dom/html/** dom/jsurl/** dom/media/test/** diff --git a/dom/flex/test/chrome/test_flex_lines.html b/dom/flex/test/chrome/test_flex_lines.html index 30a4594e4e48..adbafa95aff5 100644 --- a/dom/flex/test/chrome/test_flex_lines.html +++ b/dom/flex/test/chrome/test_flex_lines.html @@ -251,7 +251,7 @@ function runTests() { crossSize: 20, itemCount: 3 }], - // other strange types of flex containers + // other strange types of flex containers [{ itemCount: 3 }], [{ crossStart: 100, crossSize: 300, @@ -268,17 +268,17 @@ function runTests() { 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(); diff --git a/dom/grid/test/chrome/test_grid_implicit.html b/dom/grid/test/chrome/test_grid_implicit.html index f80f7fabc50c..82f3284dad2f 100644 --- a/dom/grid/test/chrome/test_grid_implicit.html +++ b/dom/grid/test/chrome/test_grid_implicit.html @@ -154,8 +154,8 @@ function runTests() { "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."); @@ -187,8 +187,8 @@ function runTests() { "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."); @@ -238,8 +238,8 @@ function runTests() { "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."); @@ -307,8 +307,8 @@ function runTests() { 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]