From 3429120ef259a82be55a9c63bd8a03948e75951a Mon Sep 17 00:00:00 2001 From: Herst Date: Fri, 16 Aug 2019 10:31:38 +0200 Subject: [PATCH] Adapt to button changes Remove E016, and E021 Port W007, W016, and E047 --- src/bootlint.js | 30 -------- .../buttons-plugin/checkbox-bad.html | 37 ---------- .../buttons-plugin/radio-bad.html | 37 ---------- test/_old_fixtures/buttons-plugin/valid.html | 47 ------------ .../buttons/btn-toggle-after-btn.html | 41 ----------- test/_old_fixtures/buttons/btn-toggle.html | 71 ------------------- test/bootlint_test.js | 37 +--------- .../buttons/btn-correct-element.html | 0 .../buttons/btn-incorrect-element.html | 0 .../buttons/button-disabled-class.html | 0 .../buttons/disabled-attribute.html | 0 .../buttons/input-btn-disabled-class.html | 0 .../buttons/with-type.html | 0 .../buttons/without-type.html | 0 14 files changed, 2 insertions(+), 298 deletions(-) delete mode 100644 test/_old_fixtures/buttons-plugin/checkbox-bad.html delete mode 100644 test/_old_fixtures/buttons-plugin/radio-bad.html delete mode 100644 test/_old_fixtures/buttons-plugin/valid.html delete mode 100644 test/_old_fixtures/buttons/btn-toggle-after-btn.html delete mode 100644 test/_old_fixtures/buttons/btn-toggle.html rename test/{_old_fixtures => fixtures}/buttons/btn-correct-element.html (100%) rename test/{_old_fixtures => fixtures}/buttons/btn-incorrect-element.html (100%) rename test/{_old_fixtures => fixtures}/buttons/button-disabled-class.html (100%) rename test/{_old_fixtures => fixtures}/buttons/disabled-attribute.html (100%) rename test/{_old_fixtures => fixtures}/buttons/input-btn-disabled-class.html (100%) rename test/{_old_fixtures => fixtures}/buttons/with-type.html (100%) rename test/{_old_fixtures => fixtures}/buttons/without-type.html (100%) diff --git a/src/bootlint.js b/src/bootlint.js index 6c0279ab..a6b87535 100644 --- a/src/bootlint.js +++ b/src/bootlint.js @@ -440,14 +440,12 @@ var LocationIndex = _location.LocationIndex; } }); */ - /* addLinter('W007', function lintBtnType($, reporter) { var badBtnType = $('button:not([type="submit"], [type="reset"], [type="button"])'); if (badBtnType.length) { reporter('Found one or more ` - - - - -
-
    -
  1. -
- - diff --git a/test/_old_fixtures/buttons/btn-toggle.html b/test/_old_fixtures/buttons/btn-toggle.html deleted file mode 100644 index a1ee15a0..00000000 --- a/test/_old_fixtures/buttons/btn-toggle.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - Test - - - - - - - - - - - -
- - - -
- - -
- - - -
- - -
-
- - -
- - -
- -
-
    - - diff --git a/test/bootlint_test.js b/test/bootlint_test.js index c3c7e2a8..d701102d 100644 --- a/test/bootlint_test.js +++ b/test/bootlint_test.js @@ -283,19 +283,6 @@ exports.bootlint = { test.done(); }, */ - /* - 'dropdown-toggle comes before btn': function (test) { - test.expect(2); - test.deepEqual(lintHtml(utf8Fixture('buttons/btn-toggle.html')), - [], - 'should not complain when correct .dropdown-toggle markup is used.'); - test.deepEqual(lintHtml(utf8Fixture('buttons/btn-toggle-after-btn.html')), - ['`.btn.dropdown-toggle` must be the last button in a button group.'], - 'should complain when `.dropdown-toggle` is on the left side of a btn'); - test.done(); - }, - */ - /* 'buttons should set type': function (test) { test.expect(2); test.deepEqual(lintHtml(utf8Fixture('buttons/without-type.html')), @@ -306,22 +293,19 @@ exports.bootlint = { 'should not complain when type is set on buttons'); test.done(); }, - */ - /* 'use disabled attribute on button.btn and input.btn instead of .disabled': function (test) { test.expect(3); test.deepEqual(lintHtml(utf8Fixture('buttons/button-disabled-class.html')), ['Using the `.disabled` class on a `