README
tslint-stylish
This package has been deprecated. The folks over at Palantir have added a stylish formatter to the list of core formatters for tslint which provides essentially the same output as this one. This formatter can be implemented easily using the original tslint package, as well as gulp-tslint, grunt-tslint and webpack.
To everyone who downloaded this package: This was my first attempt at an npm package as a brand new software developer. Thank you for downloading this package and gulp-tslint-stylish more than 215,000 times - more than I ever imagined possible.
Typescript lint reporter for tslint and gulp-tslint along the lines of jshint-stylish.
Thank you to Sindre Sorhus for the reporter design, and to Panu Horsmalahti for creating gulp-tslint.
Installation
Note that this is designed to accept output from tslint and gulp-tslint, which must be installed separately. To install this package:
npm install tslint-stylish
Usage
Tslint
- Install Tslint & tslint-stylish:
npm install tslint
npm install tslint-stylish
- Apply as named formatter:
tslint <path/to/target/files> -s node_modules/tslint-stylish -t stylish
Gulp
var gulp = require('gulp');
var tslint = require('gulp-tslint');
var stylish = require('tslint-stylish');
gulp.task('lint', function () {
gulp.src('SourceFiles.ts')
.pipe(tslint())
.pipe(tslint.report(stylish, {
emitError: false,
sort: true,
bell: true
}));
Options
sort
- Default is
true
- When true, failures are sorted by line number.
- Default is
bell
- Default is
true
- When true, emits the system bell with report.
- Default is
fullPath
- Default is
true
- When true, full path to file is included with report. When false, only the filename is included.
- Contribution courtesy of Sagar Vadodaria
- Default is