Registry / devops / eslint-formatter-toml

eslint-formatter-toml

JSON →
library1.0.0jsnpmunverified

ESLint custom formatter (v1.0.0) that outputs ESLint lint results in TOML format. Released as a stable package, it is a niche formatter for integrating ESLint output with tools that consume TOML. TOML is a minimal configuration file format, but its use for formatter output is rare. Compared to JSON or stylish formatters, this one is for specialized pipelines. No active issues on repo; low maintenance.

npm install eslint-formatter-toml
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-T
E
eslint-formatter-toml
devopsjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (formatter function)
import formatter from 'eslint-formatter-toml';
const formatter = require('eslint-formatter-toml');
ESM only as the package exports a default function. CommonJS require will not work.

Shows how to use the formatter both via CLI and programmatically with ESLint.

// .eslintrc.js module.exports = { // ... your config }; // run: npx eslint --format ./node_modules/eslint-formatter-toml/index.js src/ // Or in code: import formatter from 'eslint-formatter-toml'; import { ESLint } from 'eslint'; const eslint = new ESLint(); const results = await eslint.lintFiles(['src/']); const tomlOutput = formatter(results, results); console.log(tomlOutput);
Debug
Known issues
gotchaTOML output may not be parseable back if results contain special characters like newlines in messages.
fix
Escape strings as needed or consider using a more resilient format like JSON.
affects: >=1.0.0
gotchaFormatter expects the standard ESLint results array; passing incorrect structure will throw errors.
fix
Ensure you pass results directly from ESLint.lintFiles or ESLint.lintText.
affects: >=1.0.0
gotchaNot maintained actively; may break with future ESLint versions or changes in TOML spec.
fix
Check compatibility before upgrading ESLint.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-formatter-toml'
Using require() in a CommonJS context but package is ESM-only.
fix
Use dynamic import() or switch to ESM: import formatter from 'eslint-formatter-toml';
TypeError: formatter is not a function
Incorrect import or the package doesn't export a default function correctly in your environment.
fix
Ensure you are using a bundler that supports ESM and import the default export.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

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