Check duplicate function name

In my project, I have 2 different functions with the same function name, is there any tools within the program can check this kind of errors?

If you declare the functions like this:

const myFunc = function () {
  return "some value"; 

you should get

Uncaught SyntaxError: Identifier 'myFunc' has already been declared