{"id":28608217,"url":"https://github.com/vfile/vfile-to-eslint","last_synced_at":"2025-06-11T21:40:32.585Z","repository":{"id":10208036,"uuid":"64971424","full_name":"vfile/vfile-to-eslint","owner":"vfile","description":"utility to convert to ESLint formatter compatible output","archived":false,"fork":false,"pushed_at":"2023-06-14T10:48:03.000Z","size":140,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-12-17T04:03:25.248Z","etag":null,"topics":["convert","eslint","file","vfile","vfile-util","virtual"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vfile.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"unifiedjs","open_collective":"unified"}},"created_at":"2016-08-04T22:30:58.000Z","updated_at":"2024-09-05T15:25:29.000Z","dependencies_parsed_at":"2024-06-18T21:21:26.186Z","dependency_job_id":"1f54a5f9-6c1a-4d8f-b3a4-f22642a5c97c","html_url":"https://github.com/vfile/vfile-to-eslint","commit_stats":{"total_commits":69,"total_committers":3,"mean_commits":23.0,"dds":0.04347826086956519,"last_synced_commit":"9c18335aabd815d6131495f5e4986c222e259fc6"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/vfile/vfile-to-eslint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-to-eslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-to-eslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-to-eslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-to-eslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vfile","download_url":"https://codeload.github.com/vfile/vfile-to-eslint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-to-eslint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259346986,"owners_count":22843814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convert","eslint","file","vfile","vfile-util","virtual"],"created_at":"2025-06-11T21:40:23.069Z","updated_at":"2025-06-11T21:40:32.579Z","avatar_url":"https://github.com/vfile.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":[],"sub_categories":[],"readme":"# vfile-to-eslint\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\nConvert [VFiles][vfile] to [ESLint][] formatter compatible output.\n\n![][screenshot]\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`toESLint(files)`](#toeslintfiles)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package turns a file into the `LintResult` schema that ESLint uses for its\nformatters\n\n## When should I use this?\n\nWhile vfile and ESLint results are different, they do overlap in some places.\nThis package can be used to integrate with ESLint in those cases.\nIn other cases, a custom vfile utility might be a better solution.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install vfile-to-eslint\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {toESLint} from 'https://esm.sh/vfile-to-eslint@4'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {toESLint} from 'https://esm.sh/vfile-to-eslint@4?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {remark} from 'remark'\nimport remarkPresetLintRecommended from 'remark-preset-lint-recommended'\nimport eslintFormatterPretty from 'eslint-formatter-pretty'\nimport {toESLint} from 'vfile-to-eslint'\n\nconst file = await remark()\n  .use(remarkPresetLintRecommended)\n  .process('## Hello world!')\n\nconsole.log(eslintFormatterPretty(toESLint([file])))\n```\n\n## API\n\nThis package exports the identifier [`toESLint`][api-to-eslint].\nThere is no default export.\n\n### `toESLint(files)`\n\nTurn virtual files into a ESLint results that can be passed directly to an\n[ESLint formatter][eslint-formatter].\n\n###### Parameters\n\n*   `files` ([`Array\u003cVFile\u003e`][vfile])\n    — list of files\n\n###### Returns\n\nLint results ([`Array\u003cLintResult\u003e`][lintresult])\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`LintResult`][lintresult].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `vfile-to-eslint@^4`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`vfile/.github`][health] for ways to\nget started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Sindre Sorhus][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/vfile/vfile-to-eslint/workflows/main/badge.svg\n\n[build]: https://github.com/vfile/vfile-to-eslint/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-to-eslint.svg\n\n[coverage]: https://codecov.io/github/vfile/vfile-to-eslint\n\n[downloads-badge]: https://img.shields.io/npm/dm/vfile-to-eslint.svg\n\n[downloads]: https://www.npmjs.com/package/vfile-to-eslint\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size\u0026query=$.size.compressedSize\u0026url=https://deno.bundlejs.com/?q=vfile-to-eslint\n\n[size]: https://bundlejs.com/?q=vfile-to-eslint\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/vfile/vfile/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contributing]: https://github.com/vfile/.github/blob/main/contributing.md\n\n[support]: https://github.com/vfile/.github/blob/main/support.md\n\n[health]: https://github.com/vfile/.github\n\n[coc]: https://github.com/vfile/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://sindresorhus.com\n\n[screenshot]: screenshot.png\n\n[vfile]: https://github.com/vfile/vfile\n\n[eslint]: https://eslint.org\n\n[eslint-formatter]: https://npms.io/search?term=eslint-formatter\n\n[lintresult]: https://eslint.org/docs/latest/integrate/nodejs-api#-lintresult-type\n\n[api-to-eslint]: #toeslintfiles\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfile%2Fvfile-to-eslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvfile%2Fvfile-to-eslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfile%2Fvfile-to-eslint/lists"}