unified

Project:vfile/vfile-reporter-pretty

Package:vfile-reporter-pretty@3.0.1

  1. Dependencies:2·Dependents:8
  2. Pretty reporter for VFile
  1. remark 170
  2. lint 70
  3. vfile 13
  4. reporter 5
  5. validate 5
  6. formatter 4
  7. eslint 4

vfile-reporter-pretty

Build Coverage Downloads Sponsors Backers Chat

Pretty reporter for vfile.

For example, get pretty output from remark-lint.

Install

npm:

npm install vfile-reporter-pretty

Usage

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, organisation, or community you agree to abide by its terms.

License

MIT © Sindre Sorhus