From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 7E3DA6CE28 for ; Wed, 3 Feb 2021 07:19:06 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6EBD615F3E for ; Wed, 3 Feb 2021 07:19:06 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id C85C015F33 for ; Wed, 3 Feb 2021 07:19:05 +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 98B6D4615F for ; Wed, 3 Feb 2021 07:19:05 +0100 (CET) Message-ID: Date: Wed, 3 Feb 2021 07:18:59 +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 , Aaron Lauterer References: <20210201142131.30024-1-a.lauterer@proxmox.com> <20210201142131.30024-5-a.lauterer@proxmox.com> <4f0cb5f8-b49d-8f68-c4e9-ccf5c1158299@proxmox.com> From: Thomas Lamprecht In-Reply-To: <4f0cb5f8-b49d-8f68-c4e9-ccf5c1158299@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.025 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pve-devel] [PATCH manager 4/7] ui: qemu/HardwareView: eslint: enforce "no-shadow" rule X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2021 06:19:06 -0000 On 02.02.21 14:07, Dominik Csapak wrote: > the=C2=A0global=C2=A0confid=C2=A0variable=C2=A0is=C2=A0only=C2=A0there > so=C2=A0we=C2=A0could=C2=A0reuse=C2=A0the=C2=A0name >=20 > so=C2=A0i'd=C2=A0prefer=C2=A0we=C2=A0remove=C2=A0that > and=C2=A0use=C2=A0'let=C2=A0confid'=C2=A0in=C2=A0the=C2=A0relevant=C2=A0= blocks > (with=C2=A0var=C2=A0this=C2=A0would=C2=A0have=C2=A0failed) +1 It's general also really good to check the variables and transform all to= `let`or `const` where possible. The current code base big use of `var` stems from the pre ES6 time where = neither `let` nor `const` existed. I added a section to our style guide to document that: https://pve.proxmox.com/wiki/Javascript_Style_Guide#Variables