{"id":19650,"library":"eslint-formatter-rdjson","title":"eslint-formatter-rdjson","description":"An ESLint formatter that outputs results in the Reviewdog Diagnostic Format (RDFormat), enabling seamless integration with Reviewdog for automated code review in CI pipelines. Version 1.0.6 is the latest stable release. It is maintained as part of the action-eslint project by Reviewdog. Key differentiators: produces machine-parseable RDJSON output optimized for Reviewdog's diagnostic reporting, supports GitHub Actions, and works with any CI that can parse JSON.","status":"active","version":"1.0.6","language":"javascript","source_language":"en","source_url":"https://github.com/reviewdog/action-eslint","tags":["javascript","eslint","formatter","rdjson","reviewdog","rdformat"],"install":[{"cmd":"npm install eslint-formatter-rdjson","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-formatter-rdjson","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-formatter-rdjson","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to use the formatter","package":"eslint","optional":false}],"imports":[{"note":"ESM-only package; CommonJS require fails.","wrong":"const formatter = require('eslint-formatter-rdjson')","symbol":"formatter","correct":"import formatter from 'eslint-formatter-rdjson'"},{"note":"The package provides a default export, not named exports.","wrong":"import { rdjson } from 'eslint-formatter-rdjson'","symbol":"default","correct":"import rdjson from 'eslint-formatter-rdjson'"},{"note":"In .eslintrc or eslint.config.js, set format to 'rdjson' directly.","wrong":"formatter: 'eslint-formatter-rdjson'","symbol":"use in ESLint config","correct":"format: 'rdjson'"}],"quickstart":{"code":"// Run ESLint with the rdjson formatter\nimport { ESLint } from 'eslint';\nconst eslint = new ESLint({ overrideConfig: { format: 'rdjson' } });\nconst results = await eslint.lintFiles(['src/**/*.js']);\nconst formatter = await eslint.loadFormatter('eslint-formatter-rdjson');\nconst resultText = await formatter.format(results);\nconsole.log(resultText);\n\n// Or via CLI:\n// npx eslint --format rdjson src/","lang":"javascript","description":"Shows how to use the rdjson formatter programmatically and via CLI to output Reviewdog-compatible JSON."},"warnings":[{"fix":"Ensure compatibility by testing with ESLint 9 and use eslint.config.js with format: 'rdjson'.","message":"ESLint 9+ breaking changes: eslint-formatter-rdjson 1.0.6 may not work with flat config without explicit formatter support.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Pipe output to Reviewdog or parse RDJSON format accordingly.","message":"Formatter output is RDJSON, not standard ESLint JSON; cannot be piped directly to other tools that expect JSON.","severity":"gotcha","affected_versions":"*"},{"fix":"Use the official GitHub Action reviewdog/action-eslint instead of manual formatter setup.","message":"The package is bundled with reviewdog/action-eslint; standalone usage is discouraged if you are using the action.","severity":"deprecated","affected_versions":"*"}],"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-rdjson --save-dev and use import syntax.","cause":"Missing or incorrect installation / CommonJS require instead of ESM import.","error":"Error: Cannot find module 'eslint-formatter-rdjson'"},{"fix":"Change to import formatter from 'eslint-formatter-rdjson'.","cause":"Incorrect import style; default export used as named export.","error":"TypeError: formatter is not a function"},{"fix":"Ensure eslint-formatter-rdjson is in devDependencies and run npx eslint --format rdjson.","cause":"Formatter not found because the package is not installed or misconfigured.","error":"ESLint configuration error: Invalid formatter 'rdjson'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}