Stage M1
This commit is contained in:
@@ -40,9 +40,20 @@ export const nestConfig = [
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['@/modules/*/*', '!@/modules/*/public'],
|
||||
/**
|
||||
* Two things may cross a module boundary and nothing else:
|
||||
*
|
||||
* - `<name>.module` — the NestJS module class, so it can be
|
||||
* listed in another module's `imports`. Wiring the DI graph is
|
||||
* exactly what a modular monolith is supposed to allow.
|
||||
* - `<name>/public` — the curated public surface.
|
||||
*
|
||||
* Everything else — repositories, mappers, DTOs, internal
|
||||
* services — stays private.
|
||||
*/
|
||||
group: ['@/modules/*/*', '!@/modules/*/public', '!@/modules/*/*.module'],
|
||||
message:
|
||||
'Cross-module deep imports are forbidden. Import from `@/modules/<name>/public` instead.',
|
||||
'Cross-module deep imports are forbidden. Import `@/modules/<name>/public` for behaviour, or `@/modules/<name>/<name>.module` to wire it into your module.',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user