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

Format VFiles using a stylish reporter.
Originally forked from ESLint’s stylish reporter, but with some coolness added.

Features
Ranges — Not just a starting position, such as
3:2, but3: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-reportUsage
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 warningAPI
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 withoutfatalset to true. Also setsquiettotrue.
Returns: string, a stylish report.
License
Forked from ESLint’s stylish reporter (originally created by Sindre Sorhus), which is Copyright (c) 2013 Nicholas C. Zakas, and licensed under MIT.