Skip to main content

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​

SheriffRev-dep
Primary focusmodule boundaries + encapsulationdependency hygiene + architecture
RuntimeNode / ESLintGo - single parallel pass (faster)
Boundary modeltags + depRulespath patterns (module boundaries)
Barrel / public-API encapsulationyes (index.ts)partial (deny deep imports)
Circular / unused exports / dependenciesnoyes

Where rev-dep is stronger​

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.

Migrating​

See Migrating from Sheriff.