Skip to content
PluginStats

@aforemendude/prettier-plugin-wrap-comments weekly downloads statistics

By aforemendude (2 listings) · npm · Prettier plugins

A Prettier plugin that wraps non-JSDoc JavaScript and TypeScript comments as Markdown.

View on npm Fresh · Dec 6, 2026

@aforemendude/prettier-plugin-wrap-comments has 63 recorded weekly downloads on npm, an increase of 600% over the past 30 days, ranking #2720 of 3,247 tracked listings.

Weekly downloads
63
Official API · Dec 5, 2026
7-day growth
+320%
+48 weekly downloads
30-day growth
+600%
+54 weekly downloads
90-day growth
+425%
+51 weekly downloads
Rank
#2720
▲ 157 in 7 days

About @aforemendude/prettier-plugin-wrap-comments

@aforemendude/prettier-plugin-wrap-comments

A Prettier plugin that wraps non-JSDoc JavaScript and TypeScript comments as Markdown. It uses each comment marker's real column to calculate the available content width, so nested comments wrap more narrowly than top-level comments.

Requirements

  • Node.js 20 or newer to use the plugin
  • Node.js 22.12 or newer to develop the plugin
  • Prettier 3 (>=3.9.0 <4.0.0)

Install

npm install --save-dev @aforemendude/prettier-plugin-wrap-comments prettier

Use

Add the plugin to your Prettier config:

{
  "plugins": ["@aforemendude/prettier-plugin-wrap-comments"]
}

Then run Prettier normally:

npx prettier --write .
Use With prettier-plugin-jsdoc

When using both plugins, @aforemendude/prettier-plugin-wrap-comments must be loaded after prettier-plugin-jsdoc:

{
  "plugins": ["prettier-plugin-jsdoc", "@aforemendude/prettier-plugin-wrap-comments"]
}

This order is required regardless of prettier-plugin-jsdoc's documentation saying that it should be the last plugin. With wrap-comments last, ordinary comments are handled here and parsing is delegated to the preceding JSDoc plugin, so JSDoc comments are formatted as well.

Cache Repeated CLI Runs

Prettier's CLI cache skips files that have not changed since a successful formatting pass. Enable it in package scripts so contributors use it consistently. This repository uses the faster metadata strategy for local formatting:

{
  "scripts": {
    "format": "prettier --write --cache --cache-strategy metadata .",
    "format:check": "prettier --check --cache --cache-strategy metadata .",
    "format:nocache": "prettier --write ."
  }
}

The first cached run still processes every file; later runs skip files whose relevant metadata and other cache keys have not changed. Omit --cache-strategy metadata to use the default content strategy when workflows such as Git operations frequently change timestamps without changing file contents.

By default, Prettier stores the cache under node_modules/.cache/prettier/, which is normally excluded from version control with node_modules. Prettier does not include plugin versions or implementations in its cache keys, so run the uncached command once after updating this plugin or another Prettier plugin. Running Prettier without --cache, as the format:nocache script does, also removes the default cache. See [Prettier's CLI cache documentation][prettier-cache] for cache keys, strategies, and custom cache locations.

Behavior

The plugin wraps comments for Prettier's babel, babel-ts, and typescript parsers. It runs during parser preprocessing: the nearest preceding plugin for the selected parser, or Prettier's built-in parser when there is none, preprocesses and parses the source first. This plugin rewrites eligible comments from that parsed comment list, and Prettier then formats the rewritten source with its built-in JavaScript and TypeScript printers. If the parser cannot parse the preprocessed source, the plugin leaves the source unchanged.

Offset-sensitive formatting is conservative. Full-file formatWithCursor calls skip comment rewriting so Prettier can map the cursor from the original source. During range formatting, preprocessing does not rewrite text outside Prettier's selected range; eligible comments inside that range can still be wrapped.

Comment text is normalized and reflowed with Prettier's Markdown parser. The available content width is based on Prettier's printWidth minus the column where the comment text starts. tabWidth, useTabs, and endOfLine are used when measuring and rebuilding comments. When tabWidth is 0, tabs contribute zero columns during measurement, as they do in Prettier. If the plugin must synthesize indentation at a positive column, it uses spaces because zero-width tabs cannot advance to that column.

Standalone // comments are wrapped in place. Adjacent standalone line comments are combined and reflowed as one Markdown block when they are directly next to each other and their // markers start in the same column.

function example() {
  // This long paragraph is wrapped as Markdown, and the nested indentation is
  // subtracted from the configured print width.
  return true;
}

Trailing // comments stay in place when the full source line fits within printWidth. If the source line is too long, the comment is moved above the code and normally wrapped using the code line's indentation. On a line made up of closing delimiters such as }, ], or ), the moved comment is indented one additional level so it remains visually inside the construct being closed. When a comment directly trails the root value of a JSX expression or template interpolation, it can move above that value and wrap inside the expression delimiters. Nested or otherwise ambiguous expression comments and comments in JSX spreads stay in place.

function example() {
  // This trailing comment moved above the statement because the original line
  // was too long.
  const value = 1;
}

Non-JSDoc /* ... */ comments are also normalized as Markdown. A block comment may stay on one line if the normalized comment fits within printWidth; otherwise, only standalone block comments are expanded into star-prefixed blocks. Long inline block comments are left unchanged when they cannot fit on one line.

Multiline block comments are normalized as conventional block-comment text before Markdown parsing: leading indentation is removed, and a * that is the first non-whitespace character on a body line is treated as comment formatting, not Markdown content. This also applies to unstarred /* ... */ blocks, so use line comments when Markdown-significant indentation or leading * characters must be preserved exactly.…

Description from the npm listing.

  • prettier
  • prettier-plugin
  • comments
  • markdown
  • typescript

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

@aforemendude/prettier-plugin-wrap-comments weekly downloads on npm, last 90 days: 63 weekly downloads as of Dec 5, 2026, +425% over 90 days.@aforemendude/prettier-plugin-wrap-com…Weekly downloads on npm · Last 90 days63downloads / week+425% over 90 days020406080Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@aforemendude/prettier-plugin-wrap-comments weekly downloads on npm, last 90 days: 63 weekly downloads as of Dec 5, 2026, +425% over 90 days.

7/30/90-day growth

@aforemendude/prettier-plugin-wrap-comments weekly downloads growth on npm: +320% over 7 days, +600% over 30 days, +425% over 90 days.@aforemendude/prettier-plugin-wrap-com…Weekly downloads growth on npm63downloads / week now7-day growth+48 weekly downloads+320%30-day growth+54 weekly downloads+600%90-day growth+51 weekly downloads+425%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@aforemendude/prettier-plugin-wrap-comments weekly downloads growth on npm: +320% over 7 days, +600% over 30 days, +425% over 90 days.

Ranking history

@aforemendude/prettier-plugin-wrap-comments npm ranking history: currently #2720 (by weekly downloads).@aforemendude/prettier-plugin-wrap-com…npm ranking · by weekly downloads · Last 90 days#2720current rank#1800#2000#2200#2400#2600#2800#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@aforemendude/prettier-plugin-wrap-comments npm ranking history: currently #2720 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 136, #20 (overall #2,720)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 6, #5 (overall #105)
Prettier plugins: every listing in weekly downloads order

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)
Recent weekly downloads observations for @aforemendude/prettier-plugin-wrap-comments
Date (UTC)Weekly downloadsChange vs. previous
63-1
64+14
50+10
40+19
21-2
230
23+8
150
150
15+1
140
14+2
12-4
16—

Data 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/@aforemendude/prettier-plugin-wrap-comments. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.