From b438d8bb3d4b3dea6d28d0b0c73da9393c9d8299 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 21 Oct 2021 11:44:03 +0200 Subject: ESLint upgrade from JSHint (#3906) * ESLint upgrade from JSHint * commit corresponding package.json * `npm run fix` for automatic JS and CSS fixes * Keep JSHint config for now --- p/scripts/install.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'p/scripts/install.js') diff --git a/p/scripts/install.js b/p/scripts/install.js index 448f70b56..7c802531e 100644 --- a/p/scripts/install.js +++ b/p/scripts/install.js @@ -1,6 +1,5 @@ // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 -"use strict"; -/* jshint esversion:6, strict:global */ +'use strict'; function show_password(ev) { const button = ev.currentTarget; @@ -13,7 +12,7 @@ function hide_password(ev) { const button = ev.currentTarget; const passwordField = document.getElementById(button.getAttribute('data-toggle')); passwordField.setAttribute('type', 'password'); - button.className = button.className.replace(/(?:^|\s)active(?!\S)/g , ''); + button.className = button.className.replace(/(?:^|\s)active(?!\S)/g, ''); return false; } const toggles = document.getElementsByClassName('toggle-password'); @@ -25,8 +24,8 @@ for (let i = 0; i < toggles.length; i++) { const auth_type = document.getElementById('auth_type'); function auth_type_change() { if (auth_type) { - const auth_value = auth_type.value, - password_input = document.getElementById('passwordPlain'); + const auth_value = auth_type.value; + const password_input = document.getElementById('passwordPlain'); if (auth_value === 'form') { password_input.required = true; -- cgit v1.2.3