Skip to content

Commit da91316

Browse files
committed
ci: Format code
1 parent 789e927 commit da91316

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

codegen/validate-paths.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ function slugify(heading: string): string {
1919
}
2020

2121
function slugFromPath(linkPath: string): string {
22-
return linkPath
23-
.replace(/README\.md$/, '')
24-
.replace(/\.md$/, '')
25-
.replace(/\/$/, '')
26-
.split('/')
27-
.filter(Boolean)
28-
.pop() ?? ''
22+
return (
23+
linkPath
24+
.replace(/README\.md$/, '')
25+
.replace(/\.md$/, '')
26+
.replace(/\/$/, '')
27+
.split('/')
28+
.filter(Boolean)
29+
.pop() ?? ''
30+
)
2931
}
3032

3133
interface PathMismatch {
@@ -115,9 +117,7 @@ for (const section of siteSections) {
115117

116118
const slug = slugFromPath(linkPath)
117119
const parent =
118-
parentStack.length > 0
119-
? parentStack[parentStack.length - 1]
120-
: undefined
120+
parentStack.length > 0 ? parentStack[parentStack.length - 1] : undefined
121121

122122
if (parent != null) {
123123
// The parent's path determines the expected directory prefix.

0 commit comments

Comments
 (0)