summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Charles Villard <ematipico@users.noreply.github.com> 2023-12-06 12:14:25 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-12-06 12:14:25 +0000
commit58d643bcd8e7ecbef5352d28054669a63b9cfa9e (patch)
tree64690e0769ccabbed6b0cd3a8616cfe2cc45d69c
parentedfae50e6ea494f49c6d4fbf4bd4481870f994b1 (diff)
downloadastro-58d643bcd8e7ecbef5352d28054669a63b9cfa9e.tar.gz
astro-58d643bcd8e7ecbef5352d28054669a63b9cfa9e.tar.zst
astro-58d643bcd8e7ecbef5352d28054669a63b9cfa9e.zip
[ci] format
-rw-r--r--packages/astro-rss/src/index.ts25
1 files changed, 12 insertions, 13 deletions
diff --git a/packages/astro-rss/src/index.ts b/packages/astro-rss/src/index.ts
index 738e696f3..c8cf19d60 100644
--- a/packages/astro-rss/src/index.ts
+++ b/packages/astro-rss/src/index.ts
@@ -109,22 +109,21 @@ async function validateRssOptions(rssOptions: RSSOptions) {
const formattedError = new Error(
[
`[RSS] Invalid or missing options:`,
- ...parsedResult.error.errors.map(
- (zodError) => {
- const path = zodError.path.join('.');
- const message = `${zodError.message} (${path})`;
- const code = zodError.code;
+ ...parsedResult.error.errors.map((zodError) => {
+ const path = zodError.path.join('.');
+ const message = `${zodError.message} (${path})`;
+ const code = zodError.code;
- if (path === 'items' && code === 'invalid_union') {
- return [
- message,
+ if (path === 'items' && code === 'invalid_union') {
+ return [
+ message,
`The \`items\` property requires properly typed \`title\`, \`pubDate\`, and \`link\` keys.`,
- `Check your collection's schema, and visit https://docs.astro.build/en/guides/rss/#generating-items for more info.`
- ].join('\n')
- }
+ `Check your collection's schema, and visit https://docs.astro.build/en/guides/rss/#generating-items for more info.`,
+ ].join('\n');
+ }
- return message;
- }),
+ return message;
+ }),
].join('\n')
);
throw formattedError;