Registry / testing / eslint-codeframe-formatter

eslint-codeframe-formatter

JSON →
library1.0.2jsnpmunverified

An ESLint formatter that outputs linting results with code snippets using babel-code-frame. Version 1.0.2 is stable (no further releases expected). This package enhances readability by showing the exact lines of code where errors and warnings occur, similar to babel's error output. It is a lightweight alternative to other ESLint formatters that only show file, line, column, and message. No breaking changes since its initial release; maintained in maintenance mode.

npm install eslint-codeframe-formatter
INSTALL
IMPORT
SIG · ESLINT-CODEFRAME-F
E
eslint-codeframe-formatter
testingjavascriptv1.0.2
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.

default
✓ const formatter = require('eslint-codeframe-formatter');
✗ import formatter from 'eslint-codeframe-formatter';
This package does not ship ESM; it only supports CommonJS. Use require().

Shows how to configure the formatter in .eslintrc.js or use via CLI.

// .eslintrc.js module.exports = { formatter: 'eslint-codeframe-formatter' }; // Or CLI: eslint --format=eslint-codeframe-formatter file.js
Debug
Known issues
gotchaThe package requires Node >=6 but ESLint 9+ may drop Node <18. Compatibility issues with newer ESLint versions.
fix
Use ESLint <9 or switch to an actively maintained formatter.
affects: >=1.0.0
gotchaThe formatter does not support custom options; it only uses default babel-code-frame settings.
fix
No workaround; consider other formatters if customization is needed.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Could not find formatter 'eslint-codeframe-formatter'
The formatter is not installed or the require path is incorrect.
fix
npm install --save-dev eslint-codeframe-formatter
TypeError: formatter is not a function
Using ES import style with this CommonJS-only package.
fix
Use require('eslint-codeframe-formatter') instead of import.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
eslint-codeframe-formatter — npm install eslint-codeframe-formatter · libregistry