Registry / testing / eslint-formatter-beauty

eslint-formatter-beauty

JSON →
library3.0.0jsnpmunverified

A beautiful formatter for ESLint that provides visually appealing output with code frames. Current stable version is 3.0.0. Maintenance-focused, with no recent breaking changes. Differentiates from default ESLint formatters by offering colorized, structured output that enhances readability of lint results. Suitable for use with ESLint CLI, gulp-eslint, and eslint-loader.

npm install eslint-formatter-beauty
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-B
E
eslint-formatter-beauty
testingjavascriptv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

eslint-formatter-beauty
eslint -f=beauty path/to/file.js
eslint -f eslint-formatter-beauty path/to/file.js
When using ESLint CLI, use the formatter name without the prefix.
eslint-formatter-beauty
const formatter = require('eslint-formatter-beauty')
import formatter from 'eslint-formatter-beauty'
The package is CJS-only; use require() in Node.js. Not available as ESM.
eslint-formatter-beauty
eslint.format(require('eslint-formatter-beauty'))
eslint.format('beauty')
For gulp-eslint, pass the formatter function directly, not a string.

Install the formatter, create a minimal ESLint config with a rule, a test file with an error, and run ESLint using the beauty formatter.

npm install --save-dev eslint eslint-formatter-beauty echo '{"rules":{"semi":"error"}}' > .eslintrc.json echo 'var x = 1' > test.js npx eslint -f=beauty test.js
Debug
Known issues
gotchaThe formatter is CJS-only and cannot be imported via ESM.
fix
Use require() instead of import.
affects: >=3.0.0
gotchaWhen using with ESLint CLI, specify the formatter as '-f=beauty' not '-f=eslint-formatter-beauty'.
fix
Use -f=beauty.
affects: >=3.0.0
deprecatedeslint-loader is deprecated; use eslint-webpack-plugin instead.
fix
Switch to eslint-webpack-plugin and use the formatter option.
affects: >=3.0.0
gotchaThe formatter only processes ESLint results; it does not change linting behavior.
fix
Ensure ESLint is properly configured for actual rule checks.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-formatter-beauty'
The package is not installed or not in node_modules.
fix
Run `npm install --save-dev eslint-formatter-beauty`.
Invalid format option: 'beauty' is not a valid formatter.
Using the full package name instead of just 'beauty' in CLI.
fix
Use `eslint -f=beauty` instead of `eslint -f=eslint-formatter-beauty`.
TypeError: formatter is not a function
When using with gulp-eslint, passing a string instead of the required module.
fix
Pass the result of `require('eslint-formatter-beauty')` as the formatter argument.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required for formatting functionality
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-formatter-beauty — npm install eslint-formatter-beauty · libregistry