From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 3BFD86CE99
 for <pve-devel@lists.proxmox.com>; Wed,  3 Feb 2021 08:41:01 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 33A9C1778C
 for <pve-devel@lists.proxmox.com>; Wed,  3 Feb 2021 08:41:01 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id BBCB31777F
 for <pve-devel@lists.proxmox.com>; Wed,  3 Feb 2021 08:41:00 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8409B45DDF
 for <pve-devel@lists.proxmox.com>; Wed,  3 Feb 2021 08:41:00 +0100 (CET)
Message-ID: <391d702f-766b-0c5d-c9e1-b7d3fab6dca4@proxmox.com>
Date: Wed, 3 Feb 2021 08:40:54 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101
 Thunderbird/86.0
Content-Language: en-US
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Aaron Lauterer <a.lauterer@proxmox.com>
References: <20210201142131.30024-1-a.lauterer@proxmox.com>
 <20210201142131.30024-3-a.lauterer@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <20210201142131.30024-3-a.lauterer@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.026 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.178 Looks like a legit reply (A)
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] [PATCH manager 2/7] ui: qemu/HardwareView: eslint:
 enforce "max-len" rule
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 03 Feb 2021 07:41:01 -0000

On 01.02.21 15:21, Aaron Lauterer wrote:
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  www/manager6/qemu/HardwareView.js | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
> index 51c77246..fa72d9d3 100644
> --- a/www/manager6/qemu/HardwareView.js
> +++ b/www/manager6/qemu/HardwareView.js
> @@ -593,7 +593,9 @@ Ext.define('PVE.qemu.HardwareView', {
>  
>  	    var isEfi = key === 'efidisk0';
>  
> -	    remove_btn.setDisabled(rec.data.delete || rowdef.never_delete === true || (isUnusedDisk && !diskCap));
> +	    remove_btn.setDisabled(rec.data.delete ||
> +				   rowdef.never_delete === true ||
> +				   (isUnusedDisk && !diskCap));

If a method call is split over multiple lines the first line should only
be the method itself.

As we have an expression here, not really multiple parameters, either of the
following two would be fine:

remove_btn.setDisabled(
    rec.data.delete || rowdef.never_delete === true || (isUnusedDisk && !diskCap)
);

or:

remove_btn.setDisabled(
    rec.data.delete ||
    rowdef.never_delete === true ||
    (isUnusedDisk && !diskCap)
);


>  	    remove_btn.setText(isUsedDisk && !isCloudInit ? remove_btn.altText : remove_btn.defaultText);
>  	    remove_btn.RESTMethod = isUnusedDisk ? 'POST':'PUT';
>  
>