![]() JSX has its own option for quotes: jsxSingleQuote. In case of a tie or the string not containing any quotes, Prettier defaults to double quotes (but that can be changed via the singleQuote option). ![]() "It's gettin' better!", not 'It\'s gettin\' better!'. Please report any code where Prettier fails to follow these correctness rules - that’s a bug which needs to be fixed! Stringsĭouble or single quotes? Prettier chooses the one which results in the fewest number of escapes. The first requirement of Prettier is to output valid code that has the exact same behavior as before formatting. What Prettier is concerned about Correctness This document explains some of its choices. Prettier is an opinionated code formatter.
0 Comments
Leave a Reply. |