unified

Project:vfile/vfile-reporter-pretty

Package:vfile-reporter-pretty@4.0.0

  1. Dependencies:2·Dependents:10
  2. vfile utility to create a pretty report for a file
  1. util 105
  2. utility 105
  3. lint 68
  4. file 24
  5. virtual 21
  6. vfile 17
  7. vfile-util 16
  8. vfile-reporter 5
  9. reporter 5
  10. validate 5
  11. formatter 4
  12. eslint 4

vfile-reporter-pretty

Build Coverage Downloads Sponsors Backers Chat

Create a pretty report for a vfile.

Install

npm:

npm install vfile-reporter-pretty

Use

const vfile = require('vfile')
const vfileReporterPretty = require('vfile-reporter-pretty')

const file = 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) {}

console.log(vfileReporterPretty([file]))

vfileReporterPretty(files)

Create a report (string) for the given files.

files

List of files (Array.<VFile>).

Contribute

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.

License

MIT © Sindre Sorhus