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.
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
muslnode 18–226 runs
build_error
glibcnode 18–226 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
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.