зеркало из https://github.com/twbs/bootlint.git
Changed message for W007
This commit is contained in:
Родитель
f5dede0352
Коммит
a2c6627955
|
@ -9651,7 +9651,7 @@ var cheerio = require('cheerio');
|
|||
addLinter("W007", function lintBtnType($, reporter) {
|
||||
var badBtnType = $('button:not([type="submit"], [type="reset"], [type="button"])');
|
||||
if (badBtnType.length) {
|
||||
reporter("Always set a `type` on `<button>`s.");
|
||||
reporter("Found one or more `<button>`s missing a `type` attribute.");
|
||||
}
|
||||
});
|
||||
addLinter("E017", function lintBlockCheckboxes($, reporter) {
|
||||
|
|
|
@ -451,7 +451,7 @@ var cheerio = require('cheerio');
|
|||
addLinter("W007", function lintBtnType($, reporter) {
|
||||
var badBtnType = $('button:not([type="submit"], [type="reset"], [type="button"])');
|
||||
if (badBtnType.length) {
|
||||
reporter("Always set a `type` on `<button>`s.");
|
||||
reporter("Found one or more `<button>`s missing a `type` attribute.");
|
||||
}
|
||||
});
|
||||
addLinter("E017", function lintBlockCheckboxes($, reporter) {
|
||||
|
|
|
@ -296,7 +296,7 @@ exports.bootlint = {
|
|||
'buttons should set type': function (test) {
|
||||
test.expect(2);
|
||||
test.deepEqual(lintHtml(utf8Fixture('buttons/without-type.html')),
|
||||
['Always set a `type` on `<button>`s.'],
|
||||
['Found one or more `<button>`s missing a `type` attribute.'],
|
||||
'should complain about lack of type attribute on buttons');
|
||||
test.deepEqual(lintHtml(utf8Fixture('buttons/with-type.html')),
|
||||
[],
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
<div id="qunit"></div>
|
||||
<ol id="bootlint">
|
||||
<li data-lint="Always set a `type` on `<button>`s."></li>
|
||||
<li data-lint="Found one or more `<button>`s missing a `type` attribute."></li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче