1.0.3 β’ Published 3 years ago
eslint-plugin-hexagonal-architecture v1.0.3
π€ What it does
- Enforce conventional folder naming: only
domain,applicationandinfrastructureare valid folder names (under the glob pattern you specify) - Prevent imports from restricted layers:
domaincan only import files from the same folderapplicationcan only import fromapplicationanddomaininfrastructurecan import fromapplication,domainandinfrastructure
π How to use
- Install the dependency
npm install --save-dev eslint-plugin-hexagonal-architecture - Add the plugin to your
.eslintrc.jsfile:{ plugins: ["hexagonal-architecture"], } - Enable the rule for the specific folders that will contain your logic using ESLint's Glob Patterns overrides:
{ overrides: [ { files: ["contexts/{backend,frontend}/*/src/**/*.ts"], rules: { "hexagonal-architecture/enforce": ["error"], }, }, ] }
πΒ Codely Code Quality Standards
Publishing this package we are committing ourselves to the following code quality standards:
- π€ Respect Semantic Versioning: No breaking changes in patch or minor versions
- π€Β No surprises in transitive dependencies: Use the bare minimum dependencies needed to meet the purpose
- π―Β One specific purpose to meet without having to carry a bunch of unnecessary other utilities
- β Β Tests as documentation and usage examples
- π Well documented ReadMe showing how to install and use
- βοΈ License favoring Open Source and collaboration