gulp-tslint-teamcity

raw JSON →
1.1.1 verified Fri May 01 auth: no javascript deprecated

A reporter for gulp-tslint that formats lint results for TeamCity using tslint-teamcity-reporter. Deprecated since tslint 4.x and gulp-tslint 7.x, as the reporter can now be used directly. Version 1.1.1 is the latest and final release. No longer maintained.

error TypeError: Cannot read property 'emitError' of undefined
cause Passing teamcity as a formatter to tslint() instead of as a reporter to tslint.report().
fix
Use .pipe(tslint.report(teamcity, { emitError: false }))
error Error: Cannot find module 'tslint-teamcity-reporter'
cause Missing peer dependency tslint-teamcity-reporter.
fix
Run npm install --save-dev tslint-teamcity-reporter
deprecated Package is deprecated. Since tslint 4.x and gulp-tslint 7.x, you can use tslint-teamcity-reporter directly as a formatter.
fix Use gulp-tslint with formatter: 'tslint-teamcity-reporter' directly; see README for example.
gotcha Must be passed to tslint.report() as the reporter argument, not as a formatter to tslint().
fix Use .pipe(tslint.report(teamcity, { emitError: false })) instead of .pipe(tslint({ formatter: teamcity })).
gotcha Requires both gulp-tslint and tslint-teamcity-reporter as peer dependencies; missing either will cause runtime errors.
fix Install gulp-tslint and tslint-teamcity-reporter as devDependencies.
npm install gulp-tslint-teamcity
yarn add gulp-tslint-teamcity
pnpm add gulp-tslint-teamcity

Configures a gulp task to lint TypeScript files and output TeamCity-compatible messages using gulp-tslint-teamcity.

var gulp = require('gulp');
var tslint = require('gulp-tslint');
var teamcity = require('gulp-tslint-teamcity');

gulp.task('lint', function () {
  return gulp.src('**/*.ts')
    .pipe(tslint())
    .pipe(tslint.report(teamcity, { emitError: false }));
});