eslint-plugin-ddd-architecture
v1.0.2
Published
<h1 align="center"> π― CarConnect's ESLint Hexagonal Architecture plugin </h1> <p align="center"> A plugin that helps you to enforce hexagonal architecture best practices. Valid for your JavaScript or TypeScript projects π€ </p> π€ What it does
Downloads
9
Readme
Enforce conventional folder naming: only domain, application and infrastructure are valid folder names (under the glob pattern you specify) Prevent imports from restricted layers:
domain can only import files from the same folder application can only import from application and domain infrastructure can import from application, domain and infrastructure
π How to use
- Install the dependency
npm install --save-dev eslint-plugin-hexagonal-architecture
- Add the plugin to your
.eslintrc.js
file:{ 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"], }, }, ] }
π CarConnect 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