es-tooling / eslint-plugin-depend

An ESLint plugin for suggesting optimisations in choice of dependency, native equivalents, etc.
MIT License
125 stars 4 forks source link

Option to run transitively #21

Open benmccann opened 1 week ago

benmccann commented 1 week ago

I'd rather avoid adding libraries to my projects that transitively pull in huge dependency chains because they rely on libraries like deep-equal or be alerted to libraries that depend on unmaintained libraries so that I can help them address it.

It would also be nice to have an option to apply this only to dependencies or to both dependencies plus devDependencies. I'd most likely to avoid these issues in dependencies so that I don't inadvertently propagate them. But if I can limit them everywhere in at least some of my smaller more important projects that would be quite nice as well.

43081j commented 1 week ago

i wonder if this should live in some kind of CLI that sources from the same module-replacements repo

it'd be quite far from a lint rule anymore since it is effectively linting the tree at that point rather than an individual file (which is what eslint is for)

someone mentioned in the discord a while back something similar, as not all projects have eslint setup. a tool to detect these dependencies in general could be helpful

benmccann commented 1 week ago

A tool would make sense. I'd probably want to set it up on our CI, but we can do that whether it's a CLI or lint rule