Skip to main content

good-fences vs Rev-dep

good-fences controls what each area of a TypeScript project can import, using per-directory fence.json files and tags. rev-dep enforces the same boundaries from one central config with path patterns, and adds the rest of a hygiene suite.

At a glance​

good-fencesRev-dep
Primary focusdirectory import boundariesdependency hygiene + architecture
RuntimeNodeGo - single parallel pass (faster)
Boundary modeltags + per-directory fence.jsonpath patterns in one config
Restrict allowed npm deps per areayesyes (restricted imports)
Circular / unused exports / dependenciesnoyes

Where rev-dep is stronger​

Where good-fences may still fit​

Its tag system and co-located fence.json files let each directory own its own boundary rules, which some teams prefer. rev-dep expresses the same intent with central path-pattern module boundaries - simpler to review, but a different mental model (no tags, one file).

Which should you choose?​

  • Prefer per-directory, tag-based ownership of boundaries? good-fences.
  • Want central boundaries plus the rest of a hygiene suite in one fast pass? rev-dep.

Migrating​

See Migrating from good-fences.