A pretty formatter for ESLint that provides aesthetically pleasing output with syntax highlighting, clickable hyperlinks for filenames and rule IDs, and severity-sorted results. Version 7.1.0 is the latest stable release, released in 2025, with a cadence of major breaking changes tied to Node.js version bumps. It ships TypeScript types and is maintained by Sindre Sorhus. Key differentiators: stylish output with inline codeblock styling, open-in-editor support for filenames, and rule doc links. Alternatives like `eslint-formatter-codeframe` focus on code frames without the visual polish.
npm install eslint-formatter-prettyVerified import paths — ran on the pinned version, not inferred.
Shows how to use ESLint programmatically with the pretty formatter, including installation and CLI usage.
If using ESLint <9, install eslint-formatter-pretty@5 instead.
Upgrade Node.js to 20 or use v6 which supports Node.js 18.
Upgrade to v6+ if using ESLint 9+, else stick with v5.
Use dynamic import() or add 'type': 'module' to package.json.
Use a compatible terminal or rely on standard text output.
Use import() or set 'type': 'module' in package.json.
Run: npm install --save-dev eslint
Use: import eslintFormatterPretty from 'eslint-formatter-pretty';