eslint-output

raw JSON →
4.0.2 verified Sat Apr 25 auth: no javascript

A wrapper around ESLint that exports multiple report formats (e.g., stylish, junit, gitlab) in a single run. v4.0.2 supports ESLint >=9 with Flat Config only. Configure via eslintoutput.config.js and CLI overrides. Releases are infrequent, with major version bumps tied to ESLint peer dep changes. Differentiator: eliminates need for multiple lint runs to get different formatters.

error Cannot find module 'eslint'
cause ESLint not installed or version mismatch
fix
npm install --save-dev eslint@^9
error Configuration file 'eslintoutput.config.js' not found
cause Config file missing or wrong path
fix
Create eslintoutput.config.js in project root.
error Error: Unsupported format 'junit'
cause Formatters removed from ESLint core
fix
npm install --save-dev eslint-formatter-junit
error Error while loading rule '...': Rule is not found
cause ESLint Flat Config migration issue
fix
Ensure all plugins are installed and listed in flat config.
breaking Config file renamed to eslintoutput.config.js in v4 (was eslintoutput.config.json or .js)
fix Rename config file to eslintoutput.config.js and ensure it uses module.exports.
breaking ESLint peer dependency bumped to >=9; removed support for ESLint <9
fix Upgrade ESLint to v9 or later.
breaking Flat Config required; eslintrc configs no longer supported
fix Migrate to ESLint Flat Config (eslint.config.js).
deprecated Built-in formatters removed from ESLint core (e.g., junit, gitlab, html)
fix Install external formatters like eslint-formatter-junit.
gotcha File paths are relative to cwd; may not resolve as expected in monorepos
fix Use absolute paths or run from correct directory.
npm install eslint-output
yarn add eslint-output
pnpm add eslint-output

Basic configuration with two formatters: console output and file output.

// eslintoutput.config.js
module.exports = {
  files: ['.'],
  formats: [
    { name: 'stylish', output: 'console' },
    { name: 'junit', output: 'file', path: 'tmp/junit.xml' }
  ]
};

// package.json
"scripts": {
  "lint": "eslint-output"
}

// Run
npm run lint