Socket
Socket
Sign inDemoInstall

eslint-teamcity

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-teamcity

An ESLint formatter plugin for TeamCity


Version published
Weekly downloads
9.2K
decreased by-6.55%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-teamcity

npm version Build Status Coverage Status npm downloads

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/2017 and ESLint 1/2/3/4.

Installation

Prerequisite: You must have either npm or Yarn installed.

npm install eslint-teamcity --save-dev

Usage

There are currently 3 ways to use eslint-teamcity:

As a regular ESLint formatter plugin:
eslint --format ./node_modules/eslint-teamcity/index.js myfiletolint.js
Running against a generated ESLint JSON report:

Generate an ESLint JSON report:

eslint -f json -o result.json app/myjavascriptdirectory

Run eslint-teamcity against the new report:

node ./node_modules/eslint-teamcity/index.js result.json
Requiring and running directly from inside your JavaScript code:
var eslintTeamcity = require('eslint-teamcity');
console.log(eslintTeamcity(result));

gulp-eslint integration

var gulp = require('gulp');
var eslint = require('gulp-eslint');
var 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.

TeamCity usage (with gulp-eslint)

Add a gulp task to run ESLint (see above)

Setup a TeamCity build step, similar to the below screenshot:

Example TeamCity Setup

Kick off a new build, by deploying again, and you should see your build errors - assuming you have any!

Screenshot with TeamCity

Example TeamCity Output

Extras

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. Example Statistics Output

Issues

I will try keep this project up to date, but please log any issues here. Any pull requests are also welcome!

Keywords

FAQs

Package last updated on 12 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc