A Prettier plugin for Marko templates that uses the htmljs-parser (^5) instead of @marko/compiler. Version 0.1.1 is current; development is active with monthly releases. Key differentiators: follows Prettier's HTML formatting rules (empty line collapsing, separate close tags for non-void elements, bracketSameLine support) and supports prettier-ignore comments. Does not support Marko concise mode. Requires Prettier ^3 as a peer dependency.
npm install prettier-plugin-marko-htmljsVerified import paths — ran on the pinned version, not inferred.
Install and configure the plugin, then run prettier on Marko files.
Use this plugin exclusively for Marko formatting; do not mix with prettier-plugin-marko.
Write all templates in HTML-like (non-concise) mode.
Wrap content in a div or other container to use prettier-ignore.
Use prettier-ignore on the <pre> element or its parent.
npm install --save-dev htmljs-parser
npm install --save-dev prettier-plugin-marko-htmljs
Rewrite template using HTML-like syntax with explicit tags.