curlylint
Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid
Install and run
Grab Curlylint from PyPI, and start linting your HTML templates:
# Assuming you’re using Python 3.6+,pip install curlylint# Then run:curlylint my/templates
- Jinja & Nunjucks
- Django Templates
- Twig
<form role="filter">{%- for field in search_form -%}{% include "field.njk" %}{%- endfor -%}</form>
<form role="filter">{% for field in search_form %}{% include "field.html" with field=field %}{% endfor %}</form>
<form role="filter">{% for field in search_form %}{% include "./field.twig" only %}{% endfor %}</form>
Templates-friendly
Curlylint is meant to work directly with source templates, so it can be used like any other static analysis tool – in your IDE, Continuous Integration, or pre-commit hooks.
Catch errors before your users do
The sooner errors are caught, the easier to fix. Create valid, accessible HTML by default.
Accessible by default
Curlylint’s main purpose is to catch accessibility issues – automate the basic checks, so you can focus on tests that cannot be automated.