-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Dependency Cruiser as an eslint plugin #529
Comments
Dank voor de vriendelijke woorden @kyranjamie :-) I've indeed investigated implementing an eslint plugin for dependency-cruiser. To understand how eslint plugins work I even wrote a simple one (eslint-plugin-budapestian). It is possible to cover part of dependency-cruiser's (validation) functionality in an eslint plugin, but it will be a bit of an effort. functionally
Other rules seem doable, though. technicallyMaking an eslint plugin for dependency-cruiser rules would involve taking the AST as passed from eslint, pluck out the dependencies (requires, imports, exports, triple slash directives, exotics) and for each of them:
Other things:
|
Interesting topic. I also think that an eslint plugin would be overkill, because eslint checks should be fast.
|
I had a stab at this that you can check out here: https://github.com/pekala/eslint-plugin-dependency-cruiser |
dependency-cruiser
is awesome, it fills a tooling gap I've needed for a long time. Fantastisch werk @sverweij. While I do wish it worked with globs, at least it's a reason to become a regex pro.For the Hiro Wallet, we're using depcruiser pretty extensively.
Nonetheless, it's another tool in our stack, and I'm curious about the viability of this being a eslint plugin. What I'd really like is a github & editor integrations, highlighting forbidden imports, so they can be fixed proactively, rather than reactively when our CI jobs fails. Think: eslint squiggly line under the import at dev-time.
Has this been considered? Are there implementation details that make this infeasible? Could a bridge be made between the two?
The text was updated successfully, but these errors were encountered: