Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including vfile-reporter with all npm packages installed. Try it out:

var vfileReporter = require("vfile-reporter")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

vfile-reporter v6.0.1

vfile utility to create a report for a file


Build Coverage Downloads Sponsors Backers Chat

Create a report for a vfile.

Example screenshot of vfile-reporter


  • [x] Ranges (3:2 and 3:2-3:6)
  • [x] Stack-traces to show where awful stuff occurs
  • [x] Successful files (configurable)
  • [x] All of VFile’s awesomeness



npm install vfile-reporter


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:

  2:4  warning  Warning!

test/fixture/2.js: no issues found

⚠ 1 warning


reporter(files[, options])

Generate a stylish report from the given vfile, Array.<VFile>, or Error.


Output long form descriptions of messages, if applicable (boolean, default: false).


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


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


Whether to use color (boolean, default: depends). The default behavior is the check if color is supported.


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.



See in vfile/.github for ways to get started. See for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.


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.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free