vfile utility to create a pretty report.
This package is like vfile-reporter
but a bit prettier.
You can use this when you like
eslint-formatter-pretty
, use vfile-reporter
itself otherwise.
This package is ESM only. In Node.js (version 16+), install with npm:
npm install vfile-reporter-pretty
In Deno with esm.sh
:
import {reporterPretty} from 'https://esm.sh/vfile-reporter-pretty@7'
In browsers with esm.sh
:
<script type="module">
import {reporterPretty} from 'https://esm.sh/vfile-reporter-pretty@7?bundle'
</script>
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) {}
console.log(reporterPretty([file]))
This package exports the identifier reporterPretty
.
That identifier is also the default export.
Create a pretty report from files.
files
(Array<VFile>
) — files to report
Report (string
).
This package is fully typed with TypeScript. It exports no additional types.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, vfile-reporter-pretty@^7
,
compatible with Node.js 16.
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.