npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

vfile-to-eslint

2.0.1 • Public • Published

vfile-to-eslint

Build Coverage Downloads Sponsors Backers Chat

Convert VFiles to ESLint formatter compatible output.

For example, remark-lint returns a VFile, which you could pass through this module to display it using an ESLint formatter.

Install

npm:

npm install vfile-to-eslint

Usage

const remark = require('remark')
const recommended = require('remark-preset-lint-recommended')
const eslintFormatterPretty = require('eslint-formatter-pretty')
const vfileToEslint = require('vfile-to-eslint')
 
const file = remark()
  .use(recommended)
  .processSync('## Hello world!')
 
console.log(eslintFormatterPretty(vfileToEslint([file])))

vfileToEslint(files)

Returns an Object that can be passed directly to an ESLint formatter.

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

install

npm i vfile-to-eslint

Downloadsweekly downloads

95

version

2.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability