Log total error count in eslint failure message

This commit is contained in:
Matt Bierner 2025-10-02 22:59:19 -07:00
parent 96aa43fe7a
commit 4d2aa9d1f0
No known key found for this signature in database
GPG Key ID: 87BD15F7203A4CF2

View File

@ -14,7 +14,7 @@ function eslint() {
.pipe(
eslint((results) => {
if (results.warningCount > 0 || results.errorCount > 0) {
throw new Error('eslint failed with warnings and/or errors');
throw new Error(`eslint failed with ${results.warningCount + results.errorCount} warnings and/or errors`);
}
})
).pipe(es.through(function () { /* noop, important for the stream to end */ }));