-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathboundaries.js
69 lines (68 loc) · 1.48 KB
/
boundaries.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
export const boundariesPluginSettings = {
"boundaries/include": ["src/**/*"],
"boundaries/elements": [
{
type: "shared",
mode: "full",
pattern: [
"src/*.ts",
"src/components/**/*",
"src/assets/**/*",
"src/hooks/**/*",
"src/services/**/*",
"src/types/**/*",
"src/utils/**/*",
"src/data/**/*",
],
},
{
type: "entrypoint",
mode: "full",
pattern: ["src/entrypoints/**/*"],
},
{
type: "plugin-core",
mode: "full",
pattern: ["src/plugins/_api/**/*", "src/plugins/_core/**/*"],
},
{
type: "plugin",
mode: "full",
capture: ["pluginName"],
pattern: ["src/plugins/*/**/*"],
},
],
};
export const boundariesRules = {
"boundaries/no-unknown": ["error"],
"boundaries/no-unknown-files": ["error"],
"boundaries/element-types": [
"error",
{
default: "disallow",
rules: [
{
from: "shared",
allow: ["shared", "plugin-core"],
},
{
from: "entrypoint",
allow: ["entrypoint", "shared", "plugin-core", "plugin"],
},
{
from: "plugin-core",
allow: ["shared", "plugin-core", "plugin"],
},
{
from: "plugin",
allow: [
"shared",
"plugin-core",
"plugin",
["plugin", { pluginName: "${from.pluginName}" }],
],
},
],
},
],
};