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 (
3:2and3:2-3:6) - Stack-traces to show where awful stuff occurs
- Successful files (configurable)
- All of VFile’s awesomeness
Installation
npm:
npm install vfile-reporterUsage
Say example.js contains:
var vfile = require('vfile')
var reporter = require('vfile-reporter')
var one = vfile({path: 'test/fixture/1.js'})
var two = vfile({path: 'test/fixture/2.js'})
one.message('Warning!', {line: 2, column: 4})
console.error(reporter([one, two]))Now, running node example 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 vfile, Array.<VFile>,
or Error.
options
options.quiet
Do not output anything for a file which has no warnings or errors (boolean,
default: false). The default behaviour is to show a success message.
options.silent
Do not output messages without fatal set to true (boolean, default:
false). Also sets quiet to true.
options.color
Whether to use colour (boolean, default: depends). The default behaviour
is the check if colour is supported.
options.defaultName
Label to use for files without file-path (string, default: '<stdin>').
If one file and no defaultName is given, no name will show up in the report.
Related
vfile-reporter-json— JSON reportervfile-reporter-pretty— Pretty reporterconvert-vinyl-to-vfile— Convert from Vinylvfile-statistics— Count messages per categoryvfile-sort— Sort messages by line/column
Contribute
See contributing.md in vfile/vfile for ways to get started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
License
Forked from ESLint’s stylish reporter (originally created by Sindre Sorhus), which is Copyright (c) 2013 Nicholas C. Zakas, and licensed under MIT.