Project: vfile/vfile-reporter-pretty

Package: vfile-reporter-pretty@6.1.0

  1. Dependents: 0
  2. vfile utility to create a pretty report for a file
  1. util 147
  2. utility 143
  3. lint 76
  4. file 34
  5. virtual 19
  6. vfile 17
  7. vfile-util 15
  8. validate 5
  9. vfile-reporter 4
  10. reporter 4
  11. eslint 4
  12. formatter 3


Build Coverage Downloads Sponsors Backers Chat

vfile utility to create a pretty report.


What is this?

This package is like vfile-reporter but a bit prettier.

When should I use this?

You can use this when you like eslint-formatter-pretty, use vfile-reporter itself otherwise.


This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:

npm install vfile-reporter-pretty

In Deno with esm.sh:

import {reporterPretty} from 'https://esm.sh/vfile-reporter-pretty@6'

In browsers with esm.sh:

<script type="module">
  import {reporterPretty} from 'https://esm.sh/vfile-reporter-pretty@6?bundle'


import {VFile} from 'vfile'
import {reporterPretty} from 'vfile-reporter-pretty'

const file = new VFile({path: '~/example.md'})

file.message('`braavo` is misspelt; did you mean `bravo`?', {line: 1, column: 8})
file.info('This is perfect', {line: 2, column: 1})

try {
  file.fail('This is horrible', {line: 3, column: 5})
} catch (error) {}



This package exports the identifier reporterPretty. That identifier is also the default export.


Create a report (string) for the given files.


List of files (Array<VFile>).


This package is fully typed with TypeScript. It exports no additional types.


Projects maintained by the unified collective are compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+. Our projects sometimes work with older versions, but this is not guaranteed.


See contributing.md in vfile/.github for ways to get started. See support.md 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 © Sindre Sorhus