forked from castore-dev/castore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependency-cruiser.js
45 lines (45 loc) · 1.15 KB
/
dependency-cruiser.js
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
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
{
name: 'no-circular',
severity: 'error',
comment:
'This dependency is part of a circular relationship. You might want to revise ' +
'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ',
from: { path: 'src' },
to: { circular: true },
},
],
options: {
doNotFollow: {
path: 'node_modules',
dependencyTypes: [
'npm',
'npm-dev',
'npm-optional',
'npm-peer',
'npm-bundled',
'npm-no-pkg',
],
},
moduleSystems: ['amd', 'cjs', 'es6', 'tsd'],
tsPreCompilationDeps: true,
tsConfig: {
fileName: 'tsconfig.json',
},
enhancedResolveOptions: {
exportsFields: ['exports'],
conditionNames: ['import', 'require', 'node', 'default'],
},
reporterOptions: {
dot: {
collapsePattern: 'node_modules/[^/]+',
},
archi: {
collapsePattern:
'^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/[^/]+',
},
},
},
};