Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

[v1] New container-related checks #422

Merged
merged 1 commit into from
Jul 28, 2019
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
10 changes: 0 additions & 10 deletions src/bootlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ var LocationIndex = _location.LocationIndex;
}
};
})());
/*
addLinter('E003', function lintContainers($, reporter) {
var notAnyColClass = COL_CLASSES.map(function (colClass) {
return ':not(' + colClass + ')';
Expand All @@ -615,15 +614,6 @@ var LocationIndex = _location.LocationIndex;
reporter('Found one or more `.row`s that were not children of a grid column or descendants of a `.container` or `.container-fluid` or `.modal-body`', rowsOutsideColumnsAndContainers);
}
});
*/
/*
addLinter('E004', function lintNestedContainers($, reporter) {
var nestedContainers = $('.container, .container-fluid').children('.container, .container-fluid');
if (nestedContainers.length) {
reporter('Containers (`.container` and `.container-fluid`) are not nestable', nestedContainers);
}
});
*/
addLinter('E005', function lintRowAndColOnSameElem($, reporter) {
var selector = COL_CLASSES.map(function (col) {
return '.row' + col;
Expand Down
29 changes: 0 additions & 29 deletions test/_old_fixtures/containers/nested-fixed-fixed.html

This file was deleted.

29 changes: 0 additions & 29 deletions test/_old_fixtures/containers/nested-fixed-fluid.html

This file was deleted.

29 changes: 0 additions & 29 deletions test/_old_fixtures/containers/nested-fluid-fixed.html

This file was deleted.

29 changes: 0 additions & 29 deletions test/_old_fixtures/containers/nested-fluid-fluid.html

This file was deleted.

20 changes: 0 additions & 20 deletions test/bootlint_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,6 @@ exports.bootlint = {
'should not complain when rows are children of `.modal-body`.');
test.done();
},
*/
/*
'nested containers': function (test) {
test.expect(4);
test.deepEqual(lintHtml(utf8Fixture('containers/nested-fixed-fixed.html')),
['Containers (`.container` and `.container-fluid`) are not nestable'],
'should complain when a container is within a container.');
test.deepEqual(lintHtml(utf8Fixture('containers/nested-fixed-fluid.html')),
['Containers (`.container` and `.container-fluid`) are not nestable'],
'should complain when a container is within a container.');
test.deepEqual(lintHtml(utf8Fixture('containers/nested-fluid-fluid.html')),
['Containers (`.container` and `.container-fluid`) are not nestable'],
'should complain when a container is within a container.');
test.deepEqual(lintHtml(utf8Fixture('containers/nested-fluid-fixed.html')),
['Containers (`.container` and `.container-fluid`) are not nestable'],
'should complain when a container is within a container.');
test.done();
},
*/
/*
'viewport meta tag': function (test) {
test.expect(2);
Expand All @@ -138,7 +119,6 @@ exports.bootlint = {
'should complain when .row and .col* are used on the same element.');
test.done();
},
/*
'row and container classes on same element': function (test) {
test.expect(2);
test.deepEqual(lintHtml(utf8Fixture('containers/fixed-row-same-elem.html')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<body>
<div class="container-fluid">
<div class="row">
<div class="col-xs-6">
<div class="col-sm-6">
<div class="row">
<div class="col-xs-12">
<div class="col-xl-12">
We can nest rows within columns.
</div>
</div>
</div>
<div class="col-xs-6">Rest</div>
<div class="col-md-6">Rest</div>
</div>
</div>

Expand Down