A zero-dependency tool to enforce module boundaries and dependency rules in TypeScript projects.
Sheriff is a lightweight tool that enforces module boundaries and dependency rules in TypeScript projects. It helps teams maintain a clean architecture by ensuring modules only communicate through defined public APIs and preventing unwanted dependencies between different parts of the codebase.
TypeScript developers and teams working on medium to large applications who need to enforce architectural boundaries and prevent dependency sprawl.
Developers choose Sheriff because it operates with zero dependencies, integrates seamlessly with TypeScript and ESLint, and provides both CLI and linting workflows to catch architectural violations early in the development process.
Lightweight Modularity for TypeScript Projects
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Sheriff operates with zero dependencies and only requires TypeScript, ensuring no impact on application performance or bundle size, as stated in the README.
Integrates with ESLint to provide real-time feedback in the IDE, catching architectural violations during development, which improves developer experience.
Supports both automatic and manual tagging of modules, allowing teams to customize dependency rules based on their architecture, as highlighted in the key features.
Offers a CLI for easy setup, rule verification, module listing, and exporting dependency graphs for visualization, making it versatile for different workflows.
Setting up dependency rules and tagging modules can be complex, especially for existing codebases, requiring manual effort to align with Sheriff's conventions.
Sheriff is designed exclusively for TypeScript projects, making it unsuitable for teams using JavaScript or other languages without TypeScript integration.
Compared to established tools like Lerna or Nx, Sheriff has a smaller community and fewer third-party integrations, which might affect long-term support.