all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 6/6] Miscellaneous eslint fixes
Date: Tue, 18 May 2021 14:12:18 +0200	[thread overview]
Message-ID: <20210518121218.125661-7-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20210518121218.125661-1-d.jaeger@proxmox.com>

Function syntax, raw words, string templates, no prototype builtins

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
 www/manager6/lxc/MPResize.js      | 5 -----
 www/manager6/qemu/HDResize.js     | 4 ----
 www/manager6/qemu/OSDefaults.js   | 2 +-
 www/manager6/storage/Base.js      | 2 +-
 www/manager6/storage/ImageView.js | 3 +--
 www/manager6/storage/ZFSEdit.js   | 2 +-
 6 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/www/manager6/lxc/MPResize.js b/www/manager6/lxc/MPResize.js
index f73c5c3f..881c037b 100644
--- a/www/manager6/lxc/MPResize.js
+++ b/www/manager6/lxc/MPResize.js
@@ -91,11 +91,6 @@ Ext.define('PVE.window.MPResize', {
 	    items: [me.formPanel],
 	});
 
-
 	me.callParent();
-
-	if (!me.disk) {
-	    return;
-	}
     },
 });
diff --git a/www/manager6/qemu/HDResize.js b/www/manager6/qemu/HDResize.js
index a18e242c..f9c7290d 100644
--- a/www/manager6/qemu/HDResize.js
+++ b/www/manager6/qemu/HDResize.js
@@ -92,9 +92,5 @@ Ext.define('PVE.window.HDResize', {
 
 
 	me.callParent();
-
-	if (!me.disk) {
-	    return;
-	}
     },
 });
diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js
index 8e585651..f464133e 100644
--- a/www/manager6/qemu/OSDefaults.js
+++ b/www/manager6/qemu/OSDefaults.js
@@ -24,7 +24,7 @@ Ext.define('PVE.qemu.OSDefaults', {
 	var me = this;
 
 	var addOS = function(settings) {
-		if (me.hasOwnProperty(settings.parent)) {
+		if (Object.prototype.hasOwnProperty.call(settings, 'parent')) {
 		    var child = Ext.clone(me[settings.parent]);
 		    me[settings.pveOS] = Ext.apply(child, settings);
 		} else {
diff --git a/www/manager6/storage/Base.js b/www/manager6/storage/Base.js
index 4336d634..20ec3464 100644
--- a/www/manager6/storage/Base.js
+++ b/www/manager6/storage/Base.js
@@ -78,7 +78,7 @@ Ext.define('PVE.panel.StoragePruneInputPanel', {
 	    }
 	    // always delete old 'maxfiles' on edit, we map it to keep-last on window load
 	    return {
-		delete: ['prune-backups', 'maxfiles'],
+		'delete': ['prune-backups', 'maxfiles'],
 	    };
 	}
 	let options = { 'prune-backups': retention };
diff --git a/www/manager6/storage/ImageView.js b/www/manager6/storage/ImageView.js
index dda4b8e6..69517b5e 100644
--- a/www/manager6/storage/ImageView.js
+++ b/www/manager6/storage/ImageView.js
@@ -33,8 +33,7 @@ Ext.define('PVE.storage.ImageView', {
 		text: gettext('Remove'),
 		disabled: true,
 		handler: function(btn, event, rec) {
-		    var url = "/nodes/" + nodename + "/storage/" + storage +
-			      "/content" + '/' + rec.data.volid;
+		    let url = `/nodes/${nodename}/storage/${storage}/content/${rec.data.volid}`;
 		    var vmid = rec.data.vmid;
 
 		    var store = PVE.data.ResourceStore;
diff --git a/www/manager6/storage/ZFSEdit.js b/www/manager6/storage/ZFSEdit.js
index e348d1a1..0c5a3ceb 100644
--- a/www/manager6/storage/ZFSEdit.js
+++ b/www/manager6/storage/ZFSEdit.js
@@ -38,7 +38,7 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	return me.callParent([values]);
     },
 
-    setValues: function diff(values) {
+    setValues: function(values) {
 	values.writecache = values.nowritecache ? 0 : 1;
 	this.callParent([values]);
     },
-- 
2.20.1





  parent reply	other threads:[~2021-05-18 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 12:12 [pve-devel] [PATCH manager 0/6] " Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 1/6] Fix usage of 'me' Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 2/6] No unused or duplicate variables Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 3/6] Functions may not be completely empty Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 4/6] Remove useless escapes Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 5/6] State equalities more precisely Dominic Jäger
2021-05-18 12:12 ` Dominic Jäger [this message]
2021-05-18 13:23 ` [pve-devel] applied-series: [PATCH manager 0/6] eslint fixes Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518121218.125661-7-d.jaeger@proxmox.com \
    --to=d.jaeger@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal