Skip to content
PluginStats

prettier-plugin-uncomment weekly downloads statistics

By lassekt · npm · Prettier plugins

Prettier plugin that strips comments from JS/TS/JSX/Flow files, keeping tooling directives and developer-flagged comments.

View on npm Fresh · Dec 6, 2026

prettier-plugin-uncomment has 49 recorded weekly downloads on npm, a decrease of 16.9% over the past 30 days, ranking #2779 of 3,247 tracked listings.

Weekly downloads
49
Official API · Dec 5, 2026
7-day growth
+444%
+40 weekly downloads
30-day growth
-16.9%
-10 weekly downloads
90-day growth
-2.0%
-1 weekly downloads
Rank
#2779
▲ 199 in 7 days

About prettier-plugin-uncomment

prettier-plugin-uncomment

A Prettier plugin that strips comments from JavaScript, TypeScript, JSX and Flow files — every // and /* … */ — except comments that mean something to tooling, JSDoc that documents your code, or comments a developer has explicitly flagged to keep.

Install

npm install --save-dev prettier prettier-plugin-uncomment

Usage

On-demand, without installing (recommended)

Stripping comments is destructive, so you usually want to run it deliberately — not on every format. Use Prettier's --plugin flag, which applies the plugin only for that one command and never persists to your config. npx fetches Prettier and the plugin transiently (nothing is added to package.json):

npx --package prettier --package prettier-plugin-uncomment -- \
  prettier --plugin prettier-plugin-uncomment \
  --write "src/**/*.{js,jsx,ts,tsx}"

If Prettier and the plugin are already installed in the project, the same run is just:

prettier --plugin=prettier-plugin-uncomment --write "src/**/*.{js,jsx,ts,tsx}"

Your existing Prettier config (print width, semicolons, …) is still read and applied — --plugin only adds this plugin on top for that run.

If you run it often, wrap it in a package.json script. This lives in scripts (not in your Prettier config), so it never triggers on a normal format — only when you invoke it:

{
  "scripts": {
    "uncomment": "prettier --plugin=prettier-plugin-uncomment --write"
  }
}

Pass the files to strip when you run it: npm run uncomment -- "src/**/*.ts".

Always-on, via config

If you really do want comments stripped on every format, add it to your Prettier config instead:

{
  "plugins": ["prettier-plugin-uncomment"]
}

Then run Prettier as usual (npx prettier --write .). As with any Prettier run, list the folders you never want touched in .prettierignore; see also uncommentIgnorePaths below.

What is kept

Everything else is removed. Comments matching any of the following survive:

Tooling / linter / type-checker directives

  • eslint-disable*, eslint-enable, eslint-env
  • @ts-ignore, @ts-expect-error, @ts-nocheck, @ts-check
  • /// <reference … /> (triple-slash directives)
  • prettier-ignore, biome-ignore, deno-lint-ignore, stylelint-ignore, oxlint-ignore, rome-ignore
  • coverage pragmas: v8 ignore, c8 ignore, istanbul ignore, node:coverage ignore

Build-tool "magic" comments (removing these changes runtime behaviour)

  • webpack magic comments (webpackChunkName, webpackPrefetch, webpackIgnore, …)
  • @vite-ignore
  • //# sourceMappingURL= / //# sourceURL=
  • /*#__PURE__*/, /*#__NO_SIDE_EFFECTS__*/

Compiler / runtime pragmas & legal banners

  • @jsx, @jsxRuntime, @jsxImportSource, @jsxFrag
  • @flow, @noflow
  • @license, @preserve, @copyright, and /*! … */ banner comments

JSDoc that documents your code (the docs that feed TS/editor hover info)

  • /** … */ blocks containing a recognized JSDoc tag — @param, @returns, @type, @typedef, @template, @satisfies, @callback, @enum, @deprecated, @see, @example, and the like.
  • Detection uses the same /**-prefix rule TypeScript and editors use to identify a doc comment — no substring guessing. Prose-only /** … */ blocks (doc-comment delimiters with no tag) are still stripped by default; tune this with uncommentJsdoc.

Developer-flagged comments (case-insensitive)

  • @hc, @hn, @Hacker Note, @Hacker Comment
  • TODO, FIXME

Options

OptionTypeDefaultDescription
uncommentIgnorePathsstring[]node_modules, dist, build, out, .next, .nuxt, .svelte-kit, coverage, vendorPath segments whose files are left untouched. Setting this replaces the default list.
uncommentKeepstring[][]Extra case-insensitive substrings; any comment containing one is kept (extends the keep-list).
uncommentJsdoc"tagged" | "all" | "off""tagged"How to treat /** … */ blocks. tagged: keep only blocks with a recognized JSDoc tag. all: keep every doc block. off: strip them unless another rule keeps them.
{
  "plugins": ["prettier-plugin-uncomment"],
  "uncommentIgnorePaths": ["node_modules", "dist", "generated"],
  "uncommentKeep": ["@keep", "IMPORTANT"],
  "uncommentJsdoc": "tagged"
}

How it works

Prettier reads the top-level ast.comments array to attach and print comments. The plugin wraps the built-in babel, babel-ts, babel-flow, typescript and flow parsers and filters that array after parsing — dropping every comment except the ones on the keep-list, so the rest are simply never printed. Node locations are left untouched, so the AST stays valid.

Scope & caveats

  • Covers the JS/TS parser family (.js, .jsx, .ts, .tsx, Flow). CSS, HTML, Markdown, YAML, GraphQL and other languages are not touched.
  • Removing a comment that sat alone on its own line can leave the blank line it occupied — the same blank-line behaviour Prettier applies to any gap.

License

ISC

Description from the npm listing.

  • prettier
  • prettier-plugin
  • comments
  • uncomment
  • strip-comments
  • remove-comments

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

prettier-plugin-uncomment weekly downloads on npm, last 90 days: 49 weekly downloads as of Dec 5, 2026, -2.0% over 90 days.prettier-plugin-uncommentWeekly downloads on npm · Last 90 days49downloads / week-2.0% over 90 days050100150200Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-uncomment weekly downloads on npm, last 90 days: 49 weekly downloads as of Dec 5, 2026, -2.0% over 90 days.

7/30/90-day growth

prettier-plugin-uncomment weekly downloads growth on npm: +444% over 7 days, -16.9% over 30 days, -2.0% over 90 days.prettier-plugin-uncommentWeekly downloads growth on npm49downloads / week now7-day growth+40 weekly downloads+444%30-day growth-10 weekly downloads-16.9%90-day growth-1 weekly downloads-2.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-uncomment weekly downloads growth on npm: +444% over 7 days, -16.9% over 30 days, -2.0% over 90 days.

Ranking history

prettier-plugin-uncomment npm ranking history: currently #2779 (by weekly downloads).prettier-plugin-uncommentnpm ranking · by weekly downloads · Last 90 days#2779current rank#500#1000#1500#2000#2500#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-uncomment npm ranking history: currently #2779 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 139, #19 (overall #2,779)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 6, #14 (overall #114)
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 (592)
Recent weekly downloads observations for prettier-plugin-uncomment
Date (UTC)Weekly downloadsChange vs. previous
49+5
44+2
42+7
35+4
31+16
15+1
14+5
9+1
8+2
60
6-5
11-109
1200
120—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-uncomment alternatives

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