Twig テンプレートのリンターとフォーマッター
djLint で Twig テンプレートをリント・フォーマットできます。ルールとフォーマットがテンプレートに合うよう、nunjucks プロファイルを設定してください。
Pebble(Java)のテンプレートは Twig と互換性があるので、同じプロファイルを使ってください。
コマンドラインを使う
Section titled “コマンドラインを使う”djlint /path/to/templates --profile=nunjucks設定ファイルで
Section titled “設定ファイルで”プロジェクトの pyproject.toml、djlint.toml / .djlint.toml、または .djlintrc ファイルで djLint を設定します。
[tool.djlint]profile = "nunjucks"profile = "nunjucks"{ "profile": "nunjucks" }