~/json-yaml-converter

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

# other examples