Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prettier: preserve quotes in object props
In the latest release of Prettier, number keys are "unquoted" by default. This is all fine and well, but Flow reacts poorly to number literals as keys. The most diplomatic solution seems to be setting "quoteProps" to "preserve": https://prettier.io/docs/en/options.html#quote-props However, this precipitated an interesting error in jest, where it was unhappy about the reaction and review state props being unquoted, both in the flow type notation and the object literal itself. I recommend reading the PR that implemented this change for more discussion: prettier/prettier#8508 test plan: `yarn unit`, `yarn flow`, `yarn check-pretty`
- Loading branch information
Showing
2 changed files
with
28 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"bracketSpacing": false, | ||
"arrowParens": "always" | ||
"arrowParens": "always", | ||
"quoteProps": "preserve" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters