prettier-plugin-jinja-template but with patches to work with Askama
.github/workflows | ||
src | ||
test | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
babel.config.js | ||
jest.config.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
prettier-plugin-askama-template
prettier-plugin-jinja-template but with patches to work with Askama.
Install
npm install --save-dev prettier https://git.fetbuk.ru/WerySkok/prettier-plugin-askama-template.git
Add the plugin to your .prettierrc
:
{
"plugins": ["prettier-plugin-askama-template"]
}
Use
To format basic .html files, you'll have to override the used parser inside your .prettierrc
:
{
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "askama-template"
}
}
]
}
Run it on all html files in your project:
npx prettier --write **/*.html
If you don't have a prettier config you can run the plugin with this command:
npx prettier --write **/*.html --plugin=prettier-plugin-askama-template