Registry / testing / eslint-tap

eslint-tap

JSON →
library2.0.1jsnpmunverified

TAP (Test Anything Protocol) formatter for ESLint. Version 2.0.1 is the latest stable release. This package provides a formatter that outputs ESLint results in TAP format, which is commonly used in test harnesses. It is a simple, single-purpose tool with no dependencies. Compared to other ESLint formatters like 'eslint-formatter-tap', this one is maintained by Sindre Sorhus and has a straightforward CLI usage. It supports Node.js >=4 and works with ESLint's --format flag or through grunt-eslint.

npm install eslint-tap
INSTALL
IMPORT
SIG · ESLINT-TAP
E
eslint-tap
testingjavascriptv2.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 (as formatter)
✓ // ESLint CLI: eslint --format=node_modules/eslint-tap file.js
✗ // Using require directly is unnecessary; the package is used as a formatter path string
This package is not imported directly; it's referenced by ESLint's --format option as a path to the module.
ESLint config
✓ // In .eslintrc: { "formatter": "node_modules/eslint-tap" }
✗ // Incorrect: { "format": "eslint-tap" } (format is for CLI, not config)
In ESLint config, use 'formatter' key, not 'format'.
grunt-eslint usage
✓ grunt.initConfig({ eslint: { options: { format: 'node_modules/eslint-tap' } } });
✗ // Wrong path: format: 'eslint-tap' (needs full path)
In grunt-eslint, the format option must be the full path to the module.

Shows how to use eslint-tap as a formatter with ESLint CLI, using either direct command or npx.

// Install: npm install --save-dev eslint eslint-tap // Run ESLint with TAP formatter: eslint --format=node_modules/eslint-tap file.js // Or using npx: npx eslint --format=node_modules/eslint-tap file.js
Debug
Known issues
gotchaFormat path must be absolute or relative to current working directory
fix
Use full path: 'node_modules/eslint-tap' instead of just 'eslint-tap'.
affects: >=0.0.0
deprecatedPackage is unmaintained since 2019; no updates for ESLint v7+
fix
Consider alternatives like 'eslint-formatter-tap' or use 'eslint --format tap' if available.
affects: >=2.0.1
gotchaESLint v9 removed --format support for non-built-in formatters; this package may not work
fix
Use ESLint's built-in TAP formatter if available, or migrate to a compatible formatter.
affects: >=9.0.0
gotchaThe package does not support custom TAP output options (e.g., verbose, timeout)
fix
No workaround; the output is fixed.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-tap'
Using --format=eslint-tap without full path
fix
Use --format=node_modules/eslint-tap
Error: Cannot find module 'node_modules/eslint-tap'
Running command from wrong directory or missing node_modules
fix
Ensure npm install ran and run from project root.
TypeError: formatter is not a function
ESLint version incompatible with formatter
fix
Update ESLint to a supported version (<=8) or use a different formatter.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
eslint-tap — npm install eslint-tap · libregistry