tools: fix eslint usage for Node.js 8 and before
IDEs like vscode use older Node.js versions that do not yet support the new try catch syntax. This makes sure eslint continues to work in these IDEs as before.
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