aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexander Niebuhr <Princesseuh@users.noreply.github.com> 2024-07-31 10:18:28 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2024-07-31 10:18:28 +0000
commit2cf770d7594a7df74f9ffb79ac59dbb72ab7c5d4 (patch)
treecb1c7d5832c1da44b2dcc491c338ae4ed3026ca9
parente5e2d3ed3076f10b4645f011b13888d5fa16e92e (diff)
downloadastro-2cf770d7594a7df74f9ffb79ac59dbb72ab7c5d4.tar.gz
astro-2cf770d7594a7df74f9ffb79ac59dbb72ab7c5d4.tar.zst
astro-2cf770d7594a7df74f9ffb79ac59dbb72ab7c5d4.zip
[ci] format
-rw-r--r--packages/astro/src/content/types-generator.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/astro/src/content/types-generator.ts b/packages/astro/src/content/types-generator.ts
index b5f382309..3a646154d 100644
--- a/packages/astro/src/content/types-generator.ts
+++ b/packages/astro/src/content/types-generator.ts
@@ -381,9 +381,7 @@ async function writeContentFiles({
let dataTypesStr = '';
const collectionSchemasDir = new URL('./collections/', settings.dotAstroDir);
- if (
- !fs.existsSync(collectionSchemasDir)
- ) {
+ if (!fs.existsSync(collectionSchemasDir)) {
fs.mkdirSync(collectionSchemasDir, { recursive: true });
}
@@ -424,8 +422,8 @@ async function writeContentFiles({
const resolvedType: 'content' | 'data' =
collection.type === 'unknown'
? // Add empty / unknown collections to the data type map by default
- // This ensures `getCollection('empty-collection')` doesn't raise a type error
- collectionConfig?.type ?? 'data'
+ // This ensures `getCollection('empty-collection')` doesn't raise a type error
+ collectionConfig?.type ?? 'data'
: collection.type;
const collectionEntryKeys = Object.keys(collection.entries).sort();
@@ -478,7 +476,7 @@ async function writeContentFiles({
markdownDescription: true,
errorMessages: true,
// Fix for https://github.com/StefanTerdell/zod-to-json-schema/issues/110
- dateStrategy: ["format:date-time", "format:date", "integer"]
+ dateStrategy: ['format:date-time', 'format:date', 'integer'],
}),
null,
2