{"id":26672,"library":"yaml-config-lint","title":"YAML Config Lint","description":"This package (v1.0.1) is a CLI tool for linting multiline JSON configuration embedded inside YAML files. It allows you to specify YAML keys containing JSON strings and validates them using jsonlint. The tool is built with oclif and requires Node.js >=12.0.0. It ships TypeScript type declarations. There is no known release cadence; the project appears to be a single-version release. Key differentiators include simple CLI usage with glob support for files and dot-notation for nested keys, making it easy to validate inline JSON in Kubernetes ConfigMaps or similar YAML structures.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/junaidrahim/yaml-config-lint","tags":["javascript","oclif","typescript"],"install":[{"cmd":"npm install yaml-config-lint","lang":"bash","label":"npm"},{"cmd":"yarn add yaml-config-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add yaml-config-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CLI framework used by yaml-config-lint","package":"@oclif/core","optional":false},{"reason":"JSON validation engine used for linting","package":"jsonlint","optional":false}],"imports":[{"note":"If installed globally, use 'ycl'. If not, use npx to run the CLI.","wrong":"ycl -f <file> -k <key>","symbol":"ycl","correct":"npx ycl -f <file> -k <key>"},{"note":"The package is ESM-only (exports from package.json), so CommonJS require will fail.","wrong":"const runYamlConfigLint = require('yaml-config-lint')","symbol":"runYamlConfigLint","correct":"import { runYamlConfigLint } from 'yaml-config-lint'"},{"note":"TypeScript type available for options object.","wrong":null,"symbol":"YamlConfigLintOptions","correct":"import type { YamlConfigLintOptions } from 'yaml-config-lint'"}],"quickstart":{"code":"// Create a sample YAML file with embedded JSON\necho 'data:\n  pokemon: |\n    {\n      \"ability\": {\n        \"name\": \"imposter\",\n        \"url\": \"https://pokeapi.co/api/v2/ability/150/\"\n      },\n      \"is_hidden\": true,\n      \"slot\": 3\n    }' > sample.yaml\n\n// Run the linter\nnpx yaml-config-lint -f sample.yaml -k data.pokemon","lang":"javascript","description":"Shows basic usage: create a YAML file with a JSON string under a nested key, then run the CLI to validate it."},"warnings":[{"fix":"Pin version in package.json if using programmatic API.","message":"The package may have breaking changes in future versions; current version is 1.0.1 with no changelog.","severity":"breaking","affected_versions":"all"},{"fix":"Always provide both --files and --keys options.","message":"The CLI requires both -f and -k flags; missing one will cause a usage error.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a separate YAML linter (e.g., yamllint) for YAML syntax validation.","message":"The package only validates JSON inside YAML, not the YAML structure itself.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Node.js 14 or newer, but verify compatibility.","message":"Node.js 12 is EOL; the engine requirement may cause issues on newer Node versions.","severity":"deprecated","affected_versions":">=12.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Fix the JSON syntax in the YAML file (e.g., missing commas, brackets).","cause":"Invalid JSON inside the YAML value.","error":"Parse error on line 2: {...}"},{"fix":"Add -k <key> to the command, e.g., -k data.pokemon","cause":"Missing the --keys option when running the CLI.","error":"'-k' is required"},{"fix":"Install the package and use ESM import, or run via npx.","cause":"Package not installed or CommonJS require used incorrectly.","error":"Cannot find module 'yaml-config-lint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}