prettier-plugin-mustache weekly downloads statistics
By Poliklot (3 listings) · npm · Prettier plugins
Prettier plugin for Mustache templates.
prettier-plugin-mustache has 110 recorded weekly downloads on npm, a decrease of 56.5% over the past 30 days, ranking #2603 of 3,247 tracked listings.
About prettier-plugin-mustache
prettier-plugin-mustache
Prettier plugin for Mustache templates.
It formats .mustache, .mst, and .mu files with a focus on stable, idempotent output and Mustache syntax rather than Handlebars, Ember, or Glimmer extensions.
Install
npm install --save-dev prettier prettier-plugin-mustache
Quick Start
Recommended config:
/** @type {import("prettier").Config} */
module.exports = {
plugins: ["prettier-plugin-mustache"],
overrides: [
{
files: ["*.mustache", "*.mst", "*.mu"],
options: {
parser: "mustache",
},
},
],
};
Then format templates:
npx prettier --write "**/*.{mustache,mst,mu}"
Configuration Patterns
Minimal setup
{
"plugins": ["prettier-plugin-mustache"]
}
Explicit override
Use this when a repository contains several template languages and you want editor format-on-save to stay predictable.
{
"plugins": ["prettier-plugin-mustache"],
"overrides": [
{
"files": ["*.mustache", "*.mst", "*.mu"],
"options": {
"parser": "mustache"
}
}
]
}
Local plugin build during dogfooding
/** @type {import("prettier").Config} */
module.exports = {
plugins: ["../prettier-plugin-mustache/dist/plugin.js"],
overrides: [
{
files: ["*.mustache", "*.mst", "*.mu"],
options: {
parser: "mustache",
},
},
],
};
CLI
Published package:
npx prettier --write "src/**/*.{mustache,mst,mu}" --plugin prettier-plugin-mustache --parser mustache
Local plugin build:
npx prettier --write "src/**/*.{mustache,mst,mu}" --plugin ../prettier-plugin-mustache/dist/plugin.js --parser mustache
API
const prettier = require("prettier");
const plugin = require("prettier-plugin-mustache");
async function run(source) {
return prettier.format(source, {
filepath: "template.mustache",
parser: "mustache",
plugins: [plugin],
});
}
Supported File Extensions
.mustache.mst.mu
What The Plugin Handles Today
| Mustache feature | Example | Status |
|---|---|---|
| Plain text templates | Hello from {Mustache}! | Preserved |
| Escaped variables | {{name}} | Formatted |
| Dotted names | {{user.name}} | Formatted |
| Implicit iterator | {{.}} | Formatted |
| Triple mustache | {{{html}}} | Formatted |
| Ampersand unescaped variables | {{& html}} | Formatted |
| Comments | {{! comment}} | Formatted |
| Multiline comments | {{! first\nsecond }} | Preserved/formatted |
| Sections | {{#items}}...{{/items}} | Formatted |
| Inverted sections | {{^items}}...{{/items}} | Formatted |
| Lambda sections | {{#wrapped}}...{{/wrapped}} | Syntax formatted; runtime behavior belongs to the renderer |
| Partials | {{> user}} | Formatted |
| Dynamic partial names | {{>*partial}} | Formatted |
| Set delimiters | {{=<% %>=}} | Formatted and tracked |
| Delimiter reset | <%={{ }}=%> | Formatted and tracked |
| Blocks/inheritance extension | {{$title}}...{{/title}} | Formatted |
| Parent templates | {{< layout}}...{{/layout}} | Formatted |
| Dynamic parent names | {{<*layout}}...{{/*layout}} | Formatted |
| Standalone comments / partials / delimiter tags | {{! comment}}, {{> user}}, {{=<% %>=}} | Formatted in multiline sections |
| … |
Description from the npm listing.
- prettier
- prettier-plugin
- mustache
- template
- 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 (170)Similar npm Prettier plugins plugins
All 20 prettier-plugin-mustache 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-mustache. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.