Nunjucks Template Linter and Formatter
djLint lints and formats Nunjucks templates. Set the nunjucks profile so the rules and the formatting fit them.
Pebble (Java) templates are Twig-compatible, so use this same profile for them.
Using the command line
djlint /path/to/templates --profile=nunjucks
Or, use a config file
Configure djLint in your project’s pyproject.toml, djlint.toml / .djlint.toml, or .djlintrc file.
[tool.djlint]
profile = "nunjucks"
profile = "nunjucks"
{ "profile": "nunjucks" }