Is there a library/automated approach to enforce the directions of imports/exports?

In Elixir I love to use the library GitHub - sasa1977/boundary: Manage and restrain cross-module dependencies in Elixir projects to enforce boundaries between modules and keep “areas” (aka boundaries) from reaching into the guts of another area.

Does anyone know of any similar library or approach for frontend typescript code? I’ve been having trouble searching because I don’t know of a good name for this type of library and I’m not familiar with any besides Boundary.

2 Likes

Corresponding tweet for this thread:

Share link for this tweet.

2 Likes

Found one library that looks promising: GitHub - sverweij/dependency-cruiser: Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.

2 Likes