Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootlint.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortclindner <tclindner@users.noreply.github.com>2017-08-10 06:55:11 +0300
committerXhmikosR <xhmikosr@gmail.com>2017-08-10 06:55:11 +0300
commitae07fa226c14d43477e9207d300a0dffaf1dad40 (patch)
treebaf9392ad1c758d21895f279476ac006f71208e1 /src
parent58fce102f3e22b6197df67b7850ce49abc6aaeed (diff)
#315 - Add new lint for nested form groups (#351)
Diffstat (limited to 'src')
-rw-r--r--src/bootlint.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootlint.js b/src/bootlint.js
index e9650c0..ef08578 100644
--- a/src/bootlint.js
+++ b/src/bootlint.js
@@ -1099,6 +1099,12 @@ var LocationIndex = _location.LocationIndex;
reporter('`.modal-dialog` must have a `role="document"` attribute.', modalDialogs);
}
});
+ addLinter("E050", function lintNestedFormGroups($, reporter) {
+ var nestedFormGroups = $('.form-group > .form-group');
+ if (nestedFormGroups.length) {
+ reporter('`.form-group`s should not be nested.', nestedFormGroups);
+ }
+ });
exports._lint = function ($, reporter, disabledIdList, html) {
var locationIndex = IN_NODE_JS ? new LocationIndex(html) : null;
var reporterWrapper = IN_NODE_JS ? function (problem) {