Library for building Prettier plugins to format HTML files containing template language markup such as Jinja, ERB, and others. Current stable version is 0.1.0. This package provides the infrastructure to embed template language constructs into Prettier's HTML formatting pipeline. It is the base for plugins like prettier-plugin-eex (Elixir) and prettier-plugin-erb (Ruby). Key differentiator: it enables unified formatting of mixed HTML/template files using Prettier's standard HTML printer, whereas alternatives often rely on language-specific formatters.
npm install prettier-html-templatesVerified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin with Prettier to format HTML containing template syntax.
Manually format class attributes or wait for a future release.
Manually format style attributes or wait for a future release.
Use alternative mechanisms to exclude code from formatting.
Use Prettier v2.x for this plugin version.
npm install prettier-html-templates --save-dev and add it to plugins: ['prettier-html-templates']
Use import instead of require, or set "type": "module" in package.json.
Ensure your template syntax is supported; check the plugin's GitHub issues.