From 679e592a5ce28ca4c7d9cdb7fdbe51227483488c Mon Sep 17 00:00:00 2001
From: Chocobo1
Date: Tue, 28 Mar 2023 17:50:37 +0800
Subject: [PATCH 1/7] Add checker for html
---
src/webui/www/.htmlvalidate.json | 17 +++++++++++++++++
src/webui/www/package.json | 3 ++-
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 src/webui/www/.htmlvalidate.json
diff --git a/src/webui/www/.htmlvalidate.json b/src/webui/www/.htmlvalidate.json
new file mode 100644
index 000000000..d07cc98d3
--- /dev/null
+++ b/src/webui/www/.htmlvalidate.json
@@ -0,0 +1,17 @@
+{
+ "extends": [
+ "html-validate:recommended"
+ ],
+ "rules": {
+ "empty-heading": "off",
+ "long-title": "off",
+ "no-conditional-comment": "off",
+ "no-inline-style": "off",
+ "prefer-button": "off",
+ "prefer-tbody": "off",
+ "text-content": "off",
+ "void-style": "off",
+ "wcag/h63": "off",
+ "wcag/h71": "off"
+ }
+}
diff --git a/src/webui/www/package.json b/src/webui/www/package.json
index 3370ee55e..6be44e273 100644
--- a/src/webui/www/package.json
+++ b/src/webui/www/package.json
@@ -7,11 +7,12 @@
},
"scripts": {
"format": "js-beautify private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && prettier --write **.css",
- "lint": "eslint private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint **/*.css"
+ "lint": "eslint private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint **/*.css && html-validate private public"
},
"devDependencies": {
"eslint": "*",
"eslint-plugin-html": "*",
+ "html-validate": "*",
"js-beautify": "*",
"prettier": "*",
"stylelint": "*",
From a36358d7d0c00247623e78c4f164ec97621c1939 Mon Sep 17 00:00:00 2001
From: Chocobo1
Date: Tue, 28 Mar 2023 17:59:54 +0800
Subject: [PATCH 2/7] Remove deprecated rules
---
src/webui/www/.stylelintrc.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/webui/www/.stylelintrc.json b/src/webui/www/.stylelintrc.json
index f677e2fbf..55324a0dd 100644
--- a/src/webui/www/.stylelintrc.json
+++ b/src/webui/www/.stylelintrc.json
@@ -8,9 +8,7 @@
"color-hex-length": null,
"comment-empty-line-before": null,
"comment-whitespace-inside": null,
- "declaration-colon-newline-after": null,
"function-name-case": null,
- "indentation": 4,
"length-zero-no-unit": null,
"no-descending-specificity": null,
"order/properties-alphabetical-order": true,
From eb875ac8c162530ac47c831c61833c2ccab80d30 Mon Sep 17 00:00:00 2001
From: Chocobo1
Date: Tue, 28 Mar 2023 18:16:32 +0800
Subject: [PATCH 3/7] Add attributes explicitly
---
src/webui/www/private/addpeers.html | 4 ++--
src/webui/www/private/download.html | 2 +-
src/webui/www/private/downloadlimit.html | 2 +-
src/webui/www/private/edittracker.html | 2 +-
src/webui/www/private/upload.html | 2 +-
src/webui/www/private/uploadlimit.html | 2 +-
src/webui/www/private/views/installsearchplugin.html | 4 ++--
src/webui/www/private/views/log.html | 2 +-
src/webui/www/private/views/preferences.html | 4 ++--
src/webui/www/private/views/rss.html | 8 ++++----
src/webui/www/private/views/rssDownloader.html | 6 +++---
src/webui/www/private/views/search.html | 4 ++--
src/webui/www/private/views/searchplugins.html | 6 +++---
13 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/webui/www/private/addpeers.html b/src/webui/www/private/addpeers.html
index b665e5e75..4a23ace3d 100644
--- a/src/webui/www/private/addpeers.html
+++ b/src/webui/www/private/addpeers.html
@@ -62,8 +62,8 @@
QBT_TR(List of peers to add (one IP per line):)QBT_TR[CONTEXT=PeersAdditionDialog]
-
-
+
+
-
+