@lernos/validate-guide
v1.0.0
Published
Validation tool for lernOS guide structure and content
Maintainers
Readme
@lernos/validate-guide
Validation tool for lernOS guide structure and content.
Features
- ✅ Validate guide.yaml structure and required fields
- ✅ Check frontmatter in kata and theory files
- ✅ Verify week numbering (sequential 0-N)
- ✅ Validate internal and external links
- ✅ Language completeness checking
- ✅ CI/CD integration with GitHub Actions
- ✅ Human-readable and JSON output
Installation
npm install --save-dev @lernos/validate-guideUsage
CLI
# Validate current directory
npx @lernos/validate-guide
# Validate specific guide
npx @lernos/validate-guide /path/to/guide
# Check external links (slower)
npx @lernos/validate-guide --check-external
# Get JSON output
npx @lernos/validate-guide --json
# Strict mode (warnings as errors)
npx @lernos/validate-guide --strictProgrammatic API
import { validateGuide } from '@lernos/validate-guide';
const result = await validateGuide('/path/to/guide', {
checkExternal: false,
defaultLangOnly: false,
continueOnError: true,
strict: false
});
console.log(result);
// {
// success: false,
// errors: [...],
// warnings: [...],
// info: [...],
// exitCode: 2
// }Documentation
License
MIT
Repository
https://github.com/BjoernSchotte/lernos-validate-guide
