[pve-devel] [PATCH manager 4/7] ui: qemu/HardwareView: eslint: enforce "no-shadow" rule
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Feb 3 07:18:59 CET 2021
On 02.02.21 14:07, Dominik Csapak wrote:
> the global confid variable is only there
> so we could reuse the name
>
> so i'd prefer we remove that
> and use 'let confid' in the relevant blocks
> (with var this would have failed)
+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
More information about the pve-devel
mailing list