Registry / testing / markdownlint-cli2-formatter-junit

markdownlint-cli2-formatter-junit

JSON →
library0.0.14jsnpmunverified

JUnit XML output formatter for markdownlint-cli2 (v0.0.14). Converts lint results to JUnit XML format for integration with CI/CD pipelines and test reporting tools. Only includes errors (not warnings) due to JUnit limitations. Compatible with markdownlint-cli2 >=0.0.4. Stable, low-maintenance package from the same author as markdownlint-cli2.

npm install markdownlint-cli2-formatter-junit
INSTALL
IMPORT
SIG · MARKDOWNLINT-CLI2-
M
markdownlint-cli2-formatter-junit
testingjavascriptv0.0.14
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.

markdownlint-cli2-formatter-junit
Configure in .markdownlint-cli2.jsonc as an outputFormatter (no import needed)
import formatter from 'markdownlint-cli2-formatter-junit'
This package is not imported directly; it is loaded by markdownlint-cli2 via configuration.
outputFormatters
Use in JSON config: 'outputFormatters': [ 'markdownlint-cli2-formatter-junit' ]
Using require('markdownlint-cli2-formatter-junit') in config
Config is pure JSON; no JavaScript require possible.
junit format
Set options object: [ 'markdownlint-cli2-formatter-junit', { name: 'report.xml' } ]
[ 'markdownlint-cli2-formatter-junit', { outputFile: 'report.xml' } ]
The only recognized option is 'name'. Other fields are silently ignored.

Configure the JUnit formatter with a custom output filename and run markdownlint-cli2 from the command line.

// .markdownlint-cli2.jsonc { "outputFormatters": [ [ "markdownlint-cli2-formatter-junit", { "name": "lint-results.xml" } ] ] } // Run markdownlint-cli2 (after npm install --save-dev markdownlint-cli2 markdownlint-cli2-formatter-junit) // npx markdownlint-cli2 "**/*.md"
Debug
Known issues
gotchaOnly errors (severity 'error') are included in the output; warnings are silently dropped.
fix
Ensure linting rules are set to error severity for issues you want in the JUnit report.
affects: >=0.0.0
gotchaThe option object only supports 'name'; other keys are ignored without error.
fix
Use exactly: { 'name': 'filename.xml' }.
affects: >=0.0.0
deprecatedThis package has no major releases after 0.0.x; markdownlint-cli2's output formatter API is stable but not extensible.
fix
No fix needed; package is stable but may not get feature updates.
affects: >=0.0.0
gotchaThe XML output always sets tests=failures (equal count) even if no failures, resulting in 'tests=0'. This may confuse some CI tools.
fix
Manually post-process or accept that zero-failure runs produce empty testsuites element.
affects: >=0.0.0
Errors
Common errors & fixes
Configuration error: Cannot find module 'markdownlint-cli2-formatter-junit'
Package not installed or not in node_modules
fix
Run 'npm install --save-dev markdownlint-cli2-formatter-junit'
Error: Invalid options; unrecognized property 'outputFile'
Used 'outputFile' instead of 'name' in formatter options
fix
Change options to { 'name': 'filename.xml' }
No testsuites element produced when all rules are warnings
Only errors are output; warnings are ignored
fix
Set markdownlint rules to 'error' severity for desired issues
Upgrade
Version history
0.0.14latest on npm
Audit
Dependencies
markdownlint-cli2requiredPeer dependency; the formatter is used as an output plugin for markdownlint-cli2
Agent activity
2 hits · last 30 days
node
2
Resources
markdownlint-cli2-formatter-junit — npm install markdownlint-cli2-formatter-junit · libregistry