From d9a67d36dc7f0741838da794f33ec966516aa94e Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Fri, 3 Jun 2022 13:54:25 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/config.ts | 38 ++++++++++++++++++------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index c6a26f096..2b814435c 100644 --- a/packages/astro/src/core/config.ts +++ b/packages/astro/src/core/config.ts @@ -35,25 +35,25 @@ const ASTRO_CONFIG_DEFAULTS: AstroUserConfig & any = { host: false, port: 3000, }, - style: { postcss: { options: {}, plugins: [] }}, + style: { postcss: { options: {}, plugins: [] } }, integrations: [], markdown: { - drafts: false, - syntaxHighlight: 'shiki', - shikiConfig: { - langs: [], - theme: 'github-dark', - wrap: false, - }, - remarkPlugins: [], - rehypePlugins: [], + drafts: false, + syntaxHighlight: 'shiki', + shikiConfig: { + langs: [], + theme: 'github-dark', + wrap: false, }, + remarkPlugins: [], + rehypePlugins: [], + }, vite: {}, experimental: { - ssr: false, - integrations: false, - }, -} + ssr: false, + integrations: false, + }, +}; async function resolvePostcssConfig(inlineOptions: any, root: URL): Promise { if (isObject(inlineOptions)) { @@ -149,7 +149,10 @@ export const AstroConfigSchema = z.object({ // validate z .object({ - host: z.union([z.string(), z.boolean()]).optional().default(ASTRO_CONFIG_DEFAULTS.server.host), + host: z + .union([z.string(), z.boolean()]) + .optional() + .default(ASTRO_CONFIG_DEFAULTS.server.host), port: z.number().optional().default(ASTRO_CONFIG_DEFAULTS.server.port), }) .optional() @@ -307,7 +310,10 @@ export async function validateConfig( // validate z .object({ - host: z.union([z.string(), z.boolean()]).optional().default(ASTRO_CONFIG_DEFAULTS.server.host), + host: z + .union([z.string(), z.boolean()]) + .optional() + .default(ASTRO_CONFIG_DEFAULTS.server.host), port: z.number().optional().default(ASTRO_CONFIG_DEFAULTS.server.port), }) .optional()