Skip to content

Commit 73079e0

Browse files
style: auto-fix linting issues
1 parent 1bf0e85 commit 73079e0

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/core/link-validator.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,22 +316,26 @@ export class LinkValidator {
316316
}
317317

318318
/**
319-
* Check for circular references - overloaded method that supports both parsed files and file paths.
319+
* Check for circular references - overloaded method that supports both parsed files and file
320+
* paths.
320321
*/
321322
async checkCircularReferences(files: ParsedMarkdownFile[]): Promise<string[][]>;
322323
async checkCircularReferences(files: string[]): Promise<{
323324
hasCircularReferences: boolean;
324325
circularPaths?: string[] | undefined;
325326
}>;
326-
async checkCircularReferences(files: ParsedMarkdownFile[] | string[]): Promise<string[][] | {
327-
hasCircularReferences: boolean;
328-
circularPaths?: string[] | undefined;
329-
}> {
327+
async checkCircularReferences(files: ParsedMarkdownFile[] | string[]): Promise<
328+
| string[][]
329+
| {
330+
hasCircularReferences: boolean;
331+
circularPaths?: string[] | undefined;
332+
}
333+
> {
330334
// Check if we have ParsedMarkdownFile[] (test case) or string[] (normal case)
331335
if (files.length > 0 && typeof files[0] === 'object' && 'filePath' in files[0]) {
332336
// ParsedMarkdownFile[] case - check for circular dependencies
333-
const parsedFiles = files.filter((f): f is ParsedMarkdownFile =>
334-
typeof f === 'object' && f !== null && 'filePath' in f
337+
const parsedFiles = files.filter(
338+
(f): f is ParsedMarkdownFile => typeof f === 'object' && f !== null && 'filePath' in f
335339
);
336340
const visited = new Set<string>();
337341
const recursionStack = new Set<string>();
@@ -354,7 +358,7 @@ export class LinkValidator {
354358
recursionStack.add(filePath);
355359

356360
// Find the file and check its dependencies
357-
const file = parsedFiles.find(f => f.filePath === filePath);
361+
const file = parsedFiles.find((f) => f.filePath === filePath);
358362
if (file && file.dependencies) {
359363
for (const dependency of file.dependencies) {
360364
detectCycle(dependency, [...path, filePath]);

0 commit comments

Comments
 (0)