diff --git a/src/webui/www/eslint.config.mjs b/src/webui/www/eslint.config.mjs index f47227b44..204e3bcb1 100644 --- a/src/webui/www/eslint.config.mjs +++ b/src/webui/www/eslint.config.mjs @@ -30,6 +30,7 @@ export default [ "no-undef": "off", "no-unused-vars": "off", "no-var": "error", + "prefer-arrow-callback": "error", "prefer-const": "error", "Stylistic/no-mixed-operators": [ "error", diff --git a/src/webui/www/private/addpeers.html b/src/webui/www/private/addpeers.html index 80801c8de..b9be98ff1 100644 --- a/src/webui/www/private/addpeers.html +++ b/src/webui/www/private/addpeers.html @@ -24,14 +24,14 @@ } }).activate(); - window.addEvent("domready", function() { + window.addEvent("domready", () => { const hash = new URI().getData("hash"); if (!hash) return false; $("peers").focus(); - $("addPeersOk").addEvent("click", function(e) { + $("addPeersOk").addEvent("click", (e) => { new Event(e).stop(); const peers = $("peers").get("value").trim().split(/[\r\n]+/); diff --git a/src/webui/www/private/addtrackers.html b/src/webui/www/private/addtrackers.html index 59b19f284..ed5027a28 100644 --- a/src/webui/www/private/addtrackers.html +++ b/src/webui/www/private/addtrackers.html @@ -10,7 +10,7 @@