panuhorsmalahti / gulp-tslint

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

Output to HTML file #102

Open parky128 opened 7 years ago

parky128 commented 7 years ago

I saw this closed issue and wondered if there was a way to get a HTML report produced?

The link in that closed issue seems to reference an older line of code in the suggestions offered.

In gulp-eslint I can do:

.pipe(plugins.eslint.format('html', function(results) {
      fs.writeFileSync(path.join(paths.reports, 'eslint-report.html'), results);
    }))

Is there anything similar that can be done with this module?

Thanks

panuhorsmalahti commented 7 years ago

Yes, it's an old reference. It should point here: https://github.com/panuhorsmalahti/gulp-tslint/blob/2e98db492e9c8fe6b8b0a89731d9d8f63f27f751/test/gulpfile.js#L84

That shows you how to write to file, but not sure how to output in HTML. You probably need a custom formatter ( https://palantir.github.io/tslint/develop/custom-formatters/ ).