{"id":42142,"library":"tslint-teamcity-reporter","title":"tslint-teamcity-reporter","description":"A TSLint formatter/reporter for TeamCity CI that outputs lint results as TeamCity service messages, grouping errors by file as test suites. Current version 3.2.2 (v3 is a complete rewrite with breaking changes). Maintained as stable, with low release frequency. Differentiates from standard TSLint formatters by producing TeamCity-native output (test suites for files, inspection reports) and supporting configuration via CLI arguments, package.json, or environment variables.","status":"active","version":"3.2.2","language":"javascript","source_language":"en","source_url":"https://github.com/ThaNarie/tslint-teamcity-reporter","tags":["javascript","tslint","teamcity","reporter","formatter","typescript"],"install":[{"cmd":"npm install tslint-teamcity-reporter","lang":"bash","label":"npm"},{"cmd":"yarn add tslint-teamcity-reporter","lang":"bash","label":"yarn"},{"cmd":"pnpm add tslint-teamcity-reporter","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package ships TypeScript types. Use named import for ESM; CommonJS require may not work in ESM contexts.","wrong":"const Formatter = require('tslint-teamcity-reporter')","symbol":"Formatter","correct":"import { Formatter } from 'tslint-teamcity-reporter'"},{"note":"Default export is the formatter function. For CommonJS, use require. For ESM, use named import 'Formatter'.","wrong":"import formatter from 'tslint-teamcity-reporter'","symbol":"formatter","correct":"const formatter = require('tslint-teamcity-reporter')"},{"note":"TypeScript users should import the type for option objects to leverage type checking.","wrong":"import { FormatterOptions } from 'tslint-teamcity-reporter'","symbol":"FormatterOptions","correct":"import type { FormatterOptions } from 'tslint-teamcity-reporter'"}],"quickstart":{"code":"import { Formatter } from 'tslint-teamcity-reporter';\n\nconst formatter = new Formatter();\nconst failures = [\n  {\n    fileName: 'src/app.ts',\n    ruleName: 'no-unused-variable',\n    startPosition: { line: 1, character: 1 },\n    endPosition: { line: 1, character: 10 },\n    failure: 'Unused variable: \"x\"',\n    ruleSeverity: 'error'\n  }\n];\nconst output = formatter.format(failures, {\n  reporter: 'errors',\n  reportName: 'TSLint Violations',\n  errorStatisticsName: 'Error count',\n  warningStatisticsName: 'Warning count'\n});\nconsole.log(output);\n// Outputs TeamCity service messages","lang":"typescript","description":"Shows how to use the Formatter class to convert TSLint failures into TeamCity service messages with options for report name and reporter type."},"warnings":[{"fix":"Update TeamCity metric baselines as failed test count will drop. See README migration notes.","message":"v3.0.0 completely rewrites the formatter; output format changed from individual errors to file-grouped test suites.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Adjust CLI invocation to use full path: `tslint files/**/*.ts -t ./node_modules/tslint-teamcity-reporter/index.js`.","message":"CLI formatter path changed from `-t tslint-teamcity-reporter` to `-t ./node_modules/tslint-teamcity-reporter/index.js`.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Set `formattersDirectory` to a truthy string, e.g. `'anything-but-falsy'`, to avoid null being passed.","message":"When using gulp-tslint, a falsy `formattersDirectory` causes a runtime error in TSLint.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure tslint is installed in your project as a dependency.","message":"Package requires TSLint to be installed; no runtime peer dependency listed.","severity":"gotcha","affected_versions":"*"},{"fix":"Use only one configuration method to avoid unintended overrides.","message":"Configuration priority may be confusing: CLI args override package.json, which overrides env vars.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'3.2.2':28 'argument':66 'break':35 'chang':36 'ci':10 'cli':65 'complet':32 'configur':63 'current':26 'differenti':44 'environ':69 'error':20 'file':22,58 'formatt':48,75 'formatter/reporter':7 'frequenc':43 'group':19 'inspect':59 'javascript':71 'lint':13 'low':41 'maintain':37 'messag':18 'nativ':53 'output':12,54 'package.json':67 'produc':50 'releas':42 'report':4,60,74 'result':14 'rewrit':33 'servic':17 'stabl':39 'standard':46 'suit':25,56 'support':62 'teamciti':3,9,16,52,73 'teamcity-n':51 'test':24,55 'tslint':2,6,47,72 'tslint-teamcity-report':1 'typescript':76 'v3':29 'variabl':70 'version':27 'via':64","created_at":"2026-06-04T18:55:49.312206+00:00","updated_at":"2026-06-04T18:55:49.312206+00:00","problems":[{"fix":"Use correct path: `-t ./node_modules/tslint-teamcity-reporter/index.js` or import `{ Formatter }` from the package.","cause":"Using wrong import or path for the formatter in CLI or code.","error":"Error: Invalid formatter. Does not implement IFormatter."},{"fix":"Run `npm install -D tslint-teamcity-reporter` or `yarn add -D tslint-teamcity-reporter`.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'tslint-teamcity-reporter'"},{"fix":"Use `import { Formatter } from 'tslint-teamcity-reporter'` and instantiate with `new Formatter()`.","cause":"Using default import instead of named import for Formatter in ESM.","error":"TypeError: formatter.format is not a function"},{"fix":"Set formattersDirectory to a non-falsy value like `'.'` or `'anything-but-falsy'`.","cause":"Using gulp-tslint with falsy formattersDirectory causing null argument.","error":"TypeError: Cannot read properties of undefined (reading 'format')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://www.thanarie.nl/","github":"https://github.com/ThaNarie/tslint-teamcity-reporter","docs":null,"changelog":null,"pypi":null,"npm":"tslint-teamcity-reporter","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}