vfile-reporter
Format VFiles using a stylish reporter.
Originally forked from ESLint’s stylish reporter, but with some coolness
added.
Features
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');
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
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.