pickety 0.2.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscodeignore +6 -1
- package/README.md +35 -5
- package/out/cli.js +18 -17
- package/out/extension.js +24 -21
- package/package.json +3 -2
- package/resources/pickety.schema.json +101 -10
|
@@ -6,11 +6,23 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"version": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "Configuration schema version.
|
|
9
|
+
"description": "Configuration schema version. Latest is 0.3.0.",
|
|
10
10
|
"enum": [
|
|
11
|
-
"0.1.0"
|
|
11
|
+
"0.1.0",
|
|
12
|
+
"0.2.0",
|
|
13
|
+
"0.3.0"
|
|
12
14
|
],
|
|
13
|
-
"default": "0.
|
|
15
|
+
"default": "0.3.0"
|
|
16
|
+
},
|
|
17
|
+
"preset": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": [
|
|
20
|
+
"hexagonal",
|
|
21
|
+
"feature-modules",
|
|
22
|
+
"layered"
|
|
23
|
+
],
|
|
24
|
+
"description": "Apply a built-in architecture preset and merge with overrides.",
|
|
25
|
+
"markdownDescription": "Apply a built-in architecture preset and merge with overrides.\n\nWhen set, Pickety loads the preset configuration and merges any modules or rules defined in this file on top of it."
|
|
14
26
|
},
|
|
15
27
|
"modules": {
|
|
16
28
|
"type": "object",
|
|
@@ -53,9 +65,21 @@
|
|
|
53
65
|
"markdownDescription": "Source module name or glob pattern.\n\nSupports `$variable` interpolation to match importer subdirectories with target subdirectories."
|
|
54
66
|
},
|
|
55
67
|
"imports": {
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
"oneOf": [
|
|
69
|
+
{
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Target module name, glob, or relative path pattern.",
|
|
72
|
+
"markdownDescription": "Target module name, glob, or relative path pattern.\n\nSupports `$variable` interpolation."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"description": "List of target module names or glob patterns. Any match triggers the rule.",
|
|
80
|
+
"markdownDescription": "List of target module names or glob patterns. Any match triggers the rule.\n\nSupports `$variable` interpolation per entry."
|
|
81
|
+
}
|
|
82
|
+
]
|
|
59
83
|
},
|
|
60
84
|
"allow": {
|
|
61
85
|
"type": "boolean",
|
|
@@ -95,6 +119,21 @@
|
|
|
95
119
|
}
|
|
96
120
|
]
|
|
97
121
|
},
|
|
122
|
+
"exports": {
|
|
123
|
+
"description": "Allowlist exceptions for containedTo/only rules.",
|
|
124
|
+
"markdownDescription": "Allowlist exceptions for containedTo/only rules. Each entry declares a path pattern to export and the module/path that may import it.",
|
|
125
|
+
"oneOf": [
|
|
126
|
+
{
|
|
127
|
+
"$ref": "#/definitions/exportRule"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"$ref": "#/definitions/exportRule"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
98
137
|
"message": {
|
|
99
138
|
"type": "string",
|
|
100
139
|
"description": "Custom error message shown in the editor."
|
|
@@ -111,6 +150,10 @@
|
|
|
111
150
|
"type": "string",
|
|
112
151
|
"description": "Unique identifier for the rule. Used in diagnostics and 'Go to Rule' navigation."
|
|
113
152
|
},
|
|
153
|
+
"group": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "Optional group label for diagnostics and CLI summaries."
|
|
156
|
+
},
|
|
114
157
|
"maxViolations": {
|
|
115
158
|
"type": "integer",
|
|
116
159
|
"minimum": 0,
|
|
@@ -130,6 +173,20 @@
|
|
|
130
173
|
"module-boundaries"
|
|
131
174
|
]
|
|
132
175
|
},
|
|
176
|
+
"warnOnUntrackedImporters": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"default": true,
|
|
179
|
+
"description": "Emit an info diagnostic when a file does not match any declared module.",
|
|
180
|
+
"markdownDescription": "Emit an **info** diagnostic when a file does not match any declared module. These files bypass all import rules.\n\n- `true` (default): warn when a file is outside declared modules.\n- `false`: silence this diagnostic."
|
|
181
|
+
},
|
|
182
|
+
"ignore": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"description": "Glob patterns for files/directories to exclude from analysis.",
|
|
185
|
+
"markdownDescription": "Glob patterns for files/directories to exclude from analysis.\n\nExamples:\n```json\n\"ignore\": [\n \"tests/**\",\n \"**/*.spec.ts\"\n]\n```",
|
|
186
|
+
"items": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
133
190
|
"boundary-diagrams": {
|
|
134
191
|
"oneOf": [
|
|
135
192
|
{
|
|
@@ -176,8 +233,42 @@
|
|
|
176
233
|
"additionalProperties": false
|
|
177
234
|
}
|
|
178
235
|
},
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
|
|
236
|
+
"definitions": {
|
|
237
|
+
"exportRule": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"required": [
|
|
240
|
+
"path",
|
|
241
|
+
"to"
|
|
242
|
+
],
|
|
243
|
+
"properties": {
|
|
244
|
+
"path": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Path pattern to export from the target module.",
|
|
247
|
+
"markdownDescription": "Path pattern to export from the target module. Supports `$variable` interpolation."
|
|
248
|
+
},
|
|
249
|
+
"to": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Module name or path pattern allowed to import the export.",
|
|
252
|
+
"markdownDescription": "Module name or path pattern allowed to import the export. Supports `$variable` interpolation."
|
|
253
|
+
},
|
|
254
|
+
"message": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "Optional note for documentation; currently not surfaced in diagnostics."
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"anyOf": [
|
|
262
|
+
{
|
|
263
|
+
"required": [
|
|
264
|
+
"modules",
|
|
265
|
+
"rules"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"required": [
|
|
270
|
+
"preset"
|
|
271
|
+
]
|
|
272
|
+
}
|
|
182
273
|
]
|
|
183
|
-
}
|
|
274
|
+
}
|