A lint tool for validating Siren hypermedia documents against the Siren specification (sirenspec.org). Version 0.5.0 is the latest stable release, but the project appears to be in maintenance mode with infrequent updates. It provides both a CLI for piping/reading Siren JSON files and a programmatic API. Key differentiators: focused solely on Siren validation (no generic JSON/HAL/Collection+JSON support), outputs structured error/warning objects with JSON path information. Alternatives include custom Siren validators or generic JSON schema validators.
npm install sirenlintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic validation of a Siren document, iterating over errors and warnings.
Always pass JSON string (e.g., JSON.stringify(yourObject)) to validate().
Check output string for error count or parse the result programmatically; consider using library API for error handling.
Use library API instead of CLI, or fork and replace nomnom with a modern alternative like yargs.
Accept the default validation set or use an alternative validator that supports rule customization.
Use const validate = require('sirenlint'); instead of import.Run npm install sirenlint --save-dev (local) or npm install -g sirenlint (global).
Ensure input is a valid JSON string before calling validate().