From 647079da146d0e4b56e9ea10a7240cc93a271a0d Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 27 Jun 2023 19:08:29 +0000 Subject: [PATCH] [ci] format --- packages/integrations/markdoc/src/config.ts | 4 ++-- packages/integrations/markdoc/src/content-entry-type.ts | 8 ++++---- packages/integrations/markdoc/src/index.ts | 8 ++++---- packages/integrations/markdoc/src/runtime.ts | 8 ++------ 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/packages/integrations/markdoc/src/config.ts b/packages/integrations/markdoc/src/config.ts index 0a2870e23..c62bfebab 100644 --- a/packages/integrations/markdoc/src/config.ts +++ b/packages/integrations/markdoc/src/config.ts @@ -1,3 +1,4 @@ +import { isRelativePath } from '@astrojs/internal-helpers/path'; import type { Config, ConfigType as MarkdocConfig, @@ -5,10 +6,9 @@ import type { NodeType, Schema, } from '@markdoc/markdoc'; -import type { AstroInstance } from 'astro'; import _Markdoc from '@markdoc/markdoc'; +import type { AstroInstance } from 'astro'; import { heading } from './heading-ids.js'; -import { isRelativePath } from '@astrojs/internal-helpers/path'; import { componentConfigSymbol } from './utils.js'; export type Render = ComponentConfig | AstroInstance['default'] | string; diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts index 1997a0a2f..097c5cfae 100644 --- a/packages/integrations/markdoc/src/content-entry-type.ts +++ b/packages/integrations/markdoc/src/content-entry-type.ts @@ -1,19 +1,19 @@ /* eslint-disable no-console */ import type { Config as MarkdocConfig, Node } from '@markdoc/markdoc'; -import type { ErrorPayload as ViteErrorPayload } from 'vite'; -import matter from 'gray-matter'; import Markdoc from '@markdoc/markdoc'; import type { AstroConfig, ContentEntryType } from 'astro'; +import matter from 'gray-matter'; import fs from 'node:fs'; import { fileURLToPath } from 'node:url'; -import { isValidUrl, MarkdocError, prependForwardSlash, isComponentConfig } from './utils.js'; +import type { ErrorPayload as ViteErrorPayload } from 'vite'; import type { ComponentConfig } from './config.js'; +import { isComponentConfig, isValidUrl, MarkdocError, prependForwardSlash } from './utils.js'; // @ts-expect-error Cannot find module 'astro/assets' or its corresponding type declarations. import { emitESMImage } from 'astro/assets'; import path from 'node:path'; import type * as rollup from 'rollup'; -import { setupConfig } from './runtime.js'; import type { MarkdocConfigResult } from './load-config.js'; +import { setupConfig } from './runtime.js'; export async function getContentEntryType({ markdocConfigResult, diff --git a/packages/integrations/markdoc/src/index.ts b/packages/integrations/markdoc/src/index.ts index cafc76be5..60dd01843 100644 --- a/packages/integrations/markdoc/src/index.ts +++ b/packages/integrations/markdoc/src/index.ts @@ -1,14 +1,14 @@ /* eslint-disable no-console */ -import type { AstroIntegration, ContentEntryType, HookParameters, AstroConfig } from 'astro'; -import { fileURLToPath } from 'node:url'; +import type { AstroConfig, AstroIntegration, ContentEntryType, HookParameters } from 'astro'; import { bold, red } from 'kleur/colors'; +import { fileURLToPath } from 'node:url'; import { normalizePath } from 'vite'; +import { getContentEntryType } from './content-entry-type.js'; import { loadMarkdocConfig, - type MarkdocConfigResult, SUPPORTED_MARKDOC_CONFIG_FILES, + type MarkdocConfigResult, } from './load-config.js'; -import { getContentEntryType } from './content-entry-type.js'; type SetupHookParams = HookParameters<'astro:config:setup'> & { // `contentEntryType` is not a public API diff --git a/packages/integrations/markdoc/src/runtime.ts b/packages/integrations/markdoc/src/runtime.ts index d710f1bd8..05f7a0c1d 100644 --- a/packages/integrations/markdoc/src/runtime.ts +++ b/packages/integrations/markdoc/src/runtime.ts @@ -1,16 +1,12 @@ import type { MarkdownHeading } from '@astrojs/markdown-remark'; -import type { AstroInstance } from 'astro'; -import { - createComponent, - renderComponent, - // @ts-expect-error Cannot find module 'astro/runtime/server/index.js' or its corresponding type declarations. -} from 'astro/runtime/server/index.js'; import Markdoc, { type ConfigType, type Node, type NodeType, type RenderableTreeNode, } from '@markdoc/markdoc'; +import type { AstroInstance } from 'astro'; +import { createComponent, renderComponent } from 'astro/runtime/server/index.js'; import type { AstroMarkdocConfig } from './config.js'; import { setupHeadingConfig } from './heading-ids.js';