@contentful/experience-design-system-types 2.41.1-dev-build-d507b86c.0 → 2.41.1-dev-build-ca05819e.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/dist/package.json +1 -1
- package/dist/src/cdf/validate.js +9 -0
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/src/cdf/validate.js
CHANGED
|
@@ -75,6 +75,15 @@ function entryErrors(node, prefix) {
|
|
|
75
75
|
? validateTokenEntry
|
|
76
76
|
: undefined;
|
|
77
77
|
if (!check) {
|
|
78
|
+
// Groups carry no `$type`, so a node that names one the schema does not know is a mistake.
|
|
79
|
+
if (type !== undefined) {
|
|
80
|
+
errors.push({
|
|
81
|
+
path: `${path}/$type`,
|
|
82
|
+
message: `Unknown $type "${String(type)}"`,
|
|
83
|
+
expected: 'component or a design token type',
|
|
84
|
+
actual: String(type),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
78
87
|
errors.push(...entryErrors(value, path));
|
|
79
88
|
}
|
|
80
89
|
else if (!check(value)) {
|