Registry / devops / markdownlint-cli2-formatter-pretty

markdownlint-cli2-formatter-pretty

JSON →
library0.0.10jsnpmunverified

An output formatter for markdownlint-cli2 that adds color and clickable links to the default formatter output. Version 0.0.10 is current; it requires Node.js >=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0 and markdownlint-cli2 >=0.0.4 as a peer dependency. The formatter enhances readability by applying ANSI color to file paths, line numbers, and error types, and uses the terminal-link package to make rule names clickable in supported terminals. It also supports an optional 'appendLink' mode for terminals that do not support clickable links. This package is part of the markdownlint-cli2 ecosystem and does not introduce new linting rules.

npm install markdownlint-cli2-formatter-pretty
INSTALL
IMPORT
SIG · MARKDOWNLINT-CLI2-
M
markdownlint-cli2-formatter-pretty
devopsjavascriptv0.0.10
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-pretty
Configure in .markdownlint-cli2.jsonc as an outputFormatter string
const formatter = require('markdownlint-cli2-formatter-pretty')
This package is not imported directly; it is referenced by name in markdownlint-cli2 configuration.
default
No direct import. Use via markdownlint-cli2 configuration file.
import pretty from 'markdownlint-cli2-formatter-pretty'
The formatter is designed to be used as a string reference in configuration, not as a module import.
appendLink
{ "outputFormatters": [["markdownlint-cli2-formatter-pretty", { "appendLink": true }]] }
No configuration object: { "outputFormatters": ["markdownlint-cli2-formatter-pretty"] } (missing options)
When appendLink is true, links are shown as informational text after the rule message instead of being clickable inline.

Shows installation, configuration with default and appendLink options, and typical CLI usage.

// Install the formatter npm install markdownlint-cli2-formatter-pretty --save-dev // Create .markdownlint-cli2.jsonc in project root: { "outputFormatters": [ [ "markdownlint-cli2-formatter-pretty" ] ] } // Run markdownlint-cli2 (assuming it's installed globally) markdownlint-cli2 '**/*.md' // For terminals without clickable link support, use appendLink mode: { "outputFormatters": [ [ "markdownlint-cli2-formatter-pretty", { "appendLink": true } ] ] }
Debug
Known issues
gotchaRequires Node.js version 20.12.0, 21.7.0, 22.13.0, or 23.5.0 or later — older versions will fail to run.
fix
Upgrade Node.js to one of the specified versions.
affects: <20.12.0 || <21.7.0 || <22.13.0 || <23.5.0
gotchaThe formatter must be listed as a string in the outputFormatters array, not as a path or imported module.
fix
Use correct configuration syntax: ["markdownlint-cli2-formatter-pretty"]
affects: >=0.0.1
gotchaClickable links may not work in all terminals; use appendLink option for wider compatibility.
fix
Set appendLink: true in the options object if links are not clickable.
affects: >=0.0.1
deprecatedThe package may be superseded by newer formatters in the markdownlint-cli2 ecosystem. Check for alternatives.
fix
Monitor the markdownlint-cli2 repository for updates or newer formatter packages.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'markdownlint-cli2-formatter-pretty'
The formatter is not installed or not listed correctly in node_modules.
fix
Run `npm install markdownlint-cli2-formatter-pretty --save-dev` again and ensure package.json lists it as a devDependency.
TypeError: outputFormatters[0] is not iterable
outputFormatters entry is not in array format for options.
fix
Use correct syntax: ["markdownlint-cli2-formatter-pretty"] or [["markdownlint-cli2-formatter-pretty", {}]]
ValidationError: 'markdownlint-cli2' is not installed
Peer dependency markdownlint-cli2 is missing.
fix
Install markdownlint-cli2: `npm install markdownlint-cli2 --save-dev`
Upgrade
Version history
0.0.10latest on npm
Audit
Dependencies
markdownlint-cli2requiredpeer dependency required to use the formatter
terminal-linkrequiredruntime dependency for clickable links
Agent activity
2 hits · last 30 days
node
2
Resources
markdownlint-cli2-formatter-pretty — npm install markdownlint-cli2-formatter-pretty · libregistry