Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev authored and astrobot-houston committed Aug 30, 2022
1 parent 8f8dff4 commit 385a8f0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
8 changes: 4 additions & 4 deletions packages/integrations/mdx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { compile as mdxCompile } from '@mdx-js/mdx';
import mdxPlugin, { Options as MdxRollupPluginOptions } from '@mdx-js/rollup';
import type { AstroIntegration } from 'astro';
import { parse as parseESM } from 'es-module-lexer';
import { blue, bold } from 'kleur/colors';
import { VFile } from 'vfile';
import type { Plugin as VitePlugin } from 'vite';
import { bold, blue } from 'kleur/colors';
import { rehypeApplyFrontmatterExport } from './astro-data-utils.js';
import type { MdxOptions } from './utils.js';
import {
getFileInfo,
parseFrontmatter,
handleExtendsNotSupported,
getRehypePlugins,
getRemarkPlugins,
handleExtendsNotSupported,
parseFrontmatter,
} from './utils.js';
import type { MdxOptions } from './utils.js';

const RAW_CONTENT_ERROR =
'MDX does not support rawContent()! If you need to read the Markdown contents to calculate values (ex. reading time), we suggest injecting frontmatter via remark plugins. Learn more on our docs: https://docs.astro.build/en/guides/integrations-guide/mdx/#inject-frontmatter-via-remark-or-rehype-plugins';
Expand Down
12 changes: 6 additions & 6 deletions packages/integrations/mdx/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type { Options as AcornOpts } from 'acorn';
import type { AstroConfig, SSRError } from 'astro';
import type { MdxjsEsm } from 'mdast-util-mdx';
import { nodeTypes } from '@mdx-js/mdx';
import type { PluggableList } from '@mdx-js/mdx/lib/core.js';
import type { Options as MdxRollupPluginOptions } from '@mdx-js/rollup';
import { bold, yellow } from 'kleur/colors';
import { nodeTypes } from '@mdx-js/mdx';
import type { Options as AcornOpts } from 'acorn';
import { parse } from 'acorn';
import type { AstroConfig, SSRError } from 'astro';
import matter from 'gray-matter';
import { bold, yellow } from 'kleur/colors';
import type { MdxjsEsm } from 'mdast-util-mdx';
import rehypeRaw from 'rehype-raw';
import remarkGfm from 'remark-gfm';
import remarkSmartypants from 'remark-smartypants';
import { remarkInitializeAstroData } from './astro-data-utils.js';
import rehypeCollectHeadings from './rehype-collect-headings.js';
import remarkPrism from './remark-prism.js';
import remarkShiki from './remark-shiki.js';
import matter from 'gray-matter';

export type MdxOptions = {
remarkPlugins?: PluggableList;
Expand Down
12 changes: 3 additions & 9 deletions packages/integrations/mdx/test/mdx-plugins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ describe('MDX plugins', () => {
remarkPlugins: [remarkExamplePlugin],
rehypePlugins: [rehypeExamplePlugin],
},
integrations: [
mdx(),
],
integrations: [mdx()],
});

const html = await fixture.readFile(FILE);
Expand All @@ -61,9 +59,7 @@ describe('MDX plugins', () => {
markdown: {
remarkPlugins: [['remark-toc']],
},
integrations: [
mdx(),
],
integrations: [mdx()],
});

const html = await fixture.readFile(FILE);
Expand All @@ -79,9 +75,7 @@ describe('MDX plugins', () => {
rehypePlugins: [rehypeExamplePlugin],
extendDefaultPlugins: true,
},
integrations: [
mdx(),
],
integrations: [mdx()],
});

const html = await fixture.readFile(FILE);
Expand Down

0 comments on commit 385a8f0

Please sign in to comment.