Registry / devops / tslint-path-formatter

tslint-path-formatter

JSON →
library0.1.1jsnpmunverified

A TSLint formatter that outputs absolute file paths with row and column numbers on a single line, enabling clickable links in editors like WebStorm. Version 0.1.1 is the latest stable release, released in 2013 and not updated since. It is designed for use with grunt-tslint and other TSLint runners. Differentiators include a color disable option and rule name support. Suitable only for legacy TSLint projects; TSLint itself is deprecated in favor of ESLint.

npm install tslint-path-formatter
INSTALL
IMPORT
SIG · TSLINT-PATH-FORMAT
T
tslint-path-formatter
devopsjavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import pathFormatter from 'tslint-path-formatter'
const { default: pathFormatter } = require('tslint-path-formatter')
The package exports a single function as default. CommonJS require works with default import.
color
import pathFormatter from 'tslint-path-formatter'; pathFormatter.color(false)
const { color } = require('tslint-path-formatter')
color is a method on the default export, not a named export.
tslint formatter usage
new TSLint.Formatters['path-formatter']()
import { PathFormatter } from 'tslint-path-formatter'
This is not a class; it is a function used via TSLint's formatter resolution by name.

Configure grunt-tslint to use tslint-path-formatter for clickable error output in WebStorm.

// Install: npm install tslint-path-formatter // In Gruntfile: grunt.initConfig({ tslint: { options: { configuration: grunt.file.readJSON('tslint.json'), formatter: 'tslint-path-formatter' }, source: { src: ['src/**/*.ts'] } } }); grunt.loadNpmTasks('grunt-tslint'); grunt.registerTask('default', ['tslint']);
Debug
Known issues
deprecatedTSLint and its formatters are deprecated; use ESLint instead.
fix
Migrate to ESLint and use eslint-path-formatter or similar.
affects: >=0.1.0
gotchaThe package has not been updated since 2013 and may not work with newer TSLint versions.
fix
Check compatibility with your TSLint version; consider using built-in formatters.
affects: >=0.1.1
gotchacolor(false) must be called globally before linting to disable ANSI.
fix
Call pathFormatter.color(false) at the start of your script.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'tslint-path-formatter'
Package not installed or incorrect require path.
fix
Run 'npm install tslint-path-formatter' and ensure it's in node_modules.
Invalid formatter 'tslint-path-formatter'
TSLint cannot load the formatter.
fix
Ensure the formatter name matches exactly and the package is installed.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Bingbot
1
Resources
tslint-path-formatter — npm install tslint-path-formatter · libregistry