Registry / testing / tape-eslint

tape-eslint

JSON →
library1.2.1jsnpmunverified

Integrate ESLint linting into tape test suites. Version 1.2.1 (stable, infrequent releases) allows running ESLint as part of tape tests in the same Node process, reducing overhead versus a separate lint step. Supports customization of file patterns, ignores, and ESLint CLIEngine options. Designed for Node.js, it gracefully disables itself in browserified test environments. Requires ESLint as a peer dependency.

npm install tape-eslint
INSTALL
IMPORT
SIG · TAPE-ESLINT
T
tape-eslint
testingjavascriptv1.2.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
const lint = require('tape-eslint')
CommonJS only; no ESM export or TypeScript types provided.
default (with options)
const lint = require('tape-eslint')({ files: ['index.js'] })
import lint from 'tape-eslint'
ESM import not supported; must use require.
tape test usage
const test = require('tape'); test('lint', require('tape-eslint')())
Default behavior lints all .js and .jsx files; customize via options object.

Set up tape-eslint in a tape test with custom file patterns and ESLint config.

const test = require('tape'); const lint = require('tape-eslint'); test('eslint', lint({ files: ['index.js', 'test/*.js'], ignore: ['dist/**'], eslint: { configFile: '.eslintrc' } }));
Debug
Known issues
deprecatedPackage is unmaintained; last release 2016-08-03. ESLint versions after 1.x may break compatibility.
fix
Use tape-eslint 1.2.1 with ESLint 1.x or consider alternatives like eslint-tape.
affects: >=1.2.1
gotchaBrowserify usage: require('tape-eslint')() returns a noop function in browser environments, potentially confusing users expecting linting to run.
fix
No action needed; it's by design but should be documented clearly.
affects: *
gotchaESLint peer dependency is not automatically installed; must be installed separately.
fix
Run npm install --save-dev tape-eslint eslint.
affects: *
deprecatedUses deprecated eslint.CLIEngine API; may break with ESLint >=2.0.
fix
Use a newer package or pin ESLint to 1.x.
affects: >=1.2.1
Errors
Common errors & fixes
Error: Cannot find module 'eslint'
tape-eslint requires eslint as a peer dependency; it is not installed.
fix
npm install --save-dev eslint
Error: Cannot find module 'tape-eslint'
tape-eslint is not installed.
fix
npm install --save-dev tape-eslint
TypeError: lint is not a function
Using ESM import (import lint from 'tape-eslint') which is not supported.
fix
Use const lint = require('tape-eslint') instead.
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies
eslintoptionalPeer dependency required to perform linting
Agent activity
2 hits · last 30 days
node
2
Resources
tape-eslint — npm install tape-eslint · libregistry