Registry / testing / eslint-plugin-istanbul

eslint-plugin-istanbul

JSON →
library0.1.2jsnpmunverified

ESLint plugin providing rules to enforce best practices for istanbul code coverage comments. Current stable version 0.1.2, low release cadence (last release 2020). Key differentiators: specifically targets istanbul ignore comments (no-ignore-file, prefer-ignore-reason) to maintain code quality in coverage exclusions. Requires ESLint 6.x or 7.x (not compatible with ESLint 8+/9+). Lightweight, no runtime dependencies beyond ESLint peer dependency.

testing
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.

In ESLint config, omit the 'eslint-plugin-' prefix; use just 'istanbul'.

plugins: ['istanbul']

All rules must be prefixed with 'istanbul/'.

"istanbul/no-ignore-file": "error"

ESLint 9+ flat config requires importing the plugin object and assigning to a plugins object with key 'istanbul'.

import eslintPluginIstanbul from 'eslint-plugin-istanbul'; export default [{ plugins: { istanbul: eslintPluginIstanbul }, rules: { 'istanbul/no-ignore-file': 'error' } }]

Shows ESLint configuration with both plugin rules and usage of istanbul ignore comments.

// Install: npm install --save-dev eslint eslint-plugin-istanbul // .eslintrc.json { "plugins": ["istanbul"], "rules": { "istanbul/no-ignore-file": "error", "istanbul/prefer-ignore-reason": "error" } } // In your code: /* istanbul ignore next -- needs refactor */ function deprecatedFunction() { return 42; } /* istanbul ignore file */ // This will cause an error with no-ignore-file rule
Debug
Known footguns
breakingRequires ESLint 6.x or 7.x; incompatible with ESLint 8+ and 9+ flat config without migration
deprecatedThe 'prefer-ignore-reason' rule may become stricter in future versions
gotchaPlugin rules only catch certain ignore comment formats; malformed comments may pass
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources