prettier-plugin-markdown-table-layout weekly downloads statistics
By luuuuuqui · npm · Prettier plugins
Prettier plugin for compact and single-spaced markdown tables with configurable separators
prettier-plugin-markdown-table-layout has 41 recorded weekly downloads on npm, a decrease of 86.1% over the past 30 days, ranking #2824 of 3,247 tracked listings.
About prettier-plugin-markdown-table-layout
prettier-plugin-markdown-table-layout
a prettier plugin for markdown tables that stay compact and readable. choose how cells are spaced and how separators are sized, without padding every column to fit its longest value.
features
- compact, but readable: keep one space around cell content without adding extra padding to align the pipes.
- fit character limits: remove alignment padding to leave more room for content in documents with strict character budgets.
- control your separators: use a fixed number of hyphens, match each header's width, or keep the existing hyphen counts.
- keep diffs focused: in the single-spaced layouts, editing a body cell does not change the padding or separators in other rows.
- control column alignment: preserve alignment markers, or remove them in
headerwhen they exceed the header width. - keep your prettier workflow: format prose and inline markdown as usual, honor
prettier-ignore, and preserve markdown code examples by default in the single-spaced layouts.
requirements
- prettier 3.0.0 or later within version 3 (
^3.0.0).
installation
install the plugin alongside prettier:
# npm
npm install -D prettier prettier-plugin-markdown-table-layout
# pnpm
pnpm add -D prettier prettier-plugin-markdown-table-layout
quick start
add the plugin to your .prettierrc for compact tables with a single space around each cell:
{
"plugins": ["prettier-plugin-markdown-table-layout"]
}
then format your markdown files:
prettier --write "**/*.md"
before:
| name | age | city |
| ----- | --- | ---- |
| alice | 30 | nyc |
| bob | 25 | la |
after:
| name | age | city |
| --- | --- | --- |
| alice | 30 | nyc |
| bob | 25 | la |
the default layout is fixed, with three hyphens per separator and one space around cell content. existing column alignment is preserved: left-aligned columns use :---, right-aligned columns use ---:, centered columns use :---:, and columns without explicit alignment use ---. choose compact explicitly for separators with one hyphen and no spaces around cell content.
configuration
tableLayout
choose the table formatting style:
| value | behavior |
|---|---|
"fixed" (default) | single-space padding and a configurable number of separator hyphens. |
"aligned" | prettier's standard table formatting, with padding to align columns. |
"header" | single-space padding and separators sized to their headers. |
"preserve" | single-space padding while keeping each separator's original hyphen count. |
"compact" | no cell padding and one hyphen per separator, plus any alignment colons. |
the fixed, header, and preserve layouts never expand separators to fit body content or add spaces to line up body rows. nonempty cells have one space on each side; empty cells contain one space in total (| |). all layouts print leading and trailing pipes.
in compact, fixed, header, and preserve, the header defines the expected column count. extra delimiter cells are omitted, and trailing empty body cells beyond that count are removed from each row independently. cells with content are never removed, and empty cells before later content or within the header's width keep their positions. explicit empty header cells still count as columns. the preserve layout keeps the hyphen counts of the retained delimiters. aligned delegates this handling to prettier.
fixed separators
use tableLayout: "fixed" for uniform separator hyphen counts. tableSeparatorLength controls the number of hyphens in every column; it defaults to 3 and must be an integer of at least 1. alignment colons are added to that count.
{
"plugins": ["prettier-plugin-markdown-table-layout"],
"tableLayout": "fixed",
"tableSeparatorLength": 3
}
| date | version | description | authors |
| :--- | ---: | :---: | --- |
| 2026-11-03 | 1.0 | update documentation | team |
this example uses left, right, center, and unspecified alignment. changing the separator length keeps those markers intact. tableSeparatorLength has no effect on other layouts.
header-sized separators
use tableLayout: "header" to size each separator to its formatted header, counting alignment colons as part of the total width:
| date | version | description | authors |
| :--: | :-----: | :---------: | :-----: |
| 2026-11-03 | 1.0 | update documentation | team |
separators always contain at least one hyphen. by default, tableRemoveOverflowAlignment removes all alignment colons from a column if the colons plus one hyphen would exceed its formatted header width. otherwise, colons count toward that width. unaligned headers such as PK and FK use --; a one-position header uses -, even if it originally had alignment markers. empty headers also use -.
header width comes from prettier's util.getStringWidth, measured on the formatted markdown source without surrounding cell spaces. accented letters occupy one position, combining accents do not add width, and wide characters such as cjk and emoji generally occupy two. emoji sequences follow prettier's width handling.
this measures source text rather than rendered html. links include their brackets and destination, inline code includes backticks, emphasis includes its markers, and escaped pipes include the backslash. for example, **bold** has width 8.
preserved separators
use tableLayout: "preserve" to normalize cell spacing while keeping each separator's original number of hyphens and alignment markers.
before:
| date | version | description | authors |
| :--: | :------: | :----: | :---: |
| 2026-11-03 | 1.0 | update documentation | team |
after:
| date | version | description | authors |
| :--: | :------: | :----: | :---: |
| 2026-11-03 | 1.0 | update documentation | team |
```…
Description from the npm listing.
- prettier-plugin
- markdown
- markdown-table
- table-layout
- markdownlint
- mdx
- formatter
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 (149)Similar npm Prettier plugins plugins
All 20 prettier-plugin-markdown-table-layout 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/prettier-plugin-markdown-table-layout. First seen Nov 7, 2026; last successful collection Dec 6, 2026. See the methodology.