Files
test-repo/changelog_unreleased/json/10323.md
T

504 B

Don't use smart quotes for JSON5 with --quote-props=preserve (#10323 by @thorn0)

With the quoteProps option set to preserve and singleQuotes to false (default), double quotes are always used for printing strings, including situations like "bla\"bla". This effectively allows using --parser json5 for "JSON with comments and trailing commas".

// Input
{
  "char": "\"",
}

// Prettier stable
{
  "char": '"',
}

// Prettier main
{
  "char": "\"",
}