From 63a44b591bc6f74b38bed0afa8608b683bac0a4c Mon Sep 17 00:00:00 2001 From: Herst Date: Sun, 23 Sep 2018 18:14:15 +0200 Subject: [PATCH] Cards (formerly panels) Port E023, E024, E025, and E026 --- dist/browser/bootlint.js | 176 +++++++++++++++--- src/bootlint.js | 48 ++--- test/bootlint_test.js | 32 ++-- .../cards/card-body-missing-ancestor.html} | 4 +- .../cards/card-footer-missing-ancestor.html} | 4 +- .../cards/card-header-missing-ancestor.html} | 4 +- .../cards/card-title-missing-ancestor.html} | 6 +- .../panels.html => fixtures/cards/cards.html} | 56 +++--- 8 files changed, 228 insertions(+), 102 deletions(-) rename test/{_old_fixtures/panels/panel-body-missing-parent.html => fixtures/cards/card-body-missing-ancestor.html} (87%) rename test/{_old_fixtures/panels/panel-heading-missing-parent.html => fixtures/cards/card-footer-missing-ancestor.html} (89%) rename test/{_old_fixtures/panels/panel-footer-missing-parent.html => fixtures/cards/card-header-missing-ancestor.html} (87%) rename test/{_old_fixtures/panels/panel-title-missing-parent.html => fixtures/cards/card-title-missing-ancestor.html} (84%) rename test/{_old_fixtures/panels/panels.html => fixtures/cards/cards.html} (75%) diff --git a/dist/browser/bootlint.js b/dist/browser/bootlint.js index caa6ddf6..7e32b74a 100644 --- a/dist/browser/bootlint.js +++ b/dist/browser/bootlint.js @@ -12229,7 +12229,7 @@ var LocationIndex = _location.LocationIndex; allLinters[id] = linterWrapper; } - + /* addLinter('W001', function lintMetaCharsetUtf8($, reporter) { var meta = $('head>meta[charset]'); var charset = meta.attr('charset'); @@ -12247,6 +12247,8 @@ var LocationIndex = _location.LocationIndex; reporter('charset `` tag is specifying a legacy, non-UTF-8 charset', meta); } }); + */ + /* addLinter('W002', function lintXUaCompatible($, reporter) { var meta = $([ 'head>meta[http-equiv="X-UA-Compatible"][content="IE=edge"]', @@ -12256,18 +12258,24 @@ var LocationIndex = _location.LocationIndex; reporter('`` is missing X-UA-Compatible `` tag that disables old IE compatibility modes'); } }); + */ + /* addLinter('W003', function lintViewport($, reporter) { var meta = $('head>meta[name="viewport"][content]'); if (!meta.length) { reporter('`` is missing viewport `` tag that enables responsiveness'); } }); + */ + /* addLinter('W004', function lintRemoteModals($, reporter) { var remoteModalTriggers = $('[data-toggle="modal"][data-remote]'); if (remoteModalTriggers.length) { reporter('Found one or more modals using the deprecated `remote` option', remoteModalTriggers); } }); + */ + /* addLinter('W005', function lintJquery($, reporter) { var OLD_JQUERY = 'Found what might be an outdated version of jQuery; Bootstrap requires jQuery v' + MIN_JQUERY_VERSION + ' or higher'; var NO_JQUERY_BUT_BS_JS = 'Unable to locate jQuery, which is required for Bootstrap\'s JavaScript plugins to work'; @@ -12276,14 +12284,14 @@ var LocationIndex = _location.LocationIndex; var hasBsJs = Boolean(bsScripts.minifieds.length || bsScripts.longhands.length); var theWindow = null; try { - /* eslint-disable no-undef, block-scoped-var */ + // eslint-disable no-undef, block-scoped-var theWindow = window; - /* eslint-enable no-undef, block-scoped-var */ + // eslint-enable no-undef, block-scoped-var } catch (e) { // deliberately do nothing // empty } - /* @covignore */ + // @covignore if (theWindow) { // check browser global jQuery var globaljQuery = theWindow.$ || theWindow.jQuery; @@ -12344,6 +12352,8 @@ var LocationIndex = _location.LocationIndex; } }); }); + */ + /* addLinter('W006', function lintTooltipsOnDisabledElems($, reporter) { var selector = [ '[disabled][data-toggle="tooltip"]', @@ -12361,18 +12371,24 @@ 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 `