0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-17 22:44:24 -05:00

[ci] format

This commit is contained in:
Alexander Niebuhr 2024-07-31 10:18:28 +00:00 committed by astrobot-houston
parent e5e2d3ed30
commit 2cf770d759

View file

@ -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