prettier-plugin-jinja-template but with patches to work with Askama
Find a file
2023-03-19 18:07:13 +01:00
.github/workflows add coverage upload to github ci 2023-03-19 18:07:13 +01:00
src align indentation of multiline expressions and statements 2023-03-19 15:49:41 +01:00
test add locStart and locEnd tests 2023-03-19 18:07:13 +01:00
.gitignore add test coverage and check html files on watch mode 2023-03-19 18:02:19 +01:00
.prettierignore fix indentation on readme example 2022-11-18 21:22:28 +01:00
.prettierrc initial commit 2022-11-18 20:05:06 +01:00
babel.config.js initial commit 2022-11-18 20:05:06 +01:00
jest.config.js add test coverage and check html files on watch mode 2023-03-19 18:02:19 +01:00
package-lock.json Release 0.2.0 2023-03-19 15:54:19 +01:00
package.json Release 0.2.0 2023-03-19 15:54:19 +01:00
README.md improve usage instructions in readme 2023-01-06 18:32:30 +01:00
tsconfig.json initial commit 2022-11-18 20:05:06 +01:00

prettier-plugin-jinja-template

Formatter plugin for jinja2 template files.

Install

npm install --save-dev prettier prettier-plugin-jinja-template

Use

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