Skip to content
PluginStats

prettier-plugin-embed weekly downloads statistics

By Sec-ant · npm · Prettier plugins

A configurable Prettier plugin to format embedded languages in JS/TS files.

View on npm Fresh · Oct 17, 2026

prettier-plugin-embed has 45,615 recorded weekly downloads on npm, a decrease of 59.8% over the past 30 days.

It ranks #581 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -38.4%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
45,615
Official API · Oct 17, 2026
7-day growth
-58.6%
-64.6K weekly downloads
30-day growth
-59.8%
-67.8K weekly downloads
90-day growth
-38.4%
-28.5K weekly downloads
Rank
#581
Among tracked npm listings

About prettier-plugin-embed

Prettier Plugin Embed

A configurable Prettier plugin to format embedded languages in JS/TS Files.

Introduction

What?

This Prettier plugin formats embedded languages in template literals within JavaScript and TypeScript files.

Why?

It adds per-language formatting controls, configurable block comments and tags, and per-identifier overrides to Prettier's embedded formatting. See prettier/prettier#4424 and prettier/prettier#5588 for related use cases.

How?

The plugin extends the embed method of Prettier's estree printer. Each integration delegates formatting to Prettier or a loaded language plugin. See the printer implementation for the integration point.

Features

• Support for Additional Languages: Extend embedded formatting to languages such as XML, SQL, PHP, and more. See Language-Specific Options for the supported languages and their default identifiers. • Dual Identification Modes: Identify embedded languages by block comments ` /* comment */ ... or tags tag... ` preceding the template literals. • Customizable Language Comments or Tags: Customize the comments or tags used for identifying the embedded languages. • Formatting Opt-out Mechanism: Offer the capability to deactivate formatting for certain comments or tags, including the built-in ones (html, css...) supported by the embedded-language-formatting option. • Configurable Formatting Style: Provide additional options to tailor the formatting style for embedded languages. • Strongly Typed API: Benefit from comprehensive type support for configuring this plugin's options. • Easy Integration: Integrate with the existing Prettier setup seamlessly, requiring minimal configuration to get started.

Installation

Install Prettier 3 in the project that runs formatting. The consumer supplies the formatter and its language plugins.

Install the formatter plugin for each embedded language you use as a separate project dependency; the Language-Specific Options section shows which integrations require one.

Choose Prettier and runtime versions supported by every loaded language plugin. Parser availability and syntax support follow the installed formatter version.

Dependency resolution in strict installations

The plugin loads Prettier through static imports, which resolve from the plugin's installation location. Standard project installs and Yarn's default Plug'n'Play dependency fallback allow these imports to access the project's installed Prettier.

Yarn projects using pnpFallbackMode: none, and pnpm projects using enableGlobalVirtualStore: true with hoisting disabled, need an explicit dependency relationship for this resolution. For these configurations, add the following to .yarnrc.yml (Yarn) or pnpm-workspace.yaml (pnpm) to connect the plugin to the project's installed Prettier:

Projects can also use Yarn's default pnpFallbackMode: dependencies-only or pnpm's project-local virtual store (enableGlobalVirtualStore: false).

Usage

Getting Started

This is a Prettier plugin, which follows the standard usage pattern of many other Prettier plugins:

CLI:

Via --plugin:

API:

Via the plugins options:

Configuration File:

For Yarn Plug'n'Play, load plugin objects from a JavaScript config so the imports resolve through Yarn's dependency map.

Quick Start Config Examples

See Config Examples for complete language plugin configurations and sample output.

An Overview of the Philosophy

Set embeddedLanguageFormatting to "auto" (Prettier's default) to enable embedded formatting.

This plugin uses Prettier's built-in parsers and existing language plugins, adding the integration needed to format their languages inside template literals.

Install and load the formatter plugin for each additional language you use. For example, embedded XML requires both this plugin and @prettier/plugin-xml. The Language-Specific Options section lists the required plugins.

A preceding block comment such as ` /* xml */ ... or a tag such as xml... identifies the embedded language. Configure each language with embeddedComments and embeddedTags`. A leading block comment is checked first; templates without one are matched by their tag.

Tags support exact identifiers, member expressions, and regular expression strings in /pattern/flags form. Simple identifiers support patterns too: "/^query$/" matches the tag query. Member and call expressions use a normalized form for pattern matching; for example, factory(argument).query becomes factory().query.

For example, this JSON configuration matches prisma.$queryRaw, client.$queryRaw, and ctx.prisma.$queryRaw. JSON and JavaScript strings escape each backslash as \\:

Add comments or tags to embeddedNoopComments or embeddedNoopTags to preserve their template content as written. These options take priority among matching languages. Other overlapping matches use the first matching language in the internal registry; assign distinct identifiers or non-overlapping patterns to select a language explicitly.

[!IMPORTANT]

Specify comments or tags explicitly to keep language identification stable across plugin versions.

Language-Specific Options

Supported embedded languages and their default comment/tag identifiers are:…

Description from the npm listing.

  • prettier
  • plugin
  • prettier-plugin
  • embed
  • embedded
  • embedded-language
  • format

Where prettier-plugin-embed sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 30, #1 (overall #581)
All npm: every listing in weekly downloads order
PNG SVG
Prettier plugins241 listings · 13 pages · page 1, #8 (overall #8)
Prettier plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

prettier-plugin-embed weekly downloads on npm, last 90 days: 45,615 weekly downloads as of Oct 17, 2026, -38.4% over 90 days.prettier-plugin-embedWeekly downloads on npm · Last 90 days45,615downloads / week-38.4% over 90 days020K40K60K80K100K120K140K160KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
prettier-plugin-embed weekly downloads on npm, last 90 days: 45,615 weekly downloads as of Oct 17, 2026, -38.4% over 90 days.
PNG SVG

7/30/90-day growth

prettier-plugin-embed weekly downloads growth on npm: -58.6% over 7 days, -59.8% over 30 days, -38.4% over 90 days.prettier-plugin-embedWeekly downloads growth on npm45,615downloads / week now7-day growth-64,597 weekly downloads-58.6%30-day growth-67,830 weekly downloads-59.8%90-day growth-28,465 weekly downloads-38.4%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
prettier-plugin-embed weekly downloads growth on npm: -58.6% over 7 days, -59.8% over 30 days, -38.4% over 90 days.
PNG SVG

Ranking history

prettier-plugin-embed npm ranking history: currently #581 (by weekly downloads).prettier-plugin-embednpm ranking · by weekly downloads · Last 90 days#581current rank#579#580#581#582#583Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
prettier-plugin-embed npm ranking history: currently #581 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for prettier-plugin-embed
Date (UTC)Weekly downloadsChange vs. previous
45,615-5.8K
51,399-5.4K
56,767-23.7K
80,449-23.9K
104,3970
104,397-4.7K
109,078-1.1K
110,212-9K
119,198+5.1K
114,076+3.4K
110,671-246
110,917-25.7K
136,569+3.5K
133,031—

Similar npm Prettier plugins plugins

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-embed. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.