title: How can I automatically enforce JavaScript architectural/dependency rules?
body: <p>We are writing a JavaScript application that is becoming large. We have a few architectural rules that we would like to be able to enforce, the main use case would be something like: package A cannot require package B.</p>
  <p>In a Java application, you might use ArchUnit to achieve something similar.</p>
  <blockquote>
  <p>ArchUnit is a free, simple and extensible library for checking the architecture of your Java code using any plain Java unit test framework. That is, ArchUnit can check dependencies between packages and classes, layers and slices, check for cyclic dependencies and more.</p>
  </blockquote>