panuhorsmalahti / gulp-tslint

TypeScript linter plugin for Gulp
MIT License
118 stars 44 forks source link

Output to File #32

Closed Talento90 closed 8 years ago

Talento90 commented 9 years ago

Any way to redirect the output to a file?

This not work :(

gulp.task('tslint', 'Lints all TypeScript source files', function(){
  return gulp.src(tsFiles)
  .pipe(tslint())
  .pipe(tslint.report('verbose'))
  .pipe(gulp.dest('./reports.html'));
});
bertrandg commented 8 years ago

+1

jmcshane commented 8 years ago

+1

panuhorsmalahti commented 8 years ago

You can do it like this: https://github.com/panuhorsmalahti/gulp-tslint/blob/2e98db492e9c8fe6b8b0a89731d9d8f63f27f751/test/gulpfile.js#L84

Note that you need the latest gulp-tslint for the example to the work. I'm willing to accept PRs to make this easier.

bertrandg commented 8 years ago

Cool, thanks for the solution.

jon-adams commented 7 years ago

For what it's worth, there is a gulp plugin that can send the tslint output to a checkstyle-formatted file easily consumable by most CI servers: gulp-tslint-jenkins-reporter