{"id":26140,"library":"ramllint","title":"ramllint","description":"A static analysis linter for RAML API specifications, enforcing style and consistency rules across API documentation. Version 1.2.6 is the latest stable release, built for Node.js >=0.12.3. It provides both a library and CLI interface to validate RAML files against configurable rules for URLs, naming conventions, and structure. Unlike generic YAML validators, ramllint focuses on RAML-specific patterns and integrates with CI pipelines. The package appears to be in maintenance mode with no recent updates.","status":"maintenance","version":"1.2.6","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/QuickenLoans/ramllint","tags":["javascript"],"install":[{"cmd":"npm install ramllint","lang":"bash","label":"npm"},{"cmd":"yarn add ramllint","lang":"bash","label":"yarn"},{"cmd":"pnpm add ramllint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package uses CommonJS; ESM imports are not supported. The module exports a constructor function.","wrong":"import Linter from 'ramllint';","symbol":"Linter","correct":"var Linter = require('ramllint');"},{"note":"The required value is the constructor itself, not a namespace.","wrong":"const ramllint = new ramllint.Linter();","symbol":"Linter","correct":"const ramllint = new Linter();"},{"note":"Linter must be instantiated with `new`. There is no `create` method.","wrong":"const linter = require('ramllint').create();","symbol":"Linter","correct":"const Linter = require('ramllint'); const linter = new Linter(options);"}],"quickstart":{"code":"var Linter = require('ramllint');\nvar linter = new Linter();\nlinter.lint('./api.raml', function (results) {\n  if (results.length === 0) {\n    console.log('No errors found.');\n  } else {\n    console.log('Errors:', results);\n  }\n});","lang":"javascript","description":"Shows how to instantiate the linter and lint a RAML file with the callback API."},"warnings":[{"fix":"Use `linter.results()` to get all log entries after calling `lint`.","message":"The `lint` callback only returns `error` level results; warning and info entries are excluded.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always instantiate with `new Linter()`.","message":"The `require('ramllint')` returns the Linter constructor, not an instance. Forgetting `new` will cause errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `new Linter()` instead of `Linter()`.","cause":"Calling `Linter()` without `new` in ES6 classes (but the package uses ES5 function constructor; still requires `new`).","error":"TypeError: Class constructor Linter cannot be invoked without 'new'"},{"fix":"Run `npm install ramllint --save` or `npm install -g ramllint`.","cause":"Package not installed or global install not resolved.","error":"Error: Cannot find module 'ramllint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}