diff options
author | Herst <Herst@users.noreply.github.com> | 2019-08-19 09:25:30 +0300 |
---|---|---|
committer | Herst <Herst@users.noreply.github.com> | 2019-08-19 09:51:41 +0300 |
commit | f0e63c67ae5a46084df3e868b44c9f271335310e (patch) | |
tree | 5a668de3de2f7eee9cfe0ce57ce6ea46a2edcf01 | |
parent | bc8b6998246d704d9c61d41926cdef782b921ace (diff) |
Adapt to carousel changes (#452)
Port W014, and E041
-rw-r--r-- | src/bootlint.js | 6 | ||||
-rw-r--r-- | test/bootlint_test.js | 4 | ||||
-rw-r--r-- | test/fixtures/carousel/controls.html (renamed from test/_old_fixtures/carousel/controls.html) | 4 | ||||
-rw-r--r-- | test/fixtures/carousel/indicators.html (renamed from test/_old_fixtures/carousel/indicators.html) | 0 | ||||
-rw-r--r-- | test/fixtures/carousel/missing-active-item.html (renamed from test/_old_fixtures/carousel/missing-active-item.html) | 0 | ||||
-rw-r--r-- | test/fixtures/carousel/missing-inner.html (renamed from test/_old_fixtures/carousel/missing-inner.html) | 0 | ||||
-rw-r--r-- | test/fixtures/carousel/multiple-active-item.html (renamed from test/_old_fixtures/carousel/multiple-active-item.html) | 0 | ||||
-rw-r--r-- | test/fixtures/carousel/multiple-inner.html (renamed from test/_old_fixtures/carousel/multiple-inner.html) | 0 | ||||
-rw-r--r-- | test/fixtures/carousel/valid.html (renamed from test/_old_fixtures/carousel/valid.html) | 0 |
9 files changed, 3 insertions, 11 deletions
diff --git a/src/bootlint.js b/src/bootlint.js index 1cafead..a3909f7 100644 --- a/src/bootlint.js +++ b/src/bootlint.js @@ -520,9 +520,8 @@ var LocationIndex = _location.LocationIndex; }); }); */ - /* addLinter('W014', function lintCarouselControls($, reporter) { - var controls = $('.carousel-indicators > li, .carousel-control'); + var controls = $('.carousel-indicators > li, .carousel-control-next, .carousel-control-prev'); controls.each(function (_index, cont) { var control = $(cont); var target = control.attr('href') || control.attr('data-target'); @@ -533,7 +532,6 @@ var LocationIndex = _location.LocationIndex; } }); }); - */ /* addLinter('W016', function lintDisabledClassOnButton($, reporter) { var btnsWithDisabledClass = $('button.btn.disabled, input.btn.disabled'); @@ -972,7 +970,6 @@ var LocationIndex = _location.LocationIndex; } }); */ - /* addLinter('E041', function lintCarouselStructure($, reporter) { var carouselsWithWrongInners = $('.carousel').filter(function () { return $(this).children('.carousel-inner').length !== 1; @@ -988,7 +985,6 @@ var LocationIndex = _location.LocationIndex; reporter('`.carousel-inner` must have exactly one `.item.active` child.', innersWithWrongActiveItems); } }); - */ /* addLinter('E042', function lintFormControlOnWrongControl($, reporter) { var formControlsOnWrongTags = $('.form-control:not(input,textarea,select)'); diff --git a/test/bootlint_test.js b/test/bootlint_test.js index 80d2d0b..2825dda 100644 --- a/test/bootlint_test.js +++ b/test/bootlint_test.js @@ -653,7 +653,6 @@ exports.bootlint = { test.done(); }, */ - /* 'carousel control target': function (test) { test.expect(3); test.deepEqual(lintHtml(utf8Fixture('carousel/indicators.html')), @@ -674,7 +673,6 @@ exports.bootlint = { ); test.done(); }, - */ /* 'navbar pulls outside of navbars': function (test) { test.expect(4); @@ -697,7 +695,6 @@ exports.bootlint = { test.done(); }, */ - /* 'carousel structure': function (test) { test.expect(5); test.deepEqual(lintHtml(utf8Fixture('carousel/valid.html')), @@ -722,7 +719,6 @@ exports.bootlint = { ); test.done(); }, - */ /* 'container inside navbar': function (test) { test.expect(1); diff --git a/test/_old_fixtures/carousel/controls.html b/test/fixtures/carousel/controls.html index b8e4047..9c5c3bb 100644 --- a/test/_old_fixtures/carousel/controls.html +++ b/test/fixtures/carousel/controls.html @@ -26,8 +26,8 @@ <div class="carousel-caption"></div> </div> </div> - <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> - <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> </div> diff --git a/test/_old_fixtures/carousel/indicators.html b/test/fixtures/carousel/indicators.html index d43aca4..d43aca4 100644 --- a/test/_old_fixtures/carousel/indicators.html +++ b/test/fixtures/carousel/indicators.html diff --git a/test/_old_fixtures/carousel/missing-active-item.html b/test/fixtures/carousel/missing-active-item.html index bf4a44e..bf4a44e 100644 --- a/test/_old_fixtures/carousel/missing-active-item.html +++ b/test/fixtures/carousel/missing-active-item.html diff --git a/test/_old_fixtures/carousel/missing-inner.html b/test/fixtures/carousel/missing-inner.html index 0b42492..0b42492 100644 --- a/test/_old_fixtures/carousel/missing-inner.html +++ b/test/fixtures/carousel/missing-inner.html diff --git a/test/_old_fixtures/carousel/multiple-active-item.html b/test/fixtures/carousel/multiple-active-item.html index 439e90c..439e90c 100644 --- a/test/_old_fixtures/carousel/multiple-active-item.html +++ b/test/fixtures/carousel/multiple-active-item.html diff --git a/test/_old_fixtures/carousel/multiple-inner.html b/test/fixtures/carousel/multiple-inner.html index 75c5aac..75c5aac 100644 --- a/test/_old_fixtures/carousel/multiple-inner.html +++ b/test/fixtures/carousel/multiple-inner.html diff --git a/test/_old_fixtures/carousel/valid.html b/test/fixtures/carousel/valid.html index ab4c49c..ab4c49c 100644 --- a/test/_old_fixtures/carousel/valid.html +++ b/test/fixtures/carousel/valid.html |