npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

stylelint-teamcity-formatter

v2.2.1

Published

Teamcity formatter for stylelint

Downloads

1,518

Readme

stylelint-teamcity-formatter npm

banner

Formats stylelint errors for teamcity.

TeamCity build status line TeamCity inspections page

Install

npm install stylelint-teamcity-formatter --save-dev

Usage

For Stylelint 16 and newer:

stylelint <options> --custom-formatter stylelint-teamcity-formatter

For Stylelint 15 and older (legacy resolution):

stylelint <options> --custom-formatter node_modules/stylelint-teamcity-formatter

This formatter reports issues as TeamCity Inspections via service messages. See TeamCity docs: https://www.jetbrains.com/help/teamcity/service-messages.html#Reporting+Inspections

Output modes: Inspections vs Tests

You can choose how Stylelint results are reported in TeamCity:

  • inspections (default): shows findings on the Code Inspection tab and as metrics.
  • tests: reports findings as tests on the Tests tab (useful for ignore/mute/investigate flows and viewing test history).

Configure via package.json (takes precedence):

{
	"stylelint-teamcity-formatter": {
		"output": "inspections" // or "errors" for Tests mode
	}
}

Or via environment variable:

STYLELINT_TEAMCITY_FORMATTER_OUTPUT=errors stylelint <options> --custom-formatter stylelint-teamcity-formatter

TeamCity tests page

Notes:

  • inspections mode uses TeamCity Service Messages for Inspections.
  • tests mode uses TeamCity Test reporting messages, so you can ignore/mute tests, assign investigations, and explore history on the Tests tab.

TeamCity docs:

  • Reporting Tests via Service Messages: https://www.jetbrains.com/help/teamcity/service-messages.html#Reporting+Tests
  • Build Results Page — Tests tab: https://www.jetbrains.com/help/teamcity/build-results-page.html#Tests+Tab

Optional build statistics

Enable simple counters of Stylelint findings as TeamCity build statistics values. These can be used in the Build Overview, Charts, and Build Failure Conditions.

Configure via package.json:

{
	"stylelint-teamcity-formatter": {
		"statistics": true
	}
}

When enabled, the formatter additionally prints service messages:

  • ##teamcity[buildStatisticValue key='stylelint.errors' value='<number>']
  • ##teamcity[buildStatisticValue key='stylelint.warnings' value='<number>']

Notes:

  • The counters are derived from Stylelint warnings by severity: anything with severity warning counts as a warning; everything else counts as an error.
  • Works with both output modes (inspections and tests). The statistics lines are appended at the end of the formatter output.

Why use this formatter

  • Native TeamCity Inspections integration via service messages: CSS/SCSS/Sass lint warnings and errors are reported as inspections with file, line, and severity.
  • Faster CI/CD feedback: highlight style violations in the build status line and enforce quality gates with TeamCity build failure conditions (e.g., fail on any error or threshold).
  • Works anywhere Stylelint runs: command line, npm scripts, or a TeamCity Command Line build step; good for monorepos and multi-project setups.
  • Track trends and maintain audit trail: TeamCity aggregates inspection metrics across builds for visibility and continuous code quality.
  • Zero-friction setup: add --custom-formatter and get structured, clickable findings in the TeamCity UI.

References:

  • Stylelint CLI formatter option: https://stylelint.io/user-guide/cli/#--formatter--f----custom-formatter
  • TeamCity Service Messages — Reporting Inspections: https://www.jetbrains.com/help/teamcity/service-messages.html#Reporting+Inspections