A CLI tool to lint YAML files against JSON schemas using the yaml-language-server programmatic API. It validates syntax and schema compliance, loading schemas from a VS Code-style settings file and automatically from schemastore.org. Version 1.1.1 is current, with a release cadence of occasional updates. Key differentiators include: uses the same schema resolution logic as VS Code, supports custom tags, caching of Schema Store catalog, and multiple output formats (GitLab CodeQuality, JSON). Requires Node.js >=20.
npm install yaml-schema-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows both CLI usage and programmatic API with all options.
Use --no-fail-on-warnings to restore previous behavior.
Always quote glob patterns in shell commands.
Use --output-file to generate GitHub Annotations via JSON output and a custom action.
Set --cache-ttl to 0 (or a lower value) to disable caching, or clear the cache directory manually.
Use --no-fail-on-no-files to exit successfully with no matches.
Install yaml-language-server explicitly: npm install yaml-language-server
Add a schema mapping in your .vscode/settings.json under yaml.schemas, or use a modeline comment in the YAML file.
Create a settings file or specify a custom path with --settings-path.
Ensure the file is a JSON object (wrapped in { }), e.g., { "yaml.schemas": {} }.