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
90 changes: 0 additions & 90 deletions src/bootlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,17 +338,6 @@ var LocationIndex = _location.LocationIndex;
});
*/
/*
addLinter('W002', function lintXUaCompatible($, reporter) {
var meta = $([
'head>meta[http-equiv="X-UA-Compatible"][content="IE=edge"]',
'head>meta[http-equiv="x-ua-compatible"][content="ie=edge"]'
].join(','));
if (!meta.length) {
reporter('`<head>` is missing X-UA-Compatible `<meta>` tag that disables old IE compatibility modes');
}
});
*/
/*
addLinter('W003', function lintViewport($, reporter) {
var meta = $('head>meta[name="viewport"][content]');
if (!meta.length) {
Expand Down Expand Up @@ -496,14 +485,6 @@ var LocationIndex = _location.LocationIndex;
});
});
/*
addLinter('W010', function lintMediaPulls($, reporter) {
var mediaPulls = $('.media>.pull-left, .media>.pull-right');
if (mediaPulls.length) {
reporter('Using `.pull-left` or `.pull-right` as part of the media object component is deprecated as of Bootstrap v3.3.0. Use `.media-left` or `.media-right` instead.');
}
});
*/
/*
addLinter('W012', function lintNavbarContainers($, reporter) {
var navBars = $('.navbar');
var containers = [
Expand Down Expand Up @@ -564,36 +545,6 @@ var LocationIndex = _location.LocationIndex;
});
*/
/*
addLinter('W015', function lintNewBootstrap($, reporter) {
var FUTURE_VERSION_ERROR = 'Detected what appears to be Bootstrap v4 or later. This version of Bootlint only supports Bootstrap v3.';
var theWindow = getBrowserWindowObject();

var globaljQuery = theWindow && (theWindow.$ || theWindow.jQuery);
// istanbul ignore if
if (globaljQuery) {
var versions = jqueryPluginVersions(globaljQuery);
if (versions.length) {
var minVersion = versions[0];
if (semver.gte(minVersion, BOOTSTRAP_VERSION_4, true)) {
reporter(FUTURE_VERSION_ERROR);
return;
}
}
}
// check for Bootstrap <link>s and <script>s
var bootstraps = $(BOOTSTRAP_FILES);
bootstraps.each(function () {
var version = versionInLinkedElement($, this);
if (version === null) {
return;
}
if (semver.gte(version, BOOTSTRAP_VERSION_4, true)) {
reporter(FUTURE_VERSION_ERROR, $(this));
}
});
});
*/
/*
addLinter('W016', function lintDisabledClassOnButton($, reporter) {
var btnsWithDisabledClass = $('button.btn.disabled, input.btn.disabled');
if (btnsWithDisabledClass.length) {
Expand Down Expand Up @@ -644,19 +595,6 @@ var LocationIndex = _location.LocationIndex;
};
})());
/*
addLinter('E002', function lintBootstrapv2($, reporter) {
var columnClasses = [];
for (var n = 1; n <= 12; n++) {
columnClasses.push('.span' + n);
}
var selector = columnClasses.join(',');
var spanNs = $(selector);
if (spanNs.length) {
reporter('Found one or more uses of outdated Bootstrap v2 `.spanN` grid classes', spanNs);
}
});
*/
/*
addLinter('E003', function lintContainers($, reporter) {
var notAnyColClass = COL_CLASSES.map(function (colClass) {
return ':not(' + colClass + ')';
Expand Down Expand Up @@ -975,24 +913,6 @@ var LocationIndex = _location.LocationIndex;
});
});
/*
addLinter('E030', function lintSoloGlyphiconClasses($, reporter) {
var missingGlyphiconClass = $('[class*="glyphicon-"]:not(.glyphicon):not(.glyphicon-class)').filter(function () {
return /\bglyphicon-([a-zA-Z]+)\b/.test($(this).attr('class'));
});
if (missingGlyphiconClass.length) {
reporter('Found elements with a `.glyphicon-*` class that were missing the additional required `.glyphicon` class.', missingGlyphiconClass);
}
});
*/
/*
addLinter('E031', function lintGlyphiconOnNonEmptyElement($, reporter) {
var glyphiconNotEmpty = $('.glyphicon:not(:empty)');
if (glyphiconNotEmpty.length) {
reporter('Glyphicon classes must only be used on elements that contain no text content and have no child elements.', glyphiconNotEmpty);
}
});
*/
/*
addLinter('E032', function lintModalStructure($, reporter) {
var elements;

Expand Down Expand Up @@ -1067,16 +987,6 @@ var LocationIndex = _location.LocationIndex;
}
});
/*
addLinter('E038', function lintMediaPulls($, reporter) {
var mediaPullsOutsideMedia = $('.media-left, .media-right').filter(function () {
return !$(this).parent().closest('.media').length;
});
if (mediaPullsOutsideMedia.length) {
reporter('`.media-left` and `.media-right` should not be used outside of `.media` objects.', mediaPullsOutsideMedia);
}
});
*/
/*
addLinter('E039', function lintNavbarPulls($, reporter) {
var navbarPullsOutsideNavbars = $('.navbar-left, .navbar-right').filter(function () {
return !$(this).parent().closest('.navbar').length;
Expand Down
32 changes: 0 additions & 32 deletions test/_old_fixtures/bs-v2.html

This file was deleted.

27 changes: 0 additions & 27 deletions test/_old_fixtures/glyphicons/missing-glyphicon-class.html

This file was deleted.

27 changes: 0 additions & 27 deletions test/_old_fixtures/glyphicons/on-elem-with-child.html

This file was deleted.

27 changes: 0 additions & 27 deletions test/_old_fixtures/glyphicons/on-elem-with-text.html

This file was deleted.

25 changes: 0 additions & 25 deletions test/_old_fixtures/glyphicons/valid.html

This file was deleted.

33 changes: 0 additions & 33 deletions test/_old_fixtures/media/deprecated-pull-classes.html

This file was deleted.

39 changes: 0 additions & 39 deletions test/_old_fixtures/media/media-classes.html

This file was deleted.

35 changes: 0 additions & 35 deletions test/_old_fixtures/media/media-pull-on-media.html

This file was deleted.

Loading