зеркало из https://github.com/twbs/bootlint.git
Merge pull request #89 from twbs/button-type-reset
Don't complain about button `type="reset"`
This commit is contained in:
Коммит
fe8ad6464d
|
@ -290,7 +290,7 @@ var cheerio = require('cheerio');
|
|||
}
|
||||
};
|
||||
exports.lintBtnType = function ($) {
|
||||
var badBtnType = $('button:not([type="submit"], [type="button"])');
|
||||
var badBtnType = $('button:not([type="submit"], [type="reset"], [type="button"])');
|
||||
if (badBtnType.length) {
|
||||
return "Always set a `type` on `<button>`s.";
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<body>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
<button type="reset">Reset</button>
|
||||
<button type="button">Button</button>
|
||||
|
||||
<div id="qunit"></div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче