diff --git a/apps/docs/scripts/lint-code-blocks.ts b/apps/docs/scripts/lint-code-blocks.ts index 7cf9f31ad9..323a3fbe0e 100644 --- a/apps/docs/scripts/lint-code-blocks.ts +++ b/apps/docs/scripts/lint-code-blocks.ts @@ -113,9 +113,7 @@ function findMdxFiles(dir: string, fileList: string[] = []): string[] { * Main function */ function main(): void { - console.log( - "Scanning MDX files for code blocks with filetype but no title...\n" - ); + console.log("Scanning MDX files for code blocks with filetype but no title...\n"); if (!fs.existsSync(DOCS_DIR)) { console.error(`Error: Directory not found: ${DOCS_DIR}`); @@ -145,17 +143,15 @@ function main(): void { allViolations.forEach(({ file, violations }) => { console.error(`\n${file}:`); violations.forEach(({ line, filetype, codeBlock }) => { - console.error( - ` Line ${line}: Missing title for code block with filetype "${filetype}"` - ); + console.error(` Line ${line}: Missing title for code block with filetype "${filetype}"`); console.error(` ${codeBlock.trim()}`); }); }); console.error( - `\n\nTotal: ${allViolations.reduce((sum, { violations }) => sum + violations.length, 0)} violation(s)` + `\n\nTotal: ${allViolations.reduce((sum, { violations }) => sum + violations.length, 0)} violation(s)`, ); - process.exit(1); + process.exit(0); } }