Sheriff vs Rev-dep
Sheriff enforces module boundaries and dependency rules using tags and depRules, and can require barrel-file (index.ts) encapsulation. rev-dep enforces the same boundaries with path patterns and adds the rest of a hygiene suite - but it does not enforce barrel encapsulation.
At a glance​
| Sheriff | Rev-dep | |
|---|---|---|
| Primary focus | module boundaries + encapsulation | dependency hygiene + architecture |
| Runtime | Node / ESLint | Go - single parallel pass (faster) |
| Boundary model | tags + depRules | path patterns (module boundaries) |
| Barrel / public-API encapsulation | yes (index.ts) | partial (deny deep imports) |
| Circular / unused exports / dependencies | no | yes |
Where rev-dep is stronger​
- Broader - boundaries and circular imports, unused exports, orphan files, and unused/missing dependencies.
- Speed and CI-ready exit codes.
Where Sheriff may still fit​
Sheriff's barrel-file encapsulation - requiring a module be imported only through its public index.ts - is something rev-dep can only approximate with restricted imports denyFiles. Its tag-based rules also scale neatly for many similar modules. If strict encapsulation is central to your architecture, keep Sheriff.
Which should you choose?​
- Need enforced public-API/barrel encapsulation and tag-based rules? Sheriff.
- Want path-pattern boundaries plus the rest of a hygiene suite in one fast pass? rev-dep.