HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang
Find a file
Christopher Pickering 40d8562033
updated version
2021-07-12 15:26:56 -05:00
.github/workflows Create python-publish.yml 2021-07-12 14:13:03 -05:00
src/djlint stopped adding error to print 2021-07-12 15:26:14 -05:00
tests stopped adding error to print 2021-07-12 15:26:38 -05:00
.gitignore initial commit 2021-07-12 13:26:46 -05:00
.pre-commit-config.yaml initial commit 2021-07-12 13:26:46 -05:00
CHANGELOG.md initial commit 2021-07-12 13:26:46 -05:00
LICENSE initial commit 2021-07-12 13:26:46 -05:00
MANIFEST.in updated rev. added manifest. 2021-07-12 14:23:20 -05:00
pyproject.toml initial commit 2021-07-12 13:26:46 -05:00
README.md initial commit 2021-07-12 13:26:46 -05:00
setup.py updated version 2021-07-12 15:26:56 -05:00

djlint

Simple Django template linter.

Install

pip install djlint

Usage

djlint <file or path>

Optional args

Arg Definition Default
-e, --extension File extension to lint. default=html

Rules

Error Codes

Code Meaning
E001 Variables should be wrapped in a single whitespace. Ex: {{ this }}
E002 Double quotes should be used in tags. Ex {% extends "this.html" %}

Warning Codes

Code Meaning
W003 Endblock should have name. Ex: {% endblock body %}.
W004 Status urls should follow {% static path/to/file %} pattern.