Info:
Coming Soon - This feature is planned for a future release and is not yet available.
Rules
One-Way Module Dependencies
Modules can import from each other, but only one direction.
// ✅ OK: Module A imports from Module B
import { OrderReadModel } from '@modules/orders/shared';
// ❌ ERROR: Module B also imports from Module A (creates cycle)
import { UserReadModel } from '@modules/users/shared';
Layer Import Restrictions
| From | Can Import |
|---|---|
| BC | Shared only |
| Infrastructure | BC ports, domain, shared |
| Orchestrations | BC ports + use cases, shared |
| Presentation | All inner layers |
// In bounded-contexts/user/
// ❌ ERROR: Cannot import from infrastructure
import { DrizzleUserRepository } from '@infra/repositories';
No implements in Persistence/External
// ❌ ERROR: Only implementations/ can use `implements`
class UserPersistence implements UserRepositoryOutboundPort { ... }
Configuration
eslint.config.js
import { onionLasagnaPlugin } from '@onion-lasagna/eslint-plugin';
export default [
onionLasagnaPlugin.configs.recommended,
];