This commit is contained in:
Nông Đức Huy
2026-08-13 23:20:22 +07:00
parent 3e5d38ec18
commit 3d6b0e0d4e
145 changed files with 7817 additions and 801 deletions
+13 -2
View File
@@ -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.',
},
],
},