Eunice
Eunice is based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. Eunice's approach isn't limited to direct dependencies, but includes indirect dependencies as well.
With Eunice you can define an intended structure/architecture, it can then show you dependencies that don't match, and then you can further refine the definition or update your code to match it.
try it out in a directory of JavaScript (Flow and TypeScript also supported)
npx eunice
For more information see GitHub.