From fdeb5d0ef7d5095cb8ce1eff4433076f73993994 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Mon, 4 May 2020 01:03:25 +0100 Subject: [PATCH] Release v0.8.0 --- CHANGELOG.md | 2 ++ README.md | 42 ++++++++++-------------------------------- curlylint/__init__.py | 2 +- 3 files changed, 13 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a5d009..4aa5ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ## Unreleased +## [v0.8.0](https://github.com/thibaudcolas/curlylint/releases/tag/v0.8.0) 2020-05-04 + ### Added - Add support for configurable formatters with `--format` CLI parameter / `format` config attribute. diff --git a/README.md b/README.md index 3f97344..596f9f5 100644 --- a/README.md +++ b/README.md @@ -4,41 +4,19 @@ > **{{ 🎀}}** Prototype linter for [Jinja](https://jinja.palletsprojects.com/) and [Django templates](https://docs.djangoproject.com/en/dev/topics/templates/), forked from [jinjalint](https://github.com/motet-a/jinjalint). -It works with [Django’s templates](https://docs.djangoproject.com/en/1.11/ref/templates/language/) too, it should -work with [Twig](https://twig.symfony.com/) and similar template languages. -It should work fine with any kind of HTML 4 and 5, however XHTML is not -supported. - -This linter parses both HTML and Jinja tags and will report mismatched -tags and indentation errors: - -```html+jinja -
- {% if something %} -
-{% endif %} -``` +curlylint is a prototype linter for your templates – whether that’s [Django’s templates](https://docs.djangoproject.com/en/1.11/ref/templates/language/), [Jinja](https://jinja.palletsprojects.com/), [Twig](https://twig.symfony.com/), or any other [“curly braces”](tests/README.md) template language. -```html+jinja -
- -
- -``` +As of now, curlylint supports: -```html+jinja -{% if something %} -
not indented properly
-{% endif %} -``` +- Linting invalid template / HTML syntax due to mismatched tags – while template errors are easy enough to spot, it’s not rare for HTML issues to make their way to live sites. +- Indentation inconsistencies – Usage of tabs vs spaces, line breaks, indentation size. -```html+jinja -{% if something %}{% endif %} -

something

- {% if not something %}
{% endif %} -``` +In the future, we intend to support linting: + +- Common accessibility issues in HTML – misuse of ARIA `role`, and making sure alternative text is used where appropriate. +- Common security issues – e.g. `rel="noopener noreferrer"`, or preventing usage of HTTP URLs. +- General HTML code smells – duplicate attributes, invalid attributes, etc. +- More [ideas welcome](docs/README.md)! ## Usage diff --git a/curlylint/__init__.py b/curlylint/__init__.py index aa07da3..18deae6 100644 --- a/curlylint/__init__.py +++ b/curlylint/__init__.py @@ -1,5 +1,5 @@ __name__ = "curlylint" -__version__ = "0.7.0" +__version__ = "0.8.0" __description__ = "{{ 🎀}} Prototype linter for Jinja and Django templates, forked from jinjalint" __author__ = "Thibaud Colas" __author_email__ = "thibaudcolas@gmail.com"