Registry / testing / markdownlint-cli2-formatter-summarize

markdownlint-cli2-formatter-summarize

JSON →
library0.0.8jsnpmunverified

An output formatter for markdownlint-cli2 that summarizes linting results. Version 0.0.8 is the latest stable release. It provides four summary modes: by file, by rule, by file then by rule, and by rule then by file. It is a peer dependency of markdownlint-cli2 (>=0.0.4) and is configured via the CLI2 JSON config file. Unlike default formatters, it condenses results for easier reporting.

npm install markdownlint-cli2-formatter-summarize
INSTALL
IMPORT
SIG · MARKDOWNLINT-CLI2-
M
markdownlint-cli2-formatter-summarize
testingjavascriptv0.0.8
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-summarize
{ "outputFormatters": [ [ "markdownlint-cli2-formatter-summarize", { "byFile": true } ] ] }
{ "outputFormatters": [ "markdownlint-cli2-formatter-summarize" ] }
Must be configured as an array with options object (even if empty). Missing options object leads to no summary output.
byFile
{ "outputFormatters": [ [ "markdownlint-cli2-formatter-summarize", { "byFile": true } ] ] }
{ "outputFormatters": [ [ "markdownlint-cli2-formatter-summarize", { "by-file": true } ] ] }
Option key is camelCase 'byFile', not kebab-case 'by-file'.
byRule
{ "outputFormatters": [ [ "markdownlint-cli2-formatter-summarize", { "byRule": true } ] ] }
{ "outputFormatters": [ [ "markdownlint-cli2-formatter-summarize", { "byrule": true } ] ] }
Option key is camelCase 'byRule', not lowercase 'byrule'.

Installs the formatter as a dev dependency, configures it in .markdownlint-cli2.jsonc to summarize by file, and runs markdownlint-cli2 on all markdown files.

// Install the formatter as a dev dependency npm install markdownlint-cli2-formatter-summarize --save-dev // Configure .markdownlint-cli2.jsonc with the formatter // Example: summarize counts by file { "outputFormatters": [ [ "markdownlint-cli2-formatter-summarize", { "byFile": true } ] ] } // Then run markdownlint-cli2 npx markdownlint-cli2 "**/*.md"
Debug
Known issues
gotchaOnly one summary option can be true at a time; setting multiple will result in only one being applied.
fix
Set exactly one of 'byFile', 'byRule', 'byFileByRule', or 'byRuleByFile' to true.
affects: all
gotchaThe formatter requires markdownlint-cli2 version >=0.0.4; older versions do not support output formatters.
fix
Upgrade markdownlint-cli2 to 0.0.4 or later.
affects: <0.0.4
deprecatedThe 'summarize' formatter is now included in markdownlint-cli2 as 'markdownlint-cli2-formatter-summarize' is maintained separately.
fix
No action needed; continue using the package or switch to built-in if available.
affects: >=0.0.0
Errors
Common errors & fixes
Error: markdownlint-cli2-formatter-summarize is not a valid output formatter
markdownlint-cli2 version is below 0.0.4 or the package is not installed.
fix
Install the package: npm install markdownlint-cli2-formatter-summarize --save-dev, and ensure markdownlint-cli2 >=0.0.4.
Configuration error: Unknown option 'by-file' in output formatter
Used kebab-case option key 'by-file' instead of camelCase 'byFile'.
fix
Use { "byFile": true } instead of { "by-file": true }.
Configuration error: Output formatter options must be an object
Provided the formatter as a string without options object in array.
fix
Use array syntax: [ "markdownlint-cli2-formatter-summarize", { "byFile": true } ].
Upgrade
Version history
0.0.8latest on npm
Audit
Dependencies
markdownlint-cli2requiredpeer dependency: version >=0.0.4 required
Agent activity
2 hits · last 30 days
node
2
Resources
markdownlint-cli2-formatter-summarize — npm install markdownlint-cli2-formatter-summarize · libregistry