tools: stricter no-undef eslint rule
By default eslint does not validate variables that are placed in a typeof check. This caused a error that is fixed in this PR.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines