index.js
function () {
        // Throw error
        if (options && errorFiles.length > 0) {
            var failuresToOutput = allFailures;
            var ignoreFailureCount = 0;
            // If error count is limited, calculate number of errors not shown and slice reportLimit
            // number of errors to be included in the error.
            if (options.reportLimit > 0) {
                ignoreFailureCount = allFailures.length - options.reportLimit;
                failuresToOutput = allFailures.slice(0, options.reportLimit);
            }
            // Always use the proseErrorFormat for the error.
            var failureOutput = failuresToOutput.map(function (failure) {
                return proseErrorFormat(failure);
            }).join(", ");
            var errorOutput = "Failed to lint: ";
            if (options.summarizeFailureOutput) {
                errorOutput += failuresToOutput.length + " errors.";
            }
            else {
                errorOutput += failureOutput + ".";
            }
            if (ignoreFailureCount > 0) {
                errorOutput += " (" + ignoreFailureCount + " other errors not shown.)";
            }
            if (options.emitError === true) {
                return this.emit("error", new PluginError("gulp-tslint", errorOutput));
            }
            else if (options.summarizeFailureOutput) {
                log(errorOutput);
            }
        }
        // Notify through that we're done
        this.emit("end");
    }
function () {
        // Throw error
        if (options && errorFiles.length > 0) {
            var failuresToOutput = allFailures;
            var ignoreFailureCount = 0;
            // If error count is limited, calculate number of errors not shown and slice reportLimit
            // number of errors to be included in the error.
            if (options.reportLimit > 0) {
                ignoreFailureCount = allFailures.length - options.reportLimit;
                failuresToOutput = allFailures.slice(0, options.reportLimit);
            }
            // Always use the proseErrorFormat for the error.
            var failureOutput = failuresToOutput.map(function (failure) {
                return proseErrorFormat(failure);
            }).join(", ");
            var errorOutput = "Failed to lint: ";
            if (options.summarizeFailureOutput) {
                errorOutput += failuresToOutput.length + " errors.";
            }
            else {
                errorOutput += failureOutput + ".";
            }
            if (ignoreFailureCount > 0) {
                errorOutput += " (" + ignoreFailureCount + " other errors not shown.)";
            }
            if (options.emitError === true) {
                return this.emit("error", new PluginError("gulp-tslint", errorOutput));
            }
            else if (options.summarizeFailureOutput) {
                log(errorOutput);
            }
        }
        // Notify through that we're done
        this.emit("end");
    }
function ( ) { // Throw error if ( options && errorFiles . length > 0 ) { var failuresToOutput = allFailures ; var ignoreFailureCount = 0 ; // If error count is limited, calculate number of errors not shown and slice reportLimit // number of errors to be included in the error. if ( options . reportLimit > 0 ) { ignoreFailureCount = allFailures . length - options . reportLimit ; failuresToOutput = allFailures . slice ( 0 , options . reportLimit ) ; } // Always use the proseErrorFormat for the error. var failureOutput = failuresToOutput . map ( function ( failure ) { return proseErrorFormat ( failure ) ; } ) . join ( ", " ) ; var errorOutput = "Failed to lint: " ; if ( options . summarizeFailureOutput ) { errorOutput += failuresToOutput . length + " errors." ; } else { errorOutput += failureOutput + "." ; } if ( ignoreFailureCount > 0 ) { errorOutput += " (" + ignoreFailureCount + " other errors not shown.)" ; } if ( options . emitError === true ) { return this . emit ( "error" , new PluginError ( "gulp-tslint" , errorOutput ) ) ; } else if ( options . summarizeFailureOutput ) { log ( errorOutput ) ; } } // Notify through that we're done this . emit ( "end" ) ; }
After reporting on all files, throw the error.
After reporting on all files throw the error .