A utility library for ESLint plugins that report formatting differences between original and formatted code. Version 0.0.0, actively maintained by Anthony Fu. Extracted from eslint-plugin-prettier, it provides `reportDifferences` function and `messages` object to simplify creating custom formatting rules. Ships TypeScript types, peer dependency on ESLint >=8.40.0. Lightweight alternative to directly using prettier-linter-helpers.
npm install eslint-formatting-reporterVerified import paths — ran on the pinned version, not inferred.
Creates a custom ESLint rule that reports formatting differences using reportDifferences.
Use context.source.text for ESLint 8.40+; for older versions, upgrade or pass source code manually.
Use import syntax or dynamic import().
npm install eslint-formatting-reporter
Change to import { reportDifferences } from 'eslint-formatting-reporter'