From cac8940c8a054a43ba9b603a3188c22bd64d9c9b Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 21 Jul 2022 13:46:12 +0100 Subject: [PATCH] Add curlylint config --- pyproject.toml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d296ec6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[tool.curlylint] +include = '\.(html|jinja)$' +exclude = ''' +( + /( + \.eggs # exclude a few common directories in the root of the project + | \.git + | \.venv + )/ + | webpack-stats.html # also separately exclude a file named webpack-stats.html in the root of the project +) +''' + +[tool.curlylint.rules] +indent = 2 +html_has_lang = 'en-GB' +# All role attributes must be valid. +# See https://www.curlylint.org/docs/rules/aria_role. +aria_role = true +# Forms cannot be rendered with as_table, as_ul, or as_p +# See https://www.curlylint.org/docs/rules/django_forms_rendering. +django_forms_rendering = true +# The `lang` attribute must be present. +# See https://www.curlylint.org/docs/rules/html_has_lang. +# The `alt` attribute must be present. +# See https://www.curlylint.org/docs/rules/image_alt. +image_alt = true +# Use tabs. +# See https://www.curlylint.org/docs/rules/indent. +# `user-scalable=no` must not be used, and `maximum-scale` should be 2 or above. +# See https://www.curlylint.org/docs/rules/meta_viewport. +meta_viewport = true +# The `autofocus` attribute must not be used. +# See https://www.curlylint.org/docs/rules/no_autofocus. +no_autofocus = true +# Avoid positive `tabindex` values, change the order of elements on the page instead. +# See https://www.curlylint.org/docs/rules/tabindex_no_positive. +tabindex_no_positive = true \ No newline at end of file