Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

Commit

Permalink
Some adaption for new column classes
Browse files Browse the repository at this point in the history
Also removed reference to .bs-customizer-input
  • Loading branch information
Herst committed Sep 3, 2017
1 parent b5e0ec7 commit 10ed536
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/bootlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ var LocationIndex = _location.LocationIndex;
(function (exports) {
'use strict';
var NUM_COLS = 12;
var COL_REGEX = /\bcol-(xs|sm|md|lg)-(\d{1,2})\b/;
var COL_REGEX_G = /\bcol-(xs|sm|md|lg)-(\d{1,2})\b/g;
var COL_REGEX = /\bcol(-(sm|md|lg|xl))?(-(auto|\d{1,2}))?\b/;
var COL_REGEX_G = /\bcol(-(sm|md|lg|xl))?(-(auto|\d{1,2}))?\b/g;
var COL_CLASSES = [];
var SCREENS = ['xs', 'sm', 'md', 'lg'];
var SCREENS = ['', 'sm', 'md', 'lg', 'xl'];
SCREENS.forEach(function (screen) {
for (var n = 1; n <= NUM_COLS; n++) {
COL_CLASSES.push('.col-' + screen + '-' + n);
for (var n = -1; n <= NUM_COLS; n++) {
COL_CLASSES.push('.col' + (screen ? '-' + screen : '') + (n < 0 ? '' : '-' + (n || 'auto')));
}
});
var SCREEN2NUM = {
Expand Down Expand Up @@ -678,7 +678,7 @@ var LocationIndex = _location.LocationIndex;
}
});
addLinter('E013', function lintRowChildrenAreCols($, reporter) {
var ALLOWED_CHILDREN = COL_CLASSES.concat(['script', '.clearfix', '.bs-customizer-input']);
var ALLOWED_CHILDREN = COL_CLASSES.concat(['script', '.clearfix']);
var selector = '.row>*' + ALLOWED_CHILDREN.map(function (colClass) {
return ':not(' + colClass + ')';
}).join('');
Expand Down

0 comments on commit 10ed536

Please sign in to comment.