跳到內容

Angular 範本 Linter

djLint 可以 lint Angular 範本。設定 angular profile,讓規則符合這類範本。

什麼是 Angular?

終端機視窗
djlint /path/to/templates --profile=angular

在專案的 pyproject.toml、djlint.toml / .djlint.toml 或 .djlintrc 檔案中設定 djLint。

pyproject.toml
[tool.djlint]
profile = "angular"
djlint.toml / .djlint.toml
profile = "angular"
.djlintrc
{ "profile": "angular" }