eslint-teamcity
A small eslint formatter plugin.
ESLint violations are output nicely in the
TeamCity build error format. Tested with
TeamCity 9.1.x/10.0.x and ESLint 1/2/3.
Installation
Use npm.
npm install eslint-teamcity --save-dev
Usage
eslint --format './node_modules/eslint-teamcity/index.js' myfiletolint.js
var gulp = require('gulp'),
eslint = require('gulp-eslint'),
teamcity = require('eslint-teamcity');
gulp.task('lint', function () {
return gulp.src(['js/**/*.js'])
.pipe(eslint())
.pipe(eslint.format(teamcity))
.pipe(eslint.failAfterError());
});
See the gulp-eslint docs for
more info on setting up a linting task.
Add a gulp task to run ESLint (see above)
Setup a TeamCity build step, similar to the below screenshot:
Kick off a new build, by deploying again, and you should see your build errors - assuming you have any!
Screenshot with TeamCity
eslint-teamcity will also output statistic values which you can use in TeamCity to track your progress in resolving errors!
Graphs can be setup from the Builds -> Statistics tab.
Issues
I will try keep this project up to date, but please log any issues
here.
Any pull requests are also welcome!