You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strings in YAML do not need to be quoted if they don't contain special characters (or numbers which should be parsed as strings).
Prettier already has support for the same thing in JSX using the quoteProps option, it would be great to also have this in YAML!
Reacted by Gary Sassano, Alex Hedges, suin, Andrew Ochsner, Timo Bergmann, Robert U, anteseek, James, Antoine, Jan Potoms and 3 more
I'm also requesting this. I want to follow YAML 1.2.2 specification, which recommends the following:
Whenever applicable use the unquoted style since it is the most readable.
Use the single-quoted style (') if characters such as " and \ are being used inside the string to avoid escaping them and therefore improve readability.
Use the double-quoted style (") when the first two options aren't sufficient, i.e. in scenarios where more complex line breaks are required or non-printable characters are needed.
Activity
garysassano commentedon Apr 30, 2024
I'm also requesting this. I want to follow YAML 1.2.2 specification, which recommends the following:
') if characters such as"and\are being used inside the string to avoid escaping them and therefore improve readability.") when the first two options aren't sufficient, i.e. in scenarios where more complex line breaks are required or non-printable characters are needed.My current configuration in VS Code: