panuhorsmalahti / gulp-tslint

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

respect gulp --no-color argument #147

Open mmilbrath opened 6 years ago

mmilbrath commented 6 years ago

Would be possible to respect the gulp command line argument "--no-color"? For the most part it does except for the error output which is colored in red and doesn't appear to be a way to currently override it. Believe it's just in the log function ( https://github.com/panuhorsmalahti/gulp-tslint/blob/master/index.js#L45 )

gulp-tslint version: 8.1.3 tslint version: latest Operating system: windows/linux/all

Example gulp configuration (if applicable):

n/a

Error console output:

[16:58:58] Error in plugin "gulp-tslint"

TypeScript example code (if applicable):

demurgos commented 6 years ago

I prefer to not duplicate the --no-color detection here.

The most reliable solution is to not use colors directly in gulp-tslint, but instead rely on fancyLog() and fancyLog.error().