{"id":19657,"library":"eslint-formatter-table","title":"ESLint Table Formatter","description":"ESLint's official `table` formatter, extracted from ESLint 7 as a standalone package. Version 7.32.1 is a direct extract from ESLint 7.x and is not actively maintained. This formatter was removed from ESLint 8, so this package provides compatibility for projects still on ESLint 7 or those who prefer the table output. Key differentiator: outputs a formatted table with results per file, showing line, column, type, message, and rule ID. No longer part of ESLint core, so requires separate installation.","status":"maintenance","version":"7.32.1","language":"javascript","source_language":"en","source_url":"https://github.com/fregante/eslint-formatter-table","tags":["javascript","lint","ecmascript"],"install":[{"cmd":"npm install eslint-formatter-table","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-formatter-table","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-formatter-table","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is ESM-only; require() will fail in Node < 12 or without proper module configuration.","wrong":"const table = require('eslint-formatter-table');","symbol":"table","correct":"import table from 'eslint-formatter-table'"},{"note":"This is a default export, not a named export. Named import { table } is incorrect.","wrong":"const { table } = require('eslint-formatter-table')","symbol":"default export","correct":"import eslintFormatterTable from 'eslint-formatter-table'"},{"note":"If using CommonJS, you must access .default because the package is ESM-only. Without .default, you'll get an object with a default property.","wrong":"const table = require('eslint-formatter-table')","symbol":"require() with default","correct":"const table = require('eslint-formatter-table').default"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  formatter: 'table',\n};\n\n// Or CLI:\n// eslint --format table src/\n\n// Programmatic usage (ESM):\nimport table from 'eslint-formatter-table';\nimport { ESLint } from 'eslint';\n\nconst eslint = new ESLint({\n  overrideConfig: {\n    rules: { 'no-unused-vars': 2 },\n  },\n});\n\n(async () => {\n  const results = await eslint.lintText('const x = 1;\\n');\n  console.log(table(results));\n})();","lang":"javascript","description":"Shows how to use the table formatter via CLI, config file, and programmatic API with ESM imports."},"warnings":[{"fix":"Use ESLint's built-in formatters or consider migrating to a different formatter if on ESLint 8.","message":"This package is not maintained and may not work with ESLint 8+.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"If using ESLint 7, this package is fine. For ESLint 8, use a different formatter or fork this package.","message":"ESLint 8 removed the built-in table formatter. This package fills the gap for ESLint 7 compatibility.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use import syntax or CommonJS with require('...').default as shown in imports.","message":"ESM-only package: Node.js must be 12+ and import/require must handle ESM correctly.","severity":"gotcha","affected_versions":">=7.32.1"},{"fix":"Ensure your lint results are compatible. Test after upgrading ESLint.","message":"The formatter expects results in the same format as ESLint 7. Output format may differ if ESLint internals change.","severity":"gotcha","affected_versions":">=7.32.1"},{"fix":"Consider forking or using an alternative formatter.","message":"Package is not maintained; there may be unfixed bugs or security issues.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use const table = require('eslint-formatter-table').default","cause":"Incorrect import: using const table = require('eslint-formatter-table') in CommonJS without .default.","error":"TypeError: table is not a function"},{"fix":"Use import() or set type: 'module' in package.json, or use require('...').default with a bundler that supports ESM.","cause":"Package is ESM-only and cannot be required directly in CommonJS without type: module or .mjs extension.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Run npm install --save-dev eslint-formatter-table","cause":"Package not installed or not present in node_modules.","error":"Cannot find module 'eslint-formatter-table'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}