Skip to content

Commit 0b01e73

Browse files
celicooclaude
andcommitted
fix: Skip externals doc validation when doc files don't exist
The validate-externals-doc.js script was checking if the docs/ directory exists but not if the specific serverExternalPackages.mdx files exist. This caused lint failures in forks that have an empty docs/ directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f83aadb commit 0b01e73

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/validate-externals-doc.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ if (!fs.existsSync(docsDir)) {
1111
}
1212

1313
function validate(docPath) {
14-
const docContent = fs.readFileSync(
15-
path.join(__dirname, '..', docPath),
16-
'utf8'
17-
)
14+
const fullPath = path.join(__dirname, '..', docPath)
15+
16+
// Skip validation if the specific doc file doesn't exist (e.g., in forks without full docs)
17+
if (!fs.existsSync(fullPath)) {
18+
console.log(`doc file not found: ${docPath}, skipping validation`)
19+
return true
20+
}
21+
22+
const docContent = fs.readFileSync(fullPath, 'utf8')
1823

1924
const docPkgs = []
2025
const extraPkgs = []

0 commit comments

Comments
 (0)