-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.dependency-cruiser.cjs
More file actions
50 lines (50 loc) · 1.35 KB
/
Copy path.dependency-cruiser.cjs
File metadata and controls
50 lines (50 loc) · 1.35 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
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
{
name: 'no-feature-to-feature',
comment: 'Features should not import from other features',
severity: 'error',
from: { path: '^src/react/features/([^/]+)/' },
to: {
path: '^src/react/features/([^/]+)/',
pathNot: [
'^src/react/features/$1/',
// Exception: home can import openRepository from repository
'^src/react/features/repository/hooks/actions/openRepository\\.ts$'
]
}
},
{
name: 'no-shared-to-features',
comment: 'Shared components cannot import from features',
severity: 'error',
from: { path: '^src/react/shared/' },
to: { path: '^src/react/features/' }
},
{
name: 'no-core-to-features-except-layout',
comment: 'Core can only import features from core/layout (for MainWindow)',
severity: 'error',
from: {
path: '^src/react/core/',
pathNot: '^src/react/core/layout/'
},
to: { path: '^src/react/features/' }
}
],
options: {
doNotFollow: {
path: 'node_modules|generated'
},
tsConfig: {
fileName: 'tsconfig.depcruise.json'
},
tsPreCompilationDeps: true,
reporterOptions: {
dot: {
collapsePattern: 'node_modules/[^/]+'
}
}
}
};