Jinja template linter and formatter
djLint lints and formats Jinja templates. Set the jinja profile so the rules and the formatting fit them.
MiniJinja follows Jinja2’s syntax, and HubSpot’s Jinjava templates are Jinja-style too, so use the jinja profile for both. J004 and J018 suggest Flask’s url_for, so ignore them in a project without Flask.
Using the command line
Section titled “Using the command line”djlint /path/to/templates --profile=jinjaIn a config file
Section titled “In a config file”Configure djLint in your project’s pyproject.toml, djlint.toml / .djlint.toml, or .djlintrc file.
[tool.djlint]profile = "jinja"profile = "jinja"{ "profile": "jinja" }