[pve-devel] [PATCH manager 2/2] reduce scope of jslint warnings to the problematic statement

Emmanuel Kasper e.kasper at proxmox.com
Tue Dec 13 10:07:41 CET 2016


also remove it from qemu/Clone.js since it validates OK
---
 www/manager6/lxc/CreateWizard.js  | 8 +++++++-
 www/manager6/qemu/Clone.js        | 1 -
 www/manager6/qemu/CreateWizard.js | 5 +++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index da80f81..8c89648 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -1,7 +1,7 @@
 /*global
   FileReader
 */
-/*jslint confusion: true */
+
 Ext.define('PVE.lxc.CreateWizard', {
     extend: 'PVE.window.Wizard',
 
@@ -55,6 +55,8 @@ Ext.define('PVE.lxc.CreateWizard', {
 	    }
 	});
 
+	/*jslint confusion: true */
+	/* type confusion for 'create' between boolean and function */
 	var rootfspanel = Ext.create('PVE.lxc.MountPointInputPanel', {
 	    title: gettext('Root Disk'),
 	    insideWizard: true,
@@ -69,6 +71,7 @@ Ext.define('PVE.lxc.CreateWizard', {
 	    dataCache: {},
 	    create: true
 	});
+	/*jslint confusion: false */
 
 	var passwordfield = Ext.createWidget('textfield', {
 	    inputType: 'password',
@@ -85,6 +88,8 @@ Ext.define('PVE.lxc.CreateWizard', {
 	    }
 	});
 
+	/*jslint confusion: true */
+	/* the validator function can return either a string or a boolean */
 	me.sshkeyfield = Ext.createWidget('pvetextfield', {
 	    name: 'ssh-public-keys',
 	    value: '',
@@ -153,6 +158,7 @@ Ext.define('PVE.lxc.CreateWizard', {
 	    },
 	    me.sshkeyfield
 	];
+	/*jslint confusion: false */
 
 	if (window.FileReader) {
 	    column2.push({
diff --git a/www/manager6/qemu/Clone.js b/www/manager6/qemu/Clone.js
index 83edc5c..b4790d7 100644
--- a/www/manager6/qemu/Clone.js
+++ b/www/manager6/qemu/Clone.js
@@ -111,7 +111,6 @@ Ext.define('PVE.window.Clone', {
     },
 
     initComponent : function() {
-	/*jslint confusion: true */
 	var me = this;
 
 	if (!me.nodename) {
diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
index 0a1d2c0..19c584e 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -1,5 +1,3 @@
-// fixme: howto avoid jslint type confusion?
-/*jslint confusion: true */
 Ext.define('PVE.qemu.CreateWizard', {
     extend: 'PVE.window.Wizard',
     alias: 'widget.pveQemuCreateWizard',
@@ -27,11 +25,14 @@ Ext.define('PVE.qemu.CreateWizard', {
 	    insideWizard: true
 	});
 
+	/*jslint confusion: true */
+	/* type confusion for 'create' between boolean and function */
 	var hdpanel = Ext.create('PVE.qemu.HDInputPanel', {
 	    title: gettext('Hard Disk'),
 	    create: true,
 	    insideWizard: true
 	});
+	/*jslint confusion: false */
 
 	var networkpanel =  Ext.create('PVE.qemu.NetworkInputPanel', {
 	    title: gettext('Network'),
-- 
2.1.4





More information about the pve-devel mailing list