From 679e592a5ce28ca4c7d9cdb7fdbe51227483488c Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 28 Mar 2023 17:50:37 +0800 Subject: [PATCH] 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": "*",