Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/bootlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,14 +1038,12 @@ var LocationIndex = _location.LocationIndex;
}
});
*/
/*
addLinter('E045', function lintImgResponsiveOnNonImgs($, reporter) {
var imgResponsiveNotOnImg = $('.img-responsive:not(img)');
var imgResponsiveNotOnImg = $('.img-fluid:not(img)');
if (imgResponsiveNotOnImg.length) {
reporter('`.img-responsive` should only be used on `<img>`s', imgResponsiveNotOnImg);
reporter('`.img-fluid` should only be used on `<img>`s', imgResponsiveNotOnImg);
}
});
*/
addLinter('E046', function lintModalTabIndex($, reporter) {
var modalsWithoutTabindex = $('.modal:not([tabindex])');
if (modalsWithoutTabindex.length) {
Expand Down
14 changes: 6 additions & 8 deletions test/bootlint_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,20 +785,18 @@ exports.bootlint = {
test.done();
},
*/
/*
'.img-responsive not on image': function (test) {
'.img-fluid not on image': function (test) {
test.expect(2);
test.deepEqual(lintHtml(utf8Fixture('images/img-responsive-bad.html')),
['`.img-responsive` should only be used on `<img>`s'],
'should complain about .img-responsive not on an image.'
test.deepEqual(lintHtml(utf8Fixture('images/img-fluid-bad.html')),
['`.img-fluid` should only be used on `<img>`s'],
'should complain about .img-fluid not on an image.'
);
test.deepEqual(lintHtml(utf8Fixture('images/img-responsive-valid.html')),
test.deepEqual(lintHtml(utf8Fixture('images/img-fluid-valid.html')),
[],
'should not complain about .img-responsive on an image.'
'should not complain about .img-fluid on an image.'
);
test.done();
},
*/
/*
'btn classes on anchors within .navbar-nav': function (test) {
test.expect(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
</head>
<body>

<div class="img-responsive"></div>
<div class="img-fluid"></div>

<div id="qunit"></div>
<ol id="bootlint">
<li data-lint="`.img-responsive` should only be used on `<img>`s"></li>
<li data-lint="`.img-fluid` should only be used on `<img>`s"></li>
</ol>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</head>
<body>

<img class="img-responsive" alt="">
<img class="img-fluid" alt="">

<div id="qunit"></div>
<ol id="bootlint">
Expand Down