Registry / testing / eslint-formatter-table

eslint-formatter-table

JSON →
library7.32.1jsnpmunverified

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.

npm install eslint-formatter-table
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-T
E
eslint-formatter-table
testingjavascriptv7.32.1
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.

table
import table from 'eslint-formatter-table'
const table = require('eslint-formatter-table');
The package is ESM-only; require() will fail in Node < 12 or without proper module configuration.
default export
import eslintFormatterTable from 'eslint-formatter-table'
const { table } = require('eslint-formatter-table')
This is a default export, not a named export. Named import { table } is incorrect.
require() with default
const table = require('eslint-formatter-table').default
const table = require('eslint-formatter-table')
If using CommonJS, you must access .default because the package is ESM-only. Without .default, you'll get an object with a default property.

Shows how to use the table formatter via CLI, config file, and programmatic API with ESM imports.

// .eslintrc.js module.exports = { formatter: 'table', }; // Or CLI: // eslint --format table src/ // Programmatic usage (ESM): import table from 'eslint-formatter-table'; import { ESLint } from 'eslint'; const eslint = new ESLint({ overrideConfig: { rules: { 'no-unused-vars': 2 }, }, }); (async () => { const results = await eslint.lintText('const x = 1;\n'); console.log(table(results)); })();
Debug
Known issues
breakingThis package is not maintained and may not work with ESLint 8+.
fix
Use ESLint's built-in formatters or consider migrating to a different formatter if on ESLint 8.
affects: >=8.0.0
deprecatedESLint 8 removed the built-in table formatter. This package fills the gap for ESLint 7 compatibility.
fix
If using ESLint 7, this package is fine. For ESLint 8, use a different formatter or fork this package.
affects: >=1.0.0
gotchaESM-only package: Node.js must be 12+ and import/require must handle ESM correctly.
fix
Use import syntax or CommonJS with require('...').default as shown in imports.
affects: >=7.32.1
gotchaThe formatter expects results in the same format as ESLint 7. Output format may differ if ESLint internals change.
fix
Ensure your lint results are compatible. Test after upgrading ESLint.
affects: >=7.32.1
breakingPackage is not maintained; there may be unfixed bugs or security issues.
fix
Consider forking or using an alternative formatter.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: table is not a function
Incorrect import: using const table = require('eslint-formatter-table') in CommonJS without .default.
fix
Use const table = require('eslint-formatter-table').default
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Package is ESM-only and cannot be required directly in CommonJS without type: module or .mjs extension.
fix
Use import() or set type: 'module' in package.json, or use require('...').default with a bundler that supports ESM.
Cannot find module 'eslint-formatter-table'
Package not installed or not present in node_modules.
fix
Run npm install --save-dev eslint-formatter-table
Upgrade
Version history
7.32.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

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