Registry / devops / eslint-formatter-unix

eslint-formatter-unix

JSON →
library9.0.1jsnpmunverified

ESLint's official 'unix' formatter republished as a standalone npm package (v9.0.1). Provides the classic Unix-style output format for ESLint results, showing file:line:column: message for each problem. This package is published by the community to allow using the formatter without depending on the full eslint package. Active development with stable releases; ships TypeScript types. Key differentiator: lightweight alternative to bundling the entire ESLint for CI or custom tooling.

npm install eslint-formatter-unix
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-U
E
eslint-formatter-unix
devopsjavascriptv9.0.1
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
import formatter from 'eslint-formatter-unix'
import { formatter } from 'eslint-formatter-unix'
The module exports a single default function; named export is incorrect.
type FormatterFunction
import type { FormatterFunction } from 'eslint-formatter-unix'
import { FormatterFunction } from 'eslint-formatter-unix'
Type import should use `import type` to avoid runtime inclusion.
require
const formatter = require('eslint-formatter-unix')
const { formatter } = require('eslint-formatter-unix')
CommonJS require returns the default function directly, not an object.

Shows how to import and use the formatter with ESLint's programmatic API.

import formatter from 'eslint-formatter-unix'; import { ESLint } from 'eslint'; const eslint = new ESLint(); const results = await eslint.lintText('var x = 1'); const output = formatter(results); console.log(output); // Sample output: // stdin.js:1:5: 'x' is assigned a value but never used. [Warning/no-unused-vars] // // 1 problem
Debug
Known issues
gotchaFormatter expects results in the same format as ESLint's internal formatters; incompatible objects will cause runtime errors.
fix
Ensure input is from ESLint's `ESLint` class or a compatible result array.
affects: >=1.0.0
deprecatedESLint v9 may change the result format; verify compatibility when upgrading ESLint.
fix
Pin ESLint to a compatible version or test after upgrade.
affects: >=9.0.0 <10.0.0
Errors
Common errors & fixes
TypeError: formatter is not a function
Using named import `{ formatter }` instead of default import.
fix
Use `import formatter from 'eslint-formatter-unix'` or `const formatter = require('eslint-formatter-unix')`.
Cannot find module 'eslint-formatter-unix'
Package not installed.
fix
Run `npm install eslint-formatter-unix`.
Upgrade
Version history
9.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

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