Registry / devops / replicated-lint

replicated-lint

JSON →
library0.19.3jsnpmunverified

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.

npm install replicated-lint
INSTALL
IMPORT
SIG · REPLICATED-LINT
R
replicated-lint
devopsjavascriptv0.19.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

replicatedLint
import replicatedLint from 'replicated-lint'
Package is CLI-focused, but programmatic API is exported as default.
validate
import { validate } from 'replicated-lint'
Named export for programmatic validation.
LintResult
import type { LintResult } from 'replicated-lint'
const LintResult = require('replicated-lint').LintResult
Type-only import for TypeScript.

Programmatic validation of a YAML string using the validate function, checking for errors and logging results.

import { validate } from 'replicated-lint'; import { readFileSync } from 'fs'; const yamlContent = readFileSync('my-app.yml', 'utf8'); const results = validate(yamlContent, { threshold: 'error', extraRules: [], }); if (results.length > 0) { console.log('Lint issues found:'); results.forEach(r => console.log(`${r.type}: ${r.message}`)); } else { console.log('No issues found.'); }
replicated-lint --version
Debug
Known issues
gotchaThe validate function expects a string, but will silently coerce Buffer to string if passed.
fix
Always call .toString() on file contents before passing.
affects: >=0.1
breakingIn version 0.12.0, the CLI argument --infile was changed to -f and the positional argument was removed.
fix
Use -f or --infile instead of positional file path.
affects: >=0.12.0
deprecatedThe programmatic API function 'lint' is deprecated in favor of 'validate'.
fix
Replace lint() calls with validate().
affects: >=0.15.0
gotchaCustom rule files must be valid YAML/JSON with an array of rule objects, but errors in these files cause silent failure.
fix
Validate your extra rules file by running it through a YAML parser first.
affects: >=0.1
gotchaThe --extraRules option expects a file path relative to the current working directory, not the input file.
fix
Provide absolute paths or paths relative to CWD.
affects: >=0.1
Errors
Common errors & fixes
Error: Cannot find module 'replicated-lint'
Package not installed or not in node_modules.
fix
Run 'npm install replicated-lint' or 'npm install -g replicated-lint' for CLI.
TypeError: validate is not a function
Importing incorrectly, e.g., using default import when validate is named export.
fix
Use 'import { validate } from 'replicated-lint' instead of default import.
Validation failed: unexpected rule format in extraRules file
Extra rules file is malformed YAML/JSON or not an array.
fix
Ensure extraRules file contains a YAML/JSON array of rule objects.
Error: ENOENT: no such file or directory, open '...'
File path to --extraRules or --infile is incorrect.
fix
Check that the file path exists and is correct.
Upgrade
Version history
0.19.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
replicated-lint — npm install replicated-lint · libregistry