Registry / testing / eslint-formatter-friendly

eslint-formatter-friendly

JSON →
library7.0.0jsnpmunverified

An ESLint formatter that displays file paths with line/column numbers clickable in terminals like iTerm2, Sublime Text, and Guake. Version 7.0.0 is current. It aggregates errors at the end, shows rule IDs as clickable links to documentation, and provides a summary of offended rules. Unlike the default 'stylish' formatter, it adds context lines around errors and integrates well with editors that support the 'file:line:column' pattern. It is the recommended formatter for developer-friendly linting output in terminal-based editors.

npm install eslint-formatter-friendly
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-F
E
eslint-formatter-friendly
testingjavascriptv7.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default
import formatter from 'eslint-formatter-friendly'
const formatter = require('eslint-formatter-friendly')
This is a CommonJS module; default import works in ESM environments with bundlers that support interoperability. For Node.js require, use const formatter = require('eslint-formatter-friendly').

Shows how to use the formatter programmatically with ESLint's CLIEngine. It processes files and outputs formatted results.

import { CLIEngine } from 'eslint'; import formatter from 'eslint-formatter-friendly'; const engine = new CLIEngine({}); const report = engine.executeOnFiles(['src/**/*.js']); const results = report.results || []; const output = formatter(results); console.log(output);
Debug
Known issues
gotchaThe formatter expects results array directly from ESLint's CLIEngine.executeOnFiles or ESLint.lintFiles. Passing a different structure may cause errors.
fix
Ensure results is the array from ESLint report.results.
affects: >=0.0.0
gotchaClickable file links require proper terminal emulator support (iTerm2, Guake, etc.) and appropriate editor configuration.
fix
Configure your terminal to associate file URIs with your editor (e.g., Sublime Text).
affects: >=0.0.0
deprecatedThe package uses CommonJS and is not ESM-first. Future versions may switch to ESM, causing import changes.
fix
Use dynamic import or remain on CommonJS until ESM is stable.
affects: >=7.0.0
gotchaWhen using with gulp-eslint, the formatter must be applied to the results array, not piped directly.
fix
Use friendlyFormatter(results) after eslint.lintText or eslint.result.
affects: >=0.0.0
breakingVersion 7.0.0 removed support for Node.js versions < 10. Previously supported Node 0.10+. Check your Node version.
fix
Update to Node >=10 or use older version (<7.0.0).
affects: <7.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-formatter-friendly'
Package not installed or not in node_modules.
fix
Run 'npm install eslint-formatter-friendly --save-dev'.
TypeError: formatter is not a function
Incorrect import usage; may have imported default as object instead of function.
fix
Use 'const formatter = require("eslint-formatter-friendly");' or 'import formatter from "eslint-formatter-friendly";'.
Error: Invalid format output
Passing wrong data structure (e.g., report object instead of results array).
fix
Call formatter(report.results) where report is from CLIEngine.executeOnFiles.
Upgrade
Version history
7.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
eslint-formatter-friendly — npm install eslint-formatter-friendly · libregistry