Skip to content

Commit 4bcaf97

Browse files
committed
✨ prettier ✨
1 parent e11d4e4 commit 4bcaf97

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

scripts/build-docs.test.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -137,33 +137,33 @@ Testing with a simple page.`,
137137
})
138138

139139
test('Warning on missing description in frontmatter', async () => {
140-
// Create temp environment with minimal files array
141-
const { tempDir, pathJoin } = await createTempFiles([
142-
{
143-
path: './docs/manifest.json',
144-
content: JSON.stringify({
145-
navigation: [[{ title: 'Simple Test', href: '/docs/simple-test' }]],
146-
}),
147-
},
148-
{
149-
path: './docs/simple-test.mdx',
150-
content: `---
140+
// Create temp environment with minimal files array
141+
const { tempDir, pathJoin } = await createTempFiles([
142+
{
143+
path: './docs/manifest.json',
144+
content: JSON.stringify({
145+
navigation: [[{ title: 'Simple Test', href: '/docs/simple-test' }]],
146+
}),
147+
},
148+
{
149+
path: './docs/simple-test.mdx',
150+
content: `---
151151
title: Simple Test
152152
---
153153
154154
# Simple Test Page
155155
156156
Testing with a simple page.`,
157-
},
158-
])
159-
160-
const output = await build(
161-
createConfig({
162-
...baseConfig,
163-
basePath: tempDir,
164-
validSdks: ['nextjs', 'react'],
165-
}),
166-
)
157+
},
158+
])
159+
160+
const output = await build(
161+
createConfig({
162+
...baseConfig,
163+
basePath: tempDir,
164+
validSdks: ['nextjs', 'react'],
165+
}),
166+
)
167167

168168
expect(output).toContain('warning Frontmatter should have a "description" property')
169169
})

scripts/build-docs.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,10 @@ const parseInMarkdownFile =
552552
// @ts-expect-error - If the heading has a id in it, this will pick it up
553553
// eg # test {{ id: 'my-heading' }}
554554
// This is for remapping the hash to the custom id
555-
const id = node?.children?.find((child) => child?.type === 'mdxTextExpression')?.data?.estree?.body?.find((child) => child?.type === 'ExpressionStatement')?.expression?.properties?.find((prop) => prop?.key?.name === 'id')?.value?.value as
556-
| string
557-
| undefined
555+
const id = node?.children
556+
?.find((child) => child?.type === 'mdxTextExpression')
557+
?.data?.estree?.body?.find((child) => child?.type === 'ExpressionStatement')
558+
?.expression?.properties?.find((prop) => prop?.key?.name === 'id')?.value?.value as string | undefined
558559

559560
if (id !== undefined) {
560561
headingsHashs.push(id)

0 commit comments

Comments
 (0)