diff options
author | tclindner <tclindner@users.noreply.github.com> | 2017-08-10 06:55:11 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2017-08-10 06:55:11 +0300 |
commit | ae07fa226c14d43477e9207d300a0dffaf1dad40 (patch) | |
tree | baf9392ad1c758d21895f279476ac006f71208e1 /src | |
parent | 58fce102f3e22b6197df67b7850ce49abc6aaeed (diff) |
#315 - Add new lint for nested form groups (#351)
Diffstat (limited to 'src')
-rw-r--r-- | src/bootlint.js | 6 |
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) { |