-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy path.dependency-cruiser.cjs
More file actions
55 lines (55 loc) · 1.17 KB
/
.dependency-cruiser.cjs
File metadata and controls
55 lines (55 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module.exports = {
forbidden: [
{
name: "no-circular",
comment: "Avoid circular dependencies to keep dependency graph maintainable.",
severity: "error",
from: {},
to: {
circular: true,
},
},
{
name: "no-core-to-app",
comment: "Core domain logic must not depend on Next.js app routes or route handlers.",
severity: "error",
from: {
path: "^src/core",
},
to: {
path: "^src/app",
},
},
{
name: "no-core-to-client",
comment: "Core domain logic must not depend on client presentation components or hooks.",
severity: "error",
from: {
path: "^src/core",
},
to: {
path: "^src/client",
},
},
{
name: "no-api-to-client",
comment: "API route handlers must not depend on client presentation modules.",
severity: "error",
from: {
path: "^src/app/api",
},
to: {
path: "^src/client",
},
},
],
options: {
tsConfig: {
fileName: "tsconfig.json",
},
doNotFollow: {
path: "node_modules",
},
includeOnly: "^src|^apps|^crates",
},
};