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.

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-reportervfile-reporter is also available as an AMD, CommonJS, and globals module, uncompressed and compressed.
Usage
Dependencies:
var vfile = require('vfile');
var reporter = require('vfile-reporter');Files:
var one = vfile({path: 'test/fixture/1.js'});
var two = vfile({path: 'test/fixture/2.js'});Trigger a warning:
one.message('Warning!', {line: 2, column: 4});Report:
var report = reporter([one, two], {color: false});Yields:
test/fixture/1.js
2:4 warning Warning!
test/fixture/2.js: no issues found
⚠ 1 warningAPI
reporter(files[, options])
Generate a stylish report from the given files.
Parameters
files(Error,VFile, orArray.<VFile>).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.color(boolean, default:true) — Whether to use colour.defaultName(string, default:'<stdin>') — Label to use for files without file-path. If one file and nodefaultNameis given, no name will show up in the report.
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.