prettier-plugin-ejs-safe weekly downloads statistics
By Vajkis · npm · Prettier plugins
Prettier plugin for EJS templates — formats HTML, preserves all EJS tags untouched
prettier-plugin-ejs-safe has 1 recorded weekly downloads on npm, a decrease of 93.3% over the past 30 days, ranking #2195 of 2,256 tracked listings.
About prettier-plugin-ejs-safe
prettier-plugin-ejs-safe
Prettier plugin for EJS templates — formats the HTML structure while completely preserving all EJS tags untouched.
The problem
The prettier-plugin-ejs breaks EJS tags because it treats their content as HTML and reformats it without any special handling.
The solution
Before formatting, this plugin extracts all EJS tags and replaces them with safe placeholders. After HTML formatting, it restores the original tags.
Supported EJS tag types
| Tag | Description |
| | Scriptlet (control flow) | | | HTML-escaped output | | | Unescaped output | | | Comment (no output) | | | Whitespace-slurping scriptlet | | | Trim newline after tag | | | Whitespace slurp after tag |
Head/foot partials — ignoreTags
EJS projects are often split into a "head" partial that opens shell tags (, , ...) and a "foot" partial that closes them. Each partial is invalid HTML on its own: Prettier's HTML parser either silently inserts the missing closing tag (unclosed open tag) or throws a parse error (closing tag with no matching open).
ignoreTags removes specific tag names from HTML parsing entirely — their open/close tags pass through untouched, exactly as written, with no auto-closing and no validation.
| Value | Effect |
| ["none"] (default) | No tags ignored — normal HTML parsing. | | ["all"] | Every tag is left untouched (no structural formatting at all). | | ["html", "body"] | Only the listed tag names are left untouched. |
Ignored tags still count toward indentation — their children are indented as if the tag were really there, even though it's never parsed as one. This is computed per file from that file's own ignored tags only: head.ejs only knows it opens /, and foot.ejs only knows it closes them, but both land on the same indentation because each is shifted so its content never goes above column 0.
Any tag not listed (like above) still needs to be balanced within that same file — list every tag that spans across your head/foot split, not just html/body.
Team setup
Run once on a new machine. The script installs the plugin globally, resolves the correct plugin path for that machine, and writes ~/.prettierrc automatically.
The scripts aren't published with the npm package — download them from the latest release:
Windows:
- Download setup.bat 2. Double-click it to run — no terminal needed.
Mac / Linux:
- Download setup.sh 2. Run:
After running, add to VS Code User Settings (Ctrl+Shift+P → Open User Settings JSON):
The exact prettier.configPath value is printed by the setup script after it runs.
What the setup script does
- Installs prettier-plugin-ejs-safe globally — prettier is included as a dependency, no separate install needed 2. Finds the plugin path on this machine using npm root -g 3. Writes ~/.prettierrc with the absolute plugin path
CLI / CI usage
Example
Before:
After:
EJS tags unchanged, HTML formatted.
Description from the npm listing.
- prettier
- prettier-plugin
- ejs
- express
- template
- html
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 (121)Similar npm Prettier plugins plugins
All 20 prettier-plugin-ejs-safe 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-ejs-safe. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.