Skip to content

Commit 9ca2233

Browse files
authoredJan 5, 2018
use Boolean as filter for warningsOrErrors
1 parent 4b38300 commit 9ca2233

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ module.exports = function (options) {
6565
var warningsOrErrors = [].concat(this.cache.errs, this.cache.warnings);
6666

6767
if (warningsOrErrors.length) {
68-
var msg = warningsOrErrors.filter(function (str) {
69-
return !!str;
70-
}).join('\n\n');
68+
var msg = warningsOrErrors.filter(Boolean).join('\n\n');
7169
msg += '\n' + this.cache.msg;
7270
file.stylint = {msg: msg, errors: this.cache.errs.length > 0, warnings: this.cache.warnings.length > 0};
7371
}

0 commit comments

Comments
 (0)
Please sign in to comment.