From cb90b6769c1b8b0be61f817333ee62c8844c93ec Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 27 May 2024 22:50:17 +0800 Subject: [PATCH] WebUI: enforce string quotes coding style --- src/webui/www/eslint.config.mjs | 18 +- src/webui/www/package.json | 4 +- src/webui/www/private/addpeers.html | 24 +- src/webui/www/private/addtrackers.html | 22 +- src/webui/www/private/confirmdeletion.html | 54 +- .../www/private/confirmfeeddeletion.html | 16 +- src/webui/www/private/confirmruleclear.html | 18 +- .../www/private/confirmruledeletion.html | 20 +- src/webui/www/private/download.html | 20 +- src/webui/www/private/downloadlimit.html | 30 +- src/webui/www/private/edittracker.html | 30 +- src/webui/www/private/newcategory.html | 58 +- src/webui/www/private/newfeed.html | 36 +- src/webui/www/private/newfolder.html | 36 +- src/webui/www/private/newrule.html | 38 +- src/webui/www/private/newtag.html | 36 +- src/webui/www/private/rename.html | 30 +- src/webui/www/private/rename_feed.html | 40 +- src/webui/www/private/rename_file.html | 46 +- src/webui/www/private/rename_files.html | 214 +-- src/webui/www/private/rename_rule.html | 44 +- src/webui/www/private/scripts/cache.js | 40 +- src/webui/www/private/scripts/client.js | 724 ++++---- src/webui/www/private/scripts/contextmenu.js | 332 ++-- src/webui/www/private/scripts/download.js | 56 +- src/webui/www/private/scripts/dynamicTable.js | 1462 ++++++++--------- src/webui/www/private/scripts/file-tree.js | 2 +- src/webui/www/private/scripts/filesystem.js | 10 +- .../www/private/scripts/localpreferences.js | 2 +- src/webui/www/private/scripts/misc.js | 14 +- src/webui/www/private/scripts/mocha-init.js | 318 ++-- src/webui/www/private/scripts/piecesbar.js | 44 +- src/webui/www/private/scripts/progressbar.js | 110 +- src/webui/www/private/scripts/prop-files.js | 142 +- src/webui/www/private/scripts/prop-general.js | 130 +- src/webui/www/private/scripts/prop-peers.js | 74 +- .../www/private/scripts/prop-trackers.js | 46 +- .../www/private/scripts/prop-webseeds.js | 26 +- src/webui/www/private/scripts/rename-files.js | 26 +- src/webui/www/private/scripts/search.js | 250 +-- src/webui/www/private/scripts/speedslider.js | 102 +- src/webui/www/private/setlocation.html | 34 +- src/webui/www/private/shareratio.html | 84 +- src/webui/www/private/upload.html | 18 +- src/webui/www/private/uploadlimit.html | 30 +- src/webui/www/private/views/about.html | 16 +- src/webui/www/private/views/aboutToolbar.html | 40 +- src/webui/www/private/views/filters.html | 30 +- .../private/views/installsearchplugin.html | 16 +- src/webui/www/private/views/log.html | 88 +- src/webui/www/private/views/preferences.html | 1238 +++++++------- .../www/private/views/preferencesToolbar.html | 52 +- src/webui/www/private/views/properties.html | 4 +- src/webui/www/private/views/rss.html | 200 +-- .../www/private/views/rssDownloader.html | 332 ++-- .../www/private/views/searchplugins.html | 38 +- src/webui/www/private/views/transferlist.html | 18 +- src/webui/www/public/scripts/login.js | 54 +- 58 files changed, 3522 insertions(+), 3514 deletions(-) diff --git a/src/webui/www/eslint.config.mjs b/src/webui/www/eslint.config.mjs index ba6f91a0d..121f8acb2 100644 --- a/src/webui/www/eslint.config.mjs +++ b/src/webui/www/eslint.config.mjs @@ -1,8 +1,8 @@ -import Globals from 'globals'; -import Html from 'eslint-plugin-html'; -import Js from '@eslint/js'; -import Stylistic from '@stylistic/eslint-plugin'; -import * as RegexpPlugin from 'eslint-plugin-regexp'; +import Globals from "globals"; +import Html from "eslint-plugin-html"; +import Js from "@eslint/js"; +import Stylistic from "@stylistic/eslint-plugin"; +import * as RegexpPlugin from "eslint-plugin-regexp"; export default [ Js.configs.recommended, @@ -38,6 +38,14 @@ export default [ } ], "Stylistic/nonblock-statement-body-position": ["error", "below"], + "Stylistic/quotes": [ + "error", + "double", + { + "avoidEscape": true, + "allowTemplateLiterals": true + } + ], "Stylistic/semi": "error" } } diff --git a/src/webui/www/package.json b/src/webui/www/package.json index 975a90014..d18f690be 100644 --- a/src/webui/www/package.json +++ b/src/webui/www/package.json @@ -7,8 +7,8 @@ }, "scripts": { "extract_translation": "i18next -c public/i18next-parser.config.mjs public/index.html public/scripts/login.js", - "format": "js-beautify -r 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 && html-validate private public" + "format": "js-beautify -r *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && prettier --write **.css", + "lint": "eslint *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint **/*.css && html-validate private public" }, "devDependencies": { "@stylistic/eslint-plugin": "*", diff --git a/src/webui/www/private/addpeers.html b/src/webui/www/private/addpeers.html index a86673d14..80801c8de 100644 --- a/src/webui/www/private/addpeers.html +++ b/src/webui/www/private/addpeers.html @@ -8,42 +8,42 @@ diff --git a/src/webui/www/private/edittracker.html b/src/webui/www/private/edittracker.html index feb5f5766..4fc76efc9 100644 --- a/src/webui/www/private/edittracker.html +++ b/src/webui/www/private/edittracker.html @@ -8,44 +8,44 @@ diff --git a/src/webui/www/private/upload.html b/src/webui/www/private/upload.html index ccdbc1124..72303d9ed 100644 --- a/src/webui/www/private/upload.html +++ b/src/webui/www/private/upload.html @@ -150,27 +150,27 @@
diff --git a/src/webui/www/private/uploadlimit.html b/src/webui/www/private/uploadlimit.html index 87d0db7b6..ef3b2731b 100644 --- a/src/webui/www/private/uploadlimit.html +++ b/src/webui/www/private/uploadlimit.html @@ -25,17 +25,17 @@ diff --git a/src/webui/www/private/views/about.html b/src/webui/www/private/views/about.html index 450a0a46e..e566106a8 100644 --- a/src/webui/www/private/views/about.html +++ b/src/webui/www/private/views/about.html @@ -841,18 +841,18 @@ diff --git a/src/webui/www/private/views/aboutToolbar.html b/src/webui/www/private/views/aboutToolbar.html index 3d9afd0e6..002b001f8 100644 --- a/src/webui/www/private/views/aboutToolbar.html +++ b/src/webui/www/private/views/aboutToolbar.html @@ -11,39 +11,39 @@ diff --git a/src/webui/www/private/views/filters.html b/src/webui/www/private/views/filters.html index 9b65dfa40..f0ad436e5 100644 --- a/src/webui/www/private/views/filters.html +++ b/src/webui/www/private/views/filters.html @@ -42,7 +42,7 @@ diff --git a/src/webui/www/private/views/properties.html b/src/webui/www/private/views/properties.html index 473221ed1..350f569ad 100644 --- a/src/webui/www/private/views/properties.html +++ b/src/webui/www/private/views/properties.html @@ -168,10 +168,10 @@