more hygiene

This commit is contained in:
Johannes Rieken
2016-10-07 17:39:26 +02:00
parent 45645e084e
commit 77206a5533

View File

@@ -164,21 +164,21 @@ const hygiene = exports.hygiene = (some, options) => {
this.emit('data', file);
});
const formatting = es.through(function (file) {
const formatting = es.map(function (file, cb) {
tsfmt.processString(file.path, file.contents.toString('utf8'), {
verify: true,
tsfmt: true,
verbose: true
// verbose: true
}).then(result => {
if (result.error) {
console.error(file.relative + ': ' + result.message);
errorCount++;
}
this.emit('data', file);
cb(null, file);
}, err => {
this.emit('error', err);
cb(err);
});
});