Formatter plugin for jinja2 template files.
npm install --save-dev prettier prettier-plugin-jinja-template
To format basic .html files, you'll have to override the used parser inside your .prettierrc
:
{
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "jinja-template"
}
}
]
}
Run it on all html files in your project:
npx prettier --write **/*.html