Skip to content
PluginStats

prettier-plugin-nunjucks weekly downloads statistics

By Poliklot (3 listings) · npm · Prettier plugins

Prettier plugin for Nunjucks templates (.njk, .nunjucks, .nunj)

View on npm Fresh · Oct 17, 2026

prettier-plugin-nunjucks has 272 recorded weekly downloads on npm, a decrease of 52.4% over the past 30 days.

It ranks #1560 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +167%.

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

Weekly downloads
272
Official API · Oct 17, 2026
7-day growth
-59.3%
-397 weekly downloads
30-day growth
-52.4%
-300 weekly downloads
90-day growth
+167%
+170 weekly downloads
Rank
#1560
Among tracked npm listings

About prettier-plugin-nunjucks

prettier-plugin-nunjucks

Prettier plugin for HTML-heavy Nunjucks templates.

It formats .njk / .nunjucks / .nunj files with stable, idempotent output and keeps Nunjucks statement tags, variables, comments, whitespace-control markers, and raw/verbatim blocks in the Nunjucks syntax instead of treating them as Handlebars or generic HTML.

Install

Quick Start

Recommended config:

The explicit override makes editor format-on-save deterministic, especially in projects that mix HTML, Nunjucks, Jinja-like templates, and other Prettier plugins.

Configuration Patterns

1. Minimal plugin setup

Use this only after verifying your Prettier/editor resolves .njk files to this plugin.

2. Explicit Nunjucks override

Use this for shared projects and CI.

3. Projects with Nunjucks in HTML files

If your project stores Nunjucks templates as .html, force the parser for those paths.

4. Project style options

Normal Prettier options still apply.

5. Local plugin path during dogfooding

Useful before publishing a new npm version.

Text wrapping

Normal HTML text wraps at word boundaries to respect printWidth, including the available width after indentation. Nunjucks variables stay intact, and words or punctuation glued to them stay glued. proseWrap does not control HTML text wrapping, just as with Prettier's HTML printer.

printWidth is a target, not a hard limit: unbreakable words, template expressions, and whitespace-sensitive content such as pre, textarea, and raw/verbatim blocks may remain longer than it.

Text and inline variables wrap as one text flow inside HTML block elements such as p and div, Nunjucks block bodies, and the template root. Configured inlineTags participate in the same flow. Existing line breaks in ordinary text do not force variables onto separate lines or disable wrapping. Actual inline HTML elements such as a and span retain their significant tag boundaries.

classAttributeLayout

Control whether class attribute values may use multiple physical lines. The default auto mode preserves the existing formatting rules. Use single-line to keep static and conditional class values on one line; the surrounding HTML tag may still wrap.

| Default | CLI Override | API Override |

| "auto" | --class-attribute-layout | classAttributeLayout: "auto" \| "single-line" |

Custom extension tags

Nunjucks extensions can define project-specific tags. Unknown single statement tags are preserved by default; tags that behave like blocks or branches can be configured explicitly.

Input:

Output:

CLI

Published package:

Local plugin build:

API

What The Plugin Handles Today

• HTML elements, void elements, comments, and custom elements • Nunjucks variables: {{ value }}, including whitespace control {{- value -}} • Nunjucks comments: {# comment #} • statement tags such as extends, include, import, from, and custom extension tags • if / elif / elseif / else / endif • for / else / endfor • asyncEach / endeach and asyncAll / endall • block / endblock • macro / endmacro • single-statement set and block set / endset • filter / endfilter • call / endcall • raw / endraw and verbatim / endverbatim preserved verbatim • Nunjucks inside attribute values • Nunjucks blocks that emit attributes • multiline class formatting with conditional modifiers and whitespace-control blocks • embedded JavaScript / CSS formatting for plain script / style tags when the content is safe to parse • raw script / style preservation when content contains Nunjucks or non-JS/CSS types • leading YAML, TOML, and explicit-language front matter preserved without formatting its contents • custom extension block/fork tags via blockTags, inlineTags, and forkTags • incomplete/unmatched template structures preserved as raw nodes instead of crashing

Real-World Examples

Branch chains

Conditional class values

Input:

Output:

Blocks that emit attributes

Raw/verbatim content

Quality Gates

Core check before release:

Package/install checks:

Real-world corpus check:

The OSS corpus currently covers 1,125 real-world Nunjucks templates across 13 public projects, including web.dev, 11ty, Jamstack, A11Y Project, Mozilla Nunjucks, GOV.UK Frontend, and GOV.UK Design System. The check formats each file twice and fails on crashes or non-idempotent output.

Maintainer Release

Run the checks above, then publish from this repository root:

Shared embedding work

See shared embedding architecture and cross-repository dependencies. This source work depends on the core tracking issue.

Description from the npm listing.

  • prettier
  • prettier-plugin
  • nunjucks
  • njk
  • jinja
  • html
  • formatter
  • eleventy
  • 11ty

Charts

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

Adoption over time

prettier-plugin-nunjucks weekly downloads on npm, last 90 days: 272 weekly downloads as of Oct 17, 2026, +167% over 90 days.prettier-plugin-nunjucksWeekly downloads on npm · Last 90 days272downloads / week+167% over 90 days02004006008001KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
prettier-plugin-nunjucks weekly downloads on npm, last 90 days: 272 weekly downloads as of Oct 17, 2026, +167% over 90 days.
PNG SVG

7/30/90-day growth

prettier-plugin-nunjucks weekly downloads growth on npm: -59.3% over 7 days, -52.4% over 30 days, +167% over 90 days.prettier-plugin-nunjucksWeekly downloads growth on npm272downloads / week now7-day growth-397 weekly downloads-59.3%30-day growth-300 weekly downloads-52.4%90-day growth+170 weekly downloads+167%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
prettier-plugin-nunjucks weekly downloads growth on npm: -59.3% over 7 days, -52.4% over 30 days, +167% over 90 days.
PNG SVG

Ranking history

prettier-plugin-nunjucks npm ranking history: currently #1560 (by weekly downloads).prettier-plugin-nunjucksnpm ranking · by weekly downloads · Last 90 days#1560current rank#1554#1556#1558#1560#1562Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
prettier-plugin-nunjucks npm ranking history: currently #1560 (by weekly downloads).
PNG SVG

Listing placement

All npm2,256 listings · 113 pages · 1,129 shown · page 79, #1 (overall #1,561)
All npm: every listing in weekly downloads order
PNG SVG

Listing placement

Prettier plugins244 listings · 13 pages · page 3, #2 (overall #42)
Prettier plugins: every listing in weekly downloads order
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.

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.

Recent observations

Full history (121)
Recent weekly downloads observations for prettier-plugin-nunjucks
Date (UTC)Weekly downloadsChange vs. previous
272-48
320-150
470-72
542-113
6550
655+17
638-31
669-19
688+136
552-138
690-100
790-176
966+67
899—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-nunjucks 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-nunjucks. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.