EdgeJS Prettier Plugin
npm install prettier-plugin-edgejsThis is an _opinionated_ Prettier plugin for EdgeJS (.edge) files.
``shell`
npm i prettier-plugin-edgejs
Add as plugin in your prettier config
`json`
{
"plugins": ["prettier-plugin-edgejs"]
}
_Note: Once added you may need to restart your editor (or extension host) if you have an extension such as Prettier for VSCode so it auto-formats correctly on save, etc._
The plugin currently handles a few different prettier configurations
1. useTabs (default: false)
2. printWidth (default: 80)
3. tabWidth (default: 4)
4. singleAttributePerLine (default: false)
5. customSingleLineEdgeTags (default: []) (example: ['@reverse'])
As with most open source projects my time is limited and I do the best I can.
If you spot an issue, feel free to open a Bug and I will get too it when I can, or even better yet feel free to open a PR.
If the printWidth is exceeded for any HTML tag, the plugin will default to having a single attribute per line to improve readability.
For block level elements opening tags, tag content and closing tags will always be on a separate line.