JSPM

tslint-path-formatter

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q56612F
  • License MIT

TSLint formatter that displays absolute path with row/column on one line

Package Exports

  • tslint-path-formatter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tslint-path-formatter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tslint-path-formatter

Build Status Dependency Status NPM version

TSLint formatter that displays absolute error path with row/column on one line.

A console formatter similar to the default output except the report displays absolute file paths with the row/column appended in a parsable format. The TypeScript equivalent of jshint-path-reporter.

This allows convenient use of TSLint from within tools that apply a filter RegExp to console views to turn error lines into clickable links to instantly navigate to the error location.

WebStorm

This reporter is tested and actively used in WebStorm with grunt-tslint. For maximum effect have a output filter configured in its edit-tool-dialog of the tool you run, something like:

$FILE_PATH$[ \t]*[:;,\[\(\{<]$LINE$(?:[:;,\.]$COLUMN$)?.*

Usage

Install from NPM

 $ npm install tslint-path-formatter

Then pass name of the module (or anything acceptable to require.resolve()) as the reporter option.

grunt-tslint

grunt.initConfig({
    //..
    tslint: {
        options: {
            configuration: grunt.file.readJSON("tslint.json"),
            formatter: 'tslint-path-formatter'
        }),
        source: {
            //..
        }
    }
});

Options

Globally disable ANSI colouring

For low-tech displays and pure text.

require('tslint-path-formatter').color(false);

Example output

Looks very similar to jshint-path-reporter:

WebStorm (with link filter and darcula theme): webstorm darcula

History

Build

Install development dependencies in your git checkout:

$ npm install

You need the global grunt command:

$ npm install grunt-cli -g

Build and run tests:

$ grunt

See the Gruntfile for additional commands.

License

Copyright (c) 2013 Bart van der Schoor

Licensed under the MIT license.

Bitdeli Badge