test,tools: refactor custom ESLint for readability
Refactor the test and the source for the lowercase-name-for-primitive
custom ESLint rule for readability.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines