Linter und Formatter für Twig-Templates
djLint lintet und formatiert Twig-Templates. Setzen Sie das Profil nunjucks, damit Regeln und Formatierung zu ihnen passen.
Pebble-Templates (Java) sind Twig-kompatibel. Verwenden Sie für sie daher dasselbe Profil.
Über die Befehlszeile
djlint /path/to/templates --profile=nunjucks
Oder über eine Konfigurationsdatei
Konfigurieren Sie djLint in der Datei pyproject.toml, djlint.toml / .djlint.toml oder .djlintrc Ihres Projekts.
[tool.djlint]
profile = "nunjucks"
profile = "nunjucks"
{ "profile": "nunjucks" }