enable options with custom reporter

This commit is contained in:
progre 2015-03-14 13:11:57 +09:00
parent deda1f7a4d
commit 39fbc1e313
2 changed files with 8 additions and 3 deletions

View File

@ -33,6 +33,12 @@ gulp.task('invalid-custom', function(){
.pipe(tslint.report(testReporter));
});
gulp.task('invalid-custom', function () {
gulp.src('invalid.ts')
.pipe(tslint())
.pipe(tslint.report(testReporter, { emitError: false }));
});
gulp.task('tslint-json', function(){
gulp.src('invalid.ts')
.pipe(tslint({

View File

@ -32,10 +32,9 @@ declare module "gulp-tslint" {
ruleName: string;
}
export function report(reporter?: string): NodeJS.ReadWriteStream;
export function report(reporter: string, options?: Options): NodeJS.ReadWriteStream;
type Reporter = string|((output: Output[], file: vinyl, options: Options) => any);
export function report(reporter?: Reporter, options?: Options): NodeJS.ReadWriteStream;
export function report(options?: Options): NodeJS.ReadWriteStream;
export function report(reporter?: (output: Output[], file: vinyl, options: Options) => any): NodeJS.ReadWriteStream;
}