{"id":26311,"library":"replicated-lint","title":"replicated-lint","description":"YAML linting tools for Replicated application manifests. Current stable version 0.19.3, released irregularly. Validates Replicated YAML files for common mistakes and best practices. Ships TypeScript types. Supports custom rules via JSON/YAML files and CLI options for threshold, reporters (console, junit), and extra rule sets. Key differentiator: specialized for Replicated application schema rather than generic YAML linting. Provides position-aware results for easy debugging.","status":"active","version":"0.19.3","language":"javascript","source_language":"en","source_url":"https://github.com/replicatedhq/replicated-lint","tags":["javascript","yaml","rules","lint","replicated","studio","typescript"],"install":[{"cmd":"npm install replicated-lint","lang":"bash","label":"npm"},{"cmd":"yarn add replicated-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add replicated-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is CLI-focused, but programmatic API is exported as default.","symbol":"replicatedLint","correct":"import replicatedLint from 'replicated-lint'"},{"note":"Named export for programmatic validation.","symbol":"validate","correct":"import { validate } from 'replicated-lint'"},{"note":"Type-only import for TypeScript.","wrong":"const LintResult = require('replicated-lint').LintResult","symbol":"LintResult","correct":"import type { LintResult } from 'replicated-lint'"}],"quickstart":{"code":"import { validate } from 'replicated-lint';\nimport { readFileSync } from 'fs';\n\nconst yamlContent = readFileSync('my-app.yml', 'utf8');\nconst results = validate(yamlContent, {\n  threshold: 'error',\n  extraRules: [],\n});\n\nif (results.length > 0) {\n  console.log('Lint issues found:');\n  results.forEach(r => console.log(`${r.type}: ${r.message}`));\n} else {\n  console.log('No issues found.');\n}","lang":"typescript","description":"Programmatic validation of a YAML string using the validate function, checking for errors and logging results."},"warnings":[{"fix":"Always call .toString() on file contents before passing.","message":"The validate function expects a string, but will silently coerce Buffer to string if passed.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Use -f or --infile instead of positional file path.","message":"In version 0.12.0, the CLI argument --infile was changed to -f and the positional argument was removed.","severity":"breaking","affected_versions":">=0.12.0"},{"fix":"Replace lint() calls with validate().","message":"The programmatic API function 'lint' is deprecated in favor of 'validate'.","severity":"deprecated","affected_versions":">=0.15.0"},{"fix":"Validate your extra rules file by running it through a YAML parser first.","message":"Custom rule files must be valid YAML/JSON with an array of rule objects, but errors in these files cause silent failure.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Provide absolute paths or paths relative to CWD.","message":"The --extraRules option expects a file path relative to the current working directory, not the input file.","severity":"gotcha","affected_versions":">=0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install replicated-lint' or 'npm install -g replicated-lint' for CLI.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'replicated-lint'"},{"fix":"Use 'import { validate } from 'replicated-lint' instead of default import.","cause":"Importing incorrectly, e.g., using default import when validate is named export.","error":"TypeError: validate is not a function"},{"fix":"Ensure extraRules file contains a YAML/JSON array of rule objects.","cause":"Extra rules file is malformed YAML/JSON or not an array.","error":"Validation failed: unexpected rule format in extraRules file"},{"fix":"Check that the file path exists and is correct.","cause":"File path to --extraRules or --infile is incorrect.","error":"Error: ENOENT: no such file or directory, open '...'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}