Skip to content

Commit ad8b630

Browse files
authoredJan 5, 2018
Merge pull request #33 from gucong3000/patch-1
use `Boolean` as filter for `warningsOrErrors`
2 parents 4b38300 + 9ca2233 commit ad8b630

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.