Registry / web-framework / prettier-plugin-edgejs

prettier-plugin-edgejs

JSON →
library1.0.7jsnpmunverified

A Prettier plugin for formatting EdgeJS (.edge) template files, an opinionated formatter maintained by the community. Current version 1.0.7 is stable but in maintenance mode with no active feature development. It supports standard Prettier options like useTabs, printWidth, tabWidth, singleAttributePerLine, and custom single-line edge tags. Key differentiator: it is the only dedicated formatter for EdgeJS templates, handling HTML, Edge tags, and embedded script/style blocks. Release cadence is low; updates depend on community contributions. Works alongside Prettier and requires Prettier installed.

npm install prettier-plugin-edgejs
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-ED
P
prettier-plugin-edgejs
web-frameworkjavascriptv1.0.7
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

(plugin)
✓ Add 'prettier-plugin-edgejs' to plugins array in Prettier config.
✗ import prettierPluginEdgejs from 'prettier-plugin-edgejs'
This is a Prettier plugin, not a library. You do not import it in code; you reference it in your Prettier config file.
config
✓ { "plugins": ["prettier-plugin-edgejs"] }
✗ { "plugins": ["prettier-plugin-edgejs", {}, {}] }
Correct usage: add plugin name as a string in plugins array. No import statement needed.
options
✓ { "plugins": ["prettier-plugin-edgejs"], "customSingleLineEdgeTags": ["@reverse"] }
✗ { "plugins": ["prettier-plugin-edgejs"], "customSingleLineEdgeTags": "@reverse" }
customSingleLineEdgeTags must be an array of strings, not a single string.

Installation and basic configuration for formatting .edge files with Prettier.

// 1. Install: npm i prettier prettier-plugin-edgejs // 2. Create .prettierrc.json: { "plugins": ["prettier-plugin-edgejs"], "printWidth": 80, "tabWidth": 4, "useTabs": false, "singleAttributePerLine": false, "customSingleLineEdgeTags": [] } // 3. Format: npx prettier --write "**/*.edge"
Debug
Known issues
deprecatedProject is in maintenance mode; no active feature development.
fix
Consider forking or contributing if you need new features.
affects: >=1.0.0
gotchaScript and style tags with EdgeJS tags are only supported 1 level deep. Deeper nesting may not format correctly.
fix
Avoid deeply nested Edge tags inside <script> or <style> blocks.
affects: >=1.0.0
gotchaAttribute values are not formatted for spacing; they are preserved as-is.
fix
Manually format attribute values if needed.
affects: >=1.0.0
gotchaEditor extensions may require restart after adding the plugin to config.
fix
Restart your editor or Prettier extension.
affects: >=1.0.0
gotchaIf printWidth is exceeded on an HTML tag, plugin forces singleAttributePerLine regardless of the setting.
fix
Set a higher printWidth to avoid automatic single attribute per line.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'prettier-plugin-edgejs'
Plugin not installed or not in node_modules.
fix
Run: npm i prettier prettier-plugin-edgejs --save-dev
No parser could be inferred for file: example.edge
Plugin not added to Prettier config or file not recognized.
fix
Ensure 'plugins' array in .prettierrc.json includes 'prettier-plugin-edgejs'.
Invalid option 'customSingleLineEdgeTags'. Expected an array of strings.
Option set to a string instead of an array.
fix
Set customSingleLineEdgeTags to an array, e.g., ["@reverse"].
Cannot destructure property 'printWidth' of 'userOptions' as it is undefined.
Outdated version or misconfiguration; possibly missing Prettier peer dep.
fix
Update prettier and the plugin: npm update prettier prettier-plugin-edgejs
Upgrade
Version history
1.0.7latest on npm
Audit
Dependencies
prettierrequiredpeer dependency; the plugin extends Prettier and requires it at runtime.
Agent activity
2 hits · last 30 days
node
2
Resources
prettier-plugin-edgejs — npm install prettier-plugin-edgejs · libregistry