{"id":19638,"library":"eslint-formatter-friendly","title":"ESLint Friendly Formatter","description":"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.","status":"active","version":"7.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/royriojas/eslint-friendly-formatter","tags":["javascript","eslint","formatter","reporter","eslint formatter","stylish"],"install":[{"cmd":"npm install eslint-formatter-friendly","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-formatter-friendly","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-formatter-friendly","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"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').","wrong":"const formatter = require('eslint-formatter-friendly')","symbol":"default","correct":"import formatter from 'eslint-formatter-friendly'"}],"quickstart":{"code":"import { CLIEngine } from 'eslint';\nimport formatter from 'eslint-formatter-friendly';\n\nconst engine = new CLIEngine({});\nconst report = engine.executeOnFiles(['src/**/*.js']);\nconst results = report.results || [];\nconst output = formatter(results);\nconsole.log(output);","lang":"javascript","description":"Shows how to use the formatter programmatically with ESLint's CLIEngine. It processes files and outputs formatted results."},"warnings":[{"fix":"Ensure results is the array from ESLint report.results.","message":"The formatter expects results array directly from ESLint's CLIEngine.executeOnFiles or ESLint.lintFiles. Passing a different structure may cause errors.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Configure your terminal to associate file URIs with your editor (e.g., Sublime Text).","message":"Clickable file links require proper terminal emulator support (iTerm2, Guake, etc.) and appropriate editor configuration.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use dynamic import or remain on CommonJS until ESM is stable.","message":"The package uses CommonJS and is not ESM-first. Future versions may switch to ESM, causing import changes.","severity":"deprecated","affected_versions":">=7.0.0"},{"fix":"Use friendlyFormatter(results) after eslint.lintText or eslint.result.","message":"When using with gulp-eslint, the formatter must be applied to the results array, not piped directly.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Update to Node >=10 or use older version (<7.0.0).","message":"Version 7.0.0 removed support for Node.js versions < 10. Previously supported Node 0.10+. Check your Node version.","severity":"breaking","affected_versions":"<7.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-formatter-friendly --save-dev'.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'eslint-formatter-friendly'"},{"fix":"Use 'const formatter = require(\"eslint-formatter-friendly\");' or 'import formatter from \"eslint-formatter-friendly\";'.","cause":"Incorrect import usage; may have imported default as object instead of function.","error":"TypeError: formatter is not a function"},{"fix":"Call formatter(report.results) where report is from CLIEngine.executeOnFiles.","cause":"Passing wrong data structure (e.g., report object instead of results array).","error":"Error: Invalid format output"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}