Registry / testing / eslint-junit-formatter

eslint-junit-formatter

JSON →
library1.0.0jsnpmunverified

An ESLint formatter that outputs JUnit XML for CI/CD integration, supporting Bamboo and Bitbucket Pipelines. Version 1.0.0 provides non-empty test output, optional warning suppression, and passing test display. Updated infrequently; solves issues with empty test suites and missing pass/fail details in standard JUnit reporters.

npm install eslint-junit-formatter
INSTALL
IMPORT
SIG · ESLINT-JUNIT-FORMA
E
eslint-junit-formatter
testingjavascriptv1.0.0
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.

formatter
eslint -f node_modules/eslint-junit-formatter/reporter.js
eslint -f eslint-junit-formatter
The formatter is a Node.js script; must specify full relative path from node_modules (like reporter.js) or use --format with a module path.
require('eslint-junit-formatter')
require('eslint-junit-formatter')
import { formatter } from 'eslint-junit-formatter'
This package is a CommonJS module; no named exports. Use require() for programmatic use or ESLint config.
ESLint Formatter Function
const formatter = require('eslint-junit-formatter');
const { default: formatter } = require('eslint-junit-formatter');
The module exports a function directly, not as a default property.

Shows CLI usage with ESLint to generate a JUnit XML report, including optional warning suppression.

# Create ESLint config cat > .eslintrc.json << 'EOF' { "env": { "browser": true, "es6": true }, "rules": { "no-unused-vars": "warn" } } EOF # Run ESLint with the JUnit formatter eslint src/ -f node_modules/eslint-junit-formatter/reporter.js -o eslint-report.xml # Suppress warnings in output (optional) eslint src/ -f node_modules/eslint-junit-formatter/reporter.js --quiet -o eslint-report.xml
Debug
Known issues
gotchaFormatters loaded via requirePath or relative path may fail if module is not installed locally.
fix
Install locally: npm install eslint-junit-formatter --save-dev, then reference with relative path from node_modules.
affects: >=0.0.0
gotchaESLint -f flag expects a module path, not a package name; using just 'eslint-junit-formatter' will fail.
fix
Use 'node_modules/eslint-junit-formatter/reporter.js' or configure formatter key in ESLint config.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-junit-formatter'
ESLint cannot resolve the formatter by package name alone.
fix
Use full path: eslint -f node_modules/eslint-junit-formatter/reporter.js
ESLint: Configuration for rule "no-unused-vars" is invalid. Value "warn" should be "off", "warn", or "error".
Misconfiguration of rule severity; 'warn' is valid but typo or wrong format.
fix
Check .eslintrc: ensure rule values are string 'warn', 'error', or 'off'.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
eslintoptionalpeer dependency required for formatter integration
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-junit-formatter — npm install eslint-junit-formatter · libregistry