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-edgejsVerified import paths — ran on the pinned version, not inferred.
Installation and basic configuration for formatting .edge files with Prettier.
Consider forking or contributing if you need new features.
Avoid deeply nested Edge tags inside <script> or <style> blocks.
Manually format attribute values if needed.
Restart your editor or Prettier extension.
Set a higher printWidth to avoid automatic single attribute per line.
Run: npm i prettier prettier-plugin-edgejs --save-dev
Ensure 'plugins' array in .prettierrc.json includes 'prettier-plugin-edgejs'.
Set customSingleLineEdgeTags to an array, e.g., ["@reverse"].
Update prettier and the plugin: npm update prettier prettier-plugin-edgejs