Install curlylint
This commit is contained in:
parent
668bcc7d5b
commit
e096dd8cf5
20 changed files with 193 additions and 171 deletions
|
@ -103,6 +103,11 @@ mypy:
|
||||||
script:
|
script:
|
||||||
- mypy .
|
- mypy .
|
||||||
|
|
||||||
|
curlylint:
|
||||||
|
<<: *python_test_template
|
||||||
|
script:
|
||||||
|
- curlylint .
|
||||||
|
|
||||||
prettier:
|
prettier:
|
||||||
<<: *node_test_template
|
<<: *node_test_template
|
||||||
script:
|
script:
|
||||||
|
|
1
justfile
1
justfile
|
@ -37,6 +37,7 @@ lint_python:
|
||||||
isort --check .
|
isort --check .
|
||||||
flake8
|
flake8
|
||||||
mypy . --show-error-codes
|
mypy . --show-error-codes
|
||||||
|
curlylint .
|
||||||
|
|
||||||
@lint_node:
|
@lint_node:
|
||||||
npm run lint
|
npm run lint
|
||||||
|
|
15
pyproject.toml
Normal file
15
pyproject.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[tool.curlylint]
|
||||||
|
include = '/(website|templates)/.*\.html'
|
||||||
|
exclude = '''
|
||||||
|
(
|
||||||
|
navbar\.html
|
||||||
|
| referrallink_snippet_link\.html
|
||||||
|
| onlineaccount_snippet_link\.html
|
||||||
|
| base\.html
|
||||||
|
| 500\.html
|
||||||
|
)
|
||||||
|
'''
|
||||||
|
|
||||||
|
[tool.curlylint.rules]
|
||||||
|
indent = 2
|
||||||
|
html_has_lang = 'en-GB'
|
|
@ -10,3 +10,4 @@ django-browser-reload
|
||||||
django-debug-toolbar
|
django-debug-toolbar
|
||||||
types-requests
|
types-requests
|
||||||
mypy
|
mypy
|
||||||
|
curlylint
|
||||||
|
|
|
@ -7,13 +7,15 @@
|
||||||
anyascii==0.3.1 # via -r requirements/base.txt, wagtail
|
anyascii==0.3.1 # via -r requirements/base.txt, wagtail
|
||||||
asgiref==3.5.2 # via -r requirements/base.txt, django
|
asgiref==3.5.2 # via -r requirements/base.txt, django
|
||||||
async-timeout==4.0.2 # via -r requirements/base.txt, redis
|
async-timeout==4.0.2 # via -r requirements/base.txt, redis
|
||||||
|
attrs==22.1.0 # via curlylint
|
||||||
beautifulsoup4==4.9.3 # via -r requirements/base.txt, wagtail
|
beautifulsoup4==4.9.3 # via -r requirements/base.txt, wagtail
|
||||||
black==22.6.0 # via -r requirements/dev.in
|
black==22.6.0 # via -r requirements/dev.in
|
||||||
brotli==1.0.9 # via -r requirements/base.txt, whitenoise
|
brotli==1.0.9 # via -r requirements/base.txt, whitenoise
|
||||||
build==0.8.0 # via pip-tools
|
build==0.8.0 # via pip-tools
|
||||||
certifi==2022.6.15 # via -r requirements/base.txt, requests
|
certifi==2022.6.15 # via -r requirements/base.txt, requests
|
||||||
charset-normalizer==2.1.0 # via -r requirements/base.txt, requests
|
charset-normalizer==2.1.0 # via -r requirements/base.txt, requests
|
||||||
click==8.1.3 # via -r requirements/base.txt, black, pip-tools, rq
|
click==8.1.3 # via -r requirements/base.txt, black, curlylint, pip-tools, rq
|
||||||
|
curlylint==0.13.1 # via -r requirements/dev.in
|
||||||
deprecated==1.2.13 # via -r requirements/base.txt, redis
|
deprecated==1.2.13 # via -r requirements/base.txt, redis
|
||||||
django==4.0.6 # via -r requirements/base.txt, django-browser-reload, django-debug-toolbar, django-filter, django-htmx, django-modelcluster, django-permissionedforms, django-redis, django-rq, django-taggit, django-treebeard, djangorestframework, wagtail
|
django==4.0.6 # via -r requirements/base.txt, django-browser-reload, django-debug-toolbar, django-filter, django-htmx, django-modelcluster, django-permissionedforms, django-redis, django-rq, django-taggit, django-treebeard, djangorestframework, wagtail
|
||||||
django-browser-reload==1.6.0 # via -r requirements/dev.in
|
django-browser-reload==1.6.0 # via -r requirements/dev.in
|
||||||
|
@ -44,7 +46,8 @@ mypy==0.971 # via -r requirements/dev.in
|
||||||
mypy-extensions==0.4.3 # via black, mypy
|
mypy-extensions==0.4.3 # via black, mypy
|
||||||
openpyxl==3.0.10 # via -r requirements/base.txt, tablib
|
openpyxl==3.0.10 # via -r requirements/base.txt, tablib
|
||||||
packaging==21.3 # via -r requirements/base.txt, build, redis
|
packaging==21.3 # via -r requirements/base.txt, build, redis
|
||||||
pathspec==0.9.0 # via black
|
parsy==1.1.0 # via curlylint
|
||||||
|
pathspec==0.9.0 # via black, curlylint
|
||||||
pep517==0.12.0 # via build
|
pep517==0.12.0 # via build
|
||||||
pillow==9.2.0 # via -r requirements/base.txt, wagtail
|
pillow==9.2.0 # via -r requirements/base.txt, wagtail
|
||||||
pip-tools==6.8.0 # via -r requirements/dev.in
|
pip-tools==6.8.0 # via -r requirements/dev.in
|
||||||
|
@ -63,6 +66,7 @@ soupsieve==2.3.2.post1 # via -r requirements/base.txt, beautifulsoup4
|
||||||
sqlparse==0.4.2 # via -r requirements/base.txt, django, django-debug-toolbar
|
sqlparse==0.4.2 # via -r requirements/base.txt, django, django-debug-toolbar
|
||||||
tablib[xls,xlsx]==3.2.1 # via -r requirements/base.txt, wagtail
|
tablib[xls,xlsx]==3.2.1 # via -r requirements/base.txt, wagtail
|
||||||
telepath==0.2 # via -r requirements/base.txt, wagtail
|
telepath==0.2 # via -r requirements/base.txt, wagtail
|
||||||
|
toml==0.10.2 # via curlylint
|
||||||
tomli==2.0.1 # via black, build, mypy, pep517
|
tomli==2.0.1 # via black, build, mypy, pep517
|
||||||
types-requests==2.28.5 # via -r requirements/dev.in
|
types-requests==2.28.5 # via -r requirements/dev.in
|
||||||
types-urllib3==1.26.17 # via types-requests
|
types-urllib3==1.26.17 # via types-requests
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% block body_class %}template-404{% endblock %}
|
{% block body_class %}template-404{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Page not found</h1>
|
<h1>Page not found</h1>
|
||||||
|
|
||||||
<h2>Sorry, this page could not be found.</h2>
|
<h2>Sorry, this page could not be found.</h2>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" dir="ltr">
|
<html lang="en-GB">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Internal server error</title>
|
<title>Internal server error</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Internal server error</h1>
|
<h1>Internal server error</h1>
|
||||||
|
<h2>Sorry, there seems to be an error. Please try again soon.</h2>
|
||||||
<h2>Sorry, there seems to be an error. Please try again soon.</h2>
|
</body>
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% load static wagtailcore_tags wagtailuserbar navbar_tags footer_tags cache %}
|
{% load static wagtailcore_tags wagtailuserbar navbar_tags footer_tags cache %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en-GB">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>
|
<title>
|
||||||
|
@ -38,7 +38,6 @@
|
||||||
{% footer %}
|
{% footer %}
|
||||||
{% endcache %}
|
{% endcache %}
|
||||||
|
|
||||||
|
|
||||||
<script async defer type="text/javascript" src="{% static 'js/base.js' %}"></script>
|
<script async defer type="text/javascript" src="{% static 'js/base.js' %}"></script>
|
||||||
<script async defer type="text/javascript" src="{% static 'contrib/htmx/htmx.min.js' %}"></script>
|
<script async defer type="text/javascript" src="{% static 'contrib/htmx/htmx.min.js' %}"></script>
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for collection in collections %}
|
{% for collection in collections %}
|
||||||
{% include "common/listing-item.html" with page=collection %}
|
{% include "common/listing-item.html" with page=collection %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for page in pages %}
|
{% for page in pages %}
|
||||||
{% include "common/listing-item.html" %}
|
{% include "common/listing-item.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for page in child_pages %}
|
{% for page in child_pages %}
|
||||||
{% if not filtering_by_tag %}
|
{% if not filtering_by_tag %}
|
||||||
{% ifchanged %}
|
{% ifchanged %}
|
||||||
|
@ -22,6 +22,6 @@
|
||||||
|
|
||||||
{% include "common/listing-item.html" %}
|
{% include "common/listing-item.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for tag in tags %}
|
{% for tag in tags %}
|
||||||
{% include "common/listing-item.html" with page=tag %}
|
{% include "common/listing-item.html" with page=tag %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for page in pages %}
|
{% for page in pages %}
|
||||||
{% include "common/listing-item.html" %}
|
{% include "common/listing-item.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% include "common/shareon.html" %}
|
{% include "common/shareon.html" %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for page in child_pages %}
|
{% for page in child_pages %}
|
||||||
{% include "common/listing-item.html" %}
|
{% include "common/listing-item.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -35,5 +35,4 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for account in accounts %}
|
{% for account in accounts %}
|
||||||
<div class="card mt-4" id="{{ account.slug }}">
|
<div class="card mt-4" id="{{ account.slug }}">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
|
@ -21,6 +21,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{% load wagtailcore_tags wagtailimages_tags %}
|
{% load wagtailcore_tags wagtailimages_tags %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<main {% if page.image %}style="background-image: url({% image_url page.image 'width-1200' %})"{% endif %}>
|
<main {% if page.image %}style="background-image: url({% image_url page.image 'width-1200' %})"{% endif %}>
|
||||||
<div class="heading-wrapper">
|
<div class="heading-wrapper">
|
||||||
<h1>{{ page.heading }}</h1>
|
<h1>{{ page.heading }}</h1>
|
||||||
<input id="search-input" class="input" type="text" placeholder="Search">
|
<input id="search-input" class="input" type="text" placeholder="Search">
|
||||||
|
@ -14,5 +14,5 @@
|
||||||
<strong>Latest Post</strong>: <a href="{% pageurl latest_blog_post %}">{{ latest_blog_post.title }}</a> →
|
<strong>Latest Post</strong>: <a href="{% pageurl latest_blog_post %}">{{ latest_blog_post.title }}</a> →
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "common/hero.html" %}
|
{% include "common/hero.html" %}
|
||||||
|
|
||||||
{% if page.body_html %}
|
{% if page.body_html %}
|
||||||
<section class="container content">
|
<section class="container content">
|
||||||
{{ page.body_html|safe }}
|
{{ page.body_html|safe }}
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="container search-controls">
|
<section class="container search-controls">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<p class="control has-icons-left has-icons-right">
|
<p class="control has-icons-left has-icons-right">
|
||||||
<input
|
<input
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="container" id="search-results-container">
|
<section class="container" id="search-results-container">
|
||||||
<p id="result-count"></p>
|
<p id="result-count"></p>
|
||||||
|
|
||||||
<div id="search-results">
|
<div id="search-results">
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
{% include "search/enter-search-term.html" %}
|
{% include "search/enter-search-term.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue