[pve-devel] [PATCH manager 2/7] ui: qemu/HardwareView: eslint: enforce "max-len" rule
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Feb 3 08:40:54 CET 2021
On 01.02.21 15:21, Aaron Lauterer wrote:
> Signed-off-by: Aaron Lauterer <a.lauterer at 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';
>
>
More information about the pve-devel
mailing list