pahen / madge

Create graphs from your CommonJS, AMD or ES6 module dependencies
MIT License
9.09k stars 318 forks source link

Feature request: Configurable illegal dependencies #239

Open Havunen opened 4 years ago

Havunen commented 4 years ago

Hey,

We have been using Madge for checking circular dependencies and that is working well! Lately we discovered that we are going to split our code base based on different platforms and I was thinking would it be possible to disallow dependencies based on folder structure?

For example having following main folders all code written in Javascript I would like to make sure there are no dependencies going from iOS to other platform specific folders, but all of them can depend on shared. And shared cannot depend on any of the platforms.

iOs LG Android Web Shared

What do you think is this something madge could do?

pahen commented 4 years ago

Hi,

Sounds like out of the scope for Madge. But it should be possible to build a tool upon Madge that solves your use-case.

vikingair commented 1 year ago

You can also achieve it via this Eslint Plugin.

PabloLION commented 1 year ago

This seems can be achieved by #309 and #202. Marking this as dup.