@dvyio/prettier-plugin-collapse-markdown-tables weekly downloads statistics
By dvyio · npm · Prettier plugins
Prettier plugin that collapses Markdown table padding.
@dvyio/prettier-plugin-collapse-markdown-tables has 97 recorded weekly downloads on npm, a decrease of 11.0% over the past 30 days, ranking #2630 of 3,247 tracked listings.
About @dvyio/prettier-plugin-collapse-markdown-tables
@dvyio/prettier-plugin-collapse-markdown-tables
Format Markdown tables without Prettier's wide column alignment.
The plugin runs after Prettier's Markdown printer. It keeps real Markdown tables readable while leaving code samples, ignored blocks, and MDX code-like content alone.
Project Links
- Repository: github.com/dvyio/prettier-plugin-collapse-markdown-tables
- Report bugs: GitHub issues
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- License: MIT
Requirements
- Node
>=20.19.0 - Prettier
^3.0.0
The test suite checks the packed plugin with Prettier 3.0.0 and the current Prettier 3.x release used by this repo.
CI checks Node 20.x, Node 22.x, and Node 24.x. Each Node job has two Prettier lanes: the lockfile install and a fresh prettier@^3 install. The lockfile lanes own repository source formatting. The latest-Prettier lanes still build, typecheck, lint, run the tests, dogfood the plugin, and inspect the package without applying a different Prettier minor's source style. That makes the package fail fast when either the minimum Node version, the supported Prettier peer range, or the packed release shape breaks.
Node versions newer than 24.x are allowed by engines.node and are expected to work, but they are not separately certified by CI yet.
Install
Install the plugin from npm with Prettier:
npm install --save-dev prettier @dvyio/prettier-plugin-collapse-markdown-tables
For local development, install this package's dependencies once:
npm install
Build this package before installing it from a local path:
npm run build
Then install it from the consuming project without running install scripts:
npm install --save-dev --ignore-scripts prettier ../prettier-plugin-collapse-markdown-tables
If you skip --ignore-scripts, npm may run pack lifecycle scripts while it copies a local path or git package. Use that only for sources you trust.
You can also test the package shape before publishing or installing it elsewhere:
npm run pack:check
Release notes and the version policy live in CHANGELOG.md. Release steps live in docs/release-runbook.md.
Release
Before publishing a release, run the release gate:
npm run check:release
After main CI passes, GitHub Actions creates the release tag, publishes through npm trusted publishing, and creates the GitHub release. See docs/release-runbook.md for the full release flow.
License
MIT. See LICENSE.
Configure
Use the plugin from your Prettier config:
{
"plugins": ["@dvyio/prettier-plugin-collapse-markdown-tables"],
"markdownTableStyle": "spaced"
}
You can also pass it on the CLI:
npx prettier --write README.md --plugin @dvyio/prettier-plugin-collapse-markdown-tables
This package is ESM-only. CommonJS projects can still load the plugin by package name from .prettierrc.cjs:
module.exports = {
plugins: ['@dvyio/prettier-plugin-collapse-markdown-tables'],
};
Do not call require("@dvyio/prettier-plugin-collapse-markdown-tables") from CommonJS code. This package does not ship a CommonJS build.
Plugin Ordering
This plugin must be the active Markdown printer. It wraps Prettier's built-in Markdown printer, checks whether the document can contain tables, then rewrites the final Markdown text.
That final rewrite is an adapter boundary. Prettier owns Markdown and MDX parsing. This plugin owns a smaller post-print table pass. That keeps this package small, but it means parser wrapping, protected regions, range formatting, cursor mapping, and package compatibility need focused tests.
If another plugin also registers a Markdown mdast printer, only one printer runs. This plugin does not compose with that printer or use its custom output. It always wraps Prettier's built-in Markdown printer.
Put @dvyio/prettier-plugin-collapse-markdown-tables after other Markdown plugins when you want table collapsing to run. In that setup, this plugin replaces their Markdown printer for the final print step. If another Markdown printer appears after this plugin, that printer can replace this plugin and bypass table collapsing.
Reliable setup:
{
"plugins": [
"another-markdown-printer",
"@dvyio/prettier-plugin-collapse-markdown-tables"
],
"markdownTableStyle": "spaced"
}
Avoid this order:
{
"plugins": [
"@dvyio/prettier-plugin-collapse-markdown-tables",
"another-markdown-printer"
]
}
Options
markdownTableStyle: "spaced"
This is the default. It writes one space inside each table cell.
Before:
| Name | Role |
| ----- | ----------- |
| Davey | Builder |
After:
| Name | Role |
| --- | --- |
| Davey | Builder |
markdownTableStyle: "compact"
This removes padding inside table cells.
Before:
| Name | Role |
| ----- | ----------- |
| Davey | Builder |
After:
|Name|Role|
|---|---|
|Davey|Builder|
markdownTableStyle: "prettier"
This turns the plugin's post-print table rewrite off and keeps Prettier's built-in alignment.…
Description from the npm listing.
- formatting
- markdown
- markdown-tables
- prettier
- prettier-plugin
- tables
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Prettier plugins plugins
All 20 @dvyio/prettier-plugin-collapse-markdown-tables alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@dvyio/prettier-plugin-collapse-markdown-tables. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.