Convert tsconfig.json to YAML (and back)
A tsconfig.json (JSONC) file converted to YAML. JSONC mode strips // and /* */ comments first; the YAML round-trip then keeps the cleaned config readable.
# context
tsconfig.json is JSON-with-comments (JSONC), which strict JSON parsers reject. Converting it to YAML is rare in production but useful for documentation or audit. Turn on JSONC input mode before converting.
# sample (JSON)
{
"compilerOptions": {
"target": "ES2022",
"module": "esnext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"noEmit": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
} → Open in JSON ↔ YAML converter (pre-filled)
# notes
- Toggle JSONC mode to strip // and /* */ comments from the input before conversion.
- Trailing commas are also handled by JSONC mode.
- tsconfig comments are useful documentation — round-tripping through JSON strips them. Edit the YAML version, then convert back if you want a clean tsconfig.