Skip to content

Commit c769fa2

Browse files
authored
Make description required without publishing them (#898)
This is to ensure all new features have a description as we're working out the Markdown/HTML details for publishing.
1 parent d45dc53 commit c769fa2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ for (const [key, data] of yamlEntries('feature-group-definitions')) {
100100
data.status.baseline_high_date = String(highDate);
101101
}
102102

103+
// TODO: remove this when description is required by schema.
104+
// Part of https://github.com/web-platform-dx/web-features/pull/761.
105+
if (!data.description) {
106+
throw new Error(`description is missing from ${key}.yml`);
107+
}
108+
103109
// Ensure description is not too long.
104110
if (data.description?.length > descriptionMaxLength) {
105111
throw new Error(`description in ${key}.yml is too long, ${data.description.length} characters. The maximum allowed length is ${descriptionMaxLength}.`)

0 commit comments

Comments
 (0)