Skip to content

Commit 237d782

Browse files
committed
linting
1 parent bb0f1c9 commit 237d782

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

src/components/markdown/Markdown.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ function createMarkdownComponents(
188188

189189
function ImgElement(props: React.ComponentProps<typeof MarkdownImg>) {
190190
const isFirstImage =
191-
options.firstImageSrc !== undefined &&
192-
props.src === options.firstImageSrc
191+
options.firstImageSrc !== undefined && props.src === options.firstImageSrc
193192

194193
return <MarkdownImg {...props} priority={isFirstImage} />
195194
}

tests/blog-hero-image.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ function stripFrontmatter(content: string) {
2020
return match ? content.slice(match[0].length) : content
2121
}
2222

23-
const postFiles = fs
24-
.readdirSync(blogDir)
25-
.filter((file) => file.endsWith('.md'))
23+
const postFiles = fs.readdirSync(blogDir).filter((file) => file.endsWith('.md'))
2624

27-
assert.ok(
28-
postFiles.length > 0,
29-
'expected to find blog posts in src/blog',
30-
)
25+
assert.ok(postFiles.length > 0, 'expected to find blog posts in src/blog')
3126

3227
for (const file of postFiles) {
3328
const raw = fs.readFileSync(path.join(blogDir, file), 'utf-8')

0 commit comments

Comments
 (0)