Go テンプレートのリンターとフォーマッター

djLint で Go テンプレートをリント・フォーマットできます。ルールとフォーマットがテンプレートに合うよう、golang プロファイルを設定してください。

Go テンプレートとは?

Go テンプレート(text/template、html/template)は Hugo のテーマや Helm チャートでも使われているので、それらにも同じプロファイルを使ってください。

コマンドラインを使う

djlint /path/to/templates --profile=golang

または、設定ファイルを使う

プロジェクトの pyproject.toml、djlint.toml / .djlint.toml、または .djlintrc ファイルで djLint を設定します。

[tool.djlint]
profile = "golang"
profile = "golang"
{ "profile": "golang" }