{"versions":{"0.0.0":{"name":"eslint-formatting-reporter","type":"module","version":"0.0.0","packageManager":"pnpm@8.11.0","description":"Report differences between the formatted and unformatted code for ESLint.","author":{"name":"Anthony Fu","email":"anthonyfu117@hotmail.com"},"license":"MIT","funding":"https://github.com/sponsors/antfu","homepage":"https://github.com/antfu/eslint-formatting-reporter#readme","repository":{"type":"git","url":"git+https://github.com/antfu/eslint-formatting-reporter.git"},"bugs":{"url":"https://github.com/antfu/eslint-formatting-reporter/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","prepublishOnly":"nr build","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit","prepare":"simple-git-hooks"},"peerDependencies":{"eslint":">=8.40.0"},"dependencies":{"prettier-linter-helpers":"^1.0.0"},"devDependencies":{"@antfu/eslint-config":"^2.2.2","@antfu/ni":"^0.21.12","@antfu/utils":"^0.7.6","@types/eslint":"^8.37.0","@types/node":"^20.10.3","@types/prettier-linter-helpers":"^1.0.1","bumpp":"^9.2.0","eslint":"^8.55.0","esno":"^4.0.0","lint-staged":"^15.2.0","pnpm":"^8.11.0","rimraf":"^5.0.5","simple-git-hooks":"^2.9.0","typescript":"^5.3.2","unbuild":"^2.0.0","vite":"^5.0.5","vitest":"^1.0.0-beta.6"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"gitHead":"f790739387d85660d10d5017bcd41059a53b8a77","_id":"eslint-formatting-reporter@0.0.0","_nodeVersion":"20.4.0","_npmVersion":"9.7.2","dist":{"integrity":"sha512-k9RdyTqxqN/wNYVaTk/ds5B5rA8lgoAmvceYN7bcZMBwU7TuXx5ntewJv81eF3pIL/CiJE+pJZm36llG8yhyyw==","shasum":"e444c511527900dec3592e9f85876da821ab8ef7","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/eslint-formatting-reporter/-/eslint-formatting-reporter-0.0.0.tgz","fileCount":8,"unpackedSize":8851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX7N1sPcbANSHZM7WKar63Q5cEEQrcg6WB5X4En0uhRwIhANbV4z10Znrbh0KAWmlyX9yooLC8BrOxBRuoKBtJZgxI"}]},"_npmUser":{"name":"anonymous","email":"anthonyfu117@hotmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"anthonyfu117@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-formatting-reporter_0.0.0_1701694035020_0.6874970461291079"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"0.0.0"},"name":"eslint-formatting-reporter","time":{"created":"2023-12-04T13:34:22.324Z","0.0.0":"2023-12-04T12:47:15.172Z","modified":"2024-06-20T09:54:59.005Z"},"readme":"# eslint-formatting-reporter\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![JSDocs][jsdocs-src]][jsdocs-href]\n[![License][license-src]][license-href]\n\nReport differences between the formatted and unformatted code for ESLint. Useful to create ESLint plugins that format plain code.\n\nA thin wrapper around [prettier-linter-helpers](https://github.com/prettier/prettier-linter-helpers), extracted from [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier).\n\n## Usage\n\n```ts\nimport { messages, reportDifferences } from 'eslint-formatting-reporter'\nimport type { Rule } from 'eslint'\n\n// New ESLint Rule\nexport default <Rule.RuleModule>{\n  meta: {\n    type: 'layout',\n    fixable: 'whitespace',\n    messages\n  },\n  create(context) {\n    return {\n      Program() {\n        const source = context.source.text\n        const formatted = myFormat(source)\n\n        reportDifferences(context, source, formatted)\n      }\n    }\n  }\n}\n```\n\n## Sponsors\n\n<p align=\"center\">\n  <a href=\"https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg\">\n    <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>\n  </a>\n</p>\n\n## License\n\n[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/eslint-formatting-reporter?style=flat&colorA=080f12&colorB=1fa669\n[npm-version-href]: https://npmjs.com/package/eslint-formatting-reporter\n[npm-downloads-src]: https://img.shields.io/npm/dm/eslint-formatting-reporter?style=flat&colorA=080f12&colorB=1fa669\n[npm-downloads-href]: https://npmjs.com/package/eslint-formatting-reporter\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/eslint-formatting-reporter?style=flat&colorA=080f12&colorB=1fa669&label=minzip\n[bundle-href]: https://bundlephobia.com/result?p=eslint-formatting-reporter\n[license-src]: https://img.shields.io/github/license/antfu/eslint-formatting-reporter.svg?style=flat&colorA=080f12&colorB=1fa669\n[license-href]: https://github.com/antfu/eslint-formatting-reporter/blob/main/LICENSE\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669\n[jsdocs-href]: https://www.jsdocs.io/package/eslint-formatting-reporter","users":{}}