Merge a0eb010456
into 7dfcd74e63
This commit is contained in:
commit
d1e8f2b113
|
@ -132,6 +132,22 @@ function hygiene(some, linting = true) {
|
|||
);
|
||||
});
|
||||
|
||||
const consoleLog = es.through(function (file) {
|
||||
const lines = file.__lines;
|
||||
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
if (/^\s*console\.log/.test(lines[i])) {
|
||||
console.error(
|
||||
file.relative + '(' + (i + 1) + ',1): Stray console.log'
|
||||
);
|
||||
errorCount++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.emit('data', file);
|
||||
});
|
||||
|
||||
let input;
|
||||
|
||||
if (Array.isArray(some) || typeof some === 'string' || !some) {
|
||||
|
@ -159,7 +175,9 @@ function hygiene(some, linting = true) {
|
|||
.pipe(filter(indentationFilter))
|
||||
.pipe(indentation)
|
||||
.pipe(filter(copyrightFilter))
|
||||
.pipe(copyrights);
|
||||
.pipe(copyrights)
|
||||
.pipe(filter(tsHygieneFilter))
|
||||
.pipe(consoleLog);
|
||||
|
||||
const streams = [
|
||||
result.pipe(filter(tsHygieneFilter)).pipe(formatting)
|
||||
|
|
Loading…
Reference in a new issue