JSPM

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

Stylish reporter for virtual files

Package Exports

  • vfile-reporter

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 (vfile-reporter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vfile-reporter Build Status Coverage Status

Format VFiles using a stylish reporter.

Originally forked from ESLint’s stylish reporter, but with some coolness added.

Example screen shot of **vfile-reporter**

Features

  • Ranges — Not just a starting position, such as 3:2, but 3:2-3:6.

  • Stack-traces — When something awful happens, you want to know where it occurred, stack-traces help answer that question.

  • Successful files (configurable) — Sometimes you want to know if things went okay.

  • And all of VFiles awesomeness.

Installation

npm:

npm install vfile-report

Usage

var toVFile = require('to-vfile');
var reporter = require('vfile-reporter');

var one = toVFile('test/fixture/1.js');
var two = toVFile('test/fixture/2.js');

/*
 * See VFile’s docs for more info on how to warn.
 */

one.warn('Warning!', {
    'line': 2,
    'column': 4
});

console.log(reporter([one, two]));

Yields:

test/fixture/1.js
        2:4  warning  Warning!

test/fixture/2.js: no issues found

⚠ 1 warning

API

reporter(vfiles[, options])

Generate a stylish report from the given files.

Signatures

  • report = reporter(file[, options])
  • report = reporter(files[, options])

Parameters

  • options (Object, optional)

    • quiet (boolean, default: false) — Do not output anything for a file which has no warnings or errors. The default behaviour is to show a success message.

    • silent (boolean, default: false) — Do not output messages without fatal set to true. Also sets quiet to true.

Returns: string, a stylish report.

License

MIT © Titus Wormer

Forked from ESLint’s stylish reporter (originally created by Sindre Sorhus), which is Copyright (c) 2013 Nicholas C. Zakas, and licensed under MIT.