Repository navigation
Expand file tree
/
Copy path.dependency-cruiser.cjs
More file actions
72 lines (72 loc) · 2.57 KB
/
Copy path.dependency-cruiser.cjs
File metadata and controls
72 lines (72 loc) · 2.57 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
{
name: 'no-circular',
severity: 'warn',
comment: 'This dependency is part of a circular relationship.',
from: {},
to: {
circular: true
}
},
{
name: 'components-cannot-import-worker',
severity: 'error',
comment: 'UI components must not import the OCCT worker entrypoint directly; they should use the geometryEngine wrapper in shared/worker.',
from: { path: '^src/studio/components' },
to: { path: '^src/kernel/backends/occt/worker\\.ts' }
},
{
name: 'contexts-cannot-import-components',
severity: 'warn',
comment: 'Contexts should not depend on UI components.',
from: { path: '^src/studio/context' },
to: { path: '^src/studio/components' }
},
{
name: 'shared-stays-leaf',
severity: 'error',
comment: 'shared/ may not import from any other layer. Files with cross-layer deps stay outside shared/ until those deps are broken.',
from: { path: '^src/shared/' },
to: { path: '^src/(kernel|modeling|authoring|agent|studio)/' }
},
{
name: 'kernel-stays-pure',
severity: 'error',
comment: 'kernel/ may only import from kernel/ or shared/.',
from: { path: '^src/kernel/' },
to: { path: '^src/(modeling|authoring|agent|studio)/' }
},
{
name: 'modeling-no-upward',
severity: 'error',
comment: 'modeling/ may only import from modeling/, kernel/, or shared/.',
from: { path: '^src/modeling/' },
to: { path: '^src/(authoring|agent|studio)/' }
},
{
name: 'authoring-no-upward',
severity: 'error',
comment: 'authoring/ may only import from authoring/, modeling/, kernel/, or shared/.',
from: { path: '^src/authoring/' },
to: { path: '^src/(agent|studio)/' }
},
{
name: 'agent-no-studio',
severity: 'error',
comment: 'agent/ may not import from studio/.',
from: { path: '^src/agent/' },
to: { path: '^src/studio/' }
}
],
options: {
doNotFollow: {
path: 'node_modules',
},
tsPreCompilationDeps: true,
tsConfig: {
fileName: 'tsconfig.json'
}
}
};