Skip to content

Commit

Permalink
Release v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed May 4, 2020
1 parent 5fbcd75 commit fdeb5d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
42 changes: 10 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<div>
{% if something %}
</div>
{% 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
<div>
<span>
</div>
</span>
```
As of now, curlylint supports:

```html+jinja
{% if something %}
<div>not indented properly</div>
{% 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 %}<a href="somewhere"
>{% endif %}
<p>something</p>
{% if not something %}</a
>{% 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

Expand Down
2 changes: 1 addition & 1 deletion curlylint/__init__.py
Original file line number Diff line number Diff line change
@@ -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__ = "[email protected]"
Expand Down

0 comments on commit fdeb5d0

Please sign in to comment.