Skip to content

Commit 79a7089

Browse files
committed
ci: Format code
1 parent bf0a93a commit 79a7089

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

codegen/validate-links.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { existsSync, readFileSync, readdirSync } from 'node:fs'
1+
import { existsSync, readdirSync, readFileSync } from 'node:fs'
22
import { dirname, join, resolve } from 'node:path'
33

44
import {
@@ -86,11 +86,7 @@ function checkAbsoluteUrl(file: string, line: number, rawUrl: string): void {
8686
}
8787
}
8888

89-
function checkRelativeLink(
90-
file: string,
91-
line: number,
92-
rawLink: string,
93-
): void {
89+
function checkRelativeLink(file: string, line: number, rawLink: string): void {
9490
// Strip anchor
9591
const linkPath = rawLink.split('#')[0]
9692
if (linkPath == null || linkPath === '') return
@@ -102,10 +98,7 @@ function checkRelativeLink(
10298
const resolved = resolve(fileDir, cleanPath)
10399

104100
// Check if target exists as file, as README.md in directory, or as directory
105-
if (
106-
!existsSync(resolved) &&
107-
!existsSync(join(resolved, 'README.md'))
108-
) {
101+
if (!existsSync(resolved) && !existsSync(join(resolved, 'README.md'))) {
109102
brokenLinks.push({
110103
file,
111104
line,

0 commit comments

Comments
 (0)