-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathkonsistent.json
More file actions
84 lines (84 loc) · 2.53 KB
/
Copy pathkonsistent.json
File metadata and controls
84 lines (84 loc) · 2.53 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
73
74
75
76
77
78
79
80
81
82
83
84
{
"$schema": "node_modules/konsistent/konsistent.schema.json",
"version": "v1",
"conventions": [
{
"name": "game-modules",
"description": "Every server game module exports a <id>Module GameModule and wires into ../types.js",
"paths": "packages/sfu/server/games/modules/{gameId}.ts",
"must": {
"haveType": "file",
"exportConstants": ["${gameId}Module"],
"importFrom": "../types.js"
}
},
{
"name": "game-module-move-union",
"description": "Every game module exports a typed move union named <Id>Move",
"paths": "packages/sfu/server/games/modules/{gameId}.ts",
"must": {
"exportTypes": ["${gameId.toPascalCase()}Move"]
}
},
{
"name": "game-modules-are-pure",
"description": "Game modules except chess are pure reducers: no runtime imports outside the games runtime",
"paths": [
"packages/sfu/server/games/modules/{gameId}.ts",
"!packages/sfu/server/games/modules/chess.ts"
],
"must": {
"importFromExternals": false
}
},
{
"name": "game-renderers",
"description": "Every web game renderer default-exports its component",
"paths": "apps/web/src/app/components/games/{gameName}Game.tsx",
"must": {
"export": ["default"]
}
},
{
"name": "hooks-named-after-file",
"description": "Every hook file exports a hook named after the file",
"paths": [
"apps/web/src/app/hooks/{hookName}.ts",
"apps/web/src/app/hooks/{hookName}.tsx"
],
"must": {
"export": ["${hookName}"]
}
},
{
"name": "components-default-export",
"description": "Single-component files default-export their component; multi-component kits are negated exceptions",
"paths": [
"apps/web/src/app/components/{componentName}.tsx",
"!apps/web/src/app/components/DeviceCaretMenu.tsx",
"!apps/web/src/app/components/GhostParticipantChrome.tsx"
],
"must": {
"export": ["default"]
}
},
{
"name": "package-manifest",
"description": "Every workspace package has a package.json",
"paths": "packages/{pkgName}",
"must": {
"haveType": "directory",
"haveFiles": ["package.json"]
}
},
{
"name": "package-readme",
"description": "Every workspace package has a README.md",
"paths": "packages/{pkgName}",
"must": {
"haveType": "directory",
"haveFiles": ["README.md"]
}
}
]
}