panuhorsmalahti / gulp-tslint

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

Question: Is it possible to pipe gulp-typescript with gulp-tslint and make builds faster? #104

Open kkovalevskiy opened 7 years ago

kkovalevskiy commented 7 years ago

Hello!

At this moment usually we have the following build workflow

  1. Run tslint for files via gulp-tslint
  2. tslint parses each file and build syntax tree via typescript api.
  3. tslint executes rules on parsed syntax tree
  4. Run typescript compiler via gulp-typescript plugin
  5. typescript compiler again parses each file and build syntax tree via it's own api and compiler host.

So, is it possible to parse each file only once and share syntax tree for each file between gulp-typescript and gulp-tslint? I mean that the following pseudo code

gulp.src("./**/*.ts")
.pipe(tslint()) 
.pipe(typescript())

could share the same syntax tree between pipe(tslint()) and pipe(typescript()). This would make full build much faster.

Thanks for handy plugin, it's really useful!