-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: use default value for quotes (double-quotes) #58
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to remind everyone here that
By far the biggest reason for adopting Prettier is to stop all the ongoing debates over styles.
Regardless, we never yet had a debate about this but just used these options for years now. Your arguments make sense, and I actually don't care about the specifics, as long as it is consistent.
So from my side it would be fine to update these values once and follow gofmt as much as possible is a good target.
prettier.config.ts
Outdated
semi: false, | ||
singleQuote: true, | ||
trailingComma: 'none' | ||
trailingComma: "none" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would also be more consistent with go formatting.
trailingComma: "none" | |
trailingComma: "all", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent idea. This also minimizes diffs when adding or removing values from arrays.
Thanks, 100% agree! The larger roadmap towards ending style debates through Prettier is:
|
If you want to release this to npm, just create a release through github. But I guess you already figured that out 😉 |
That would have been my next question! I was assuming something like that from going through the release scripts and Git history but wanted to double-check with you. Thanks for reading my mind! 🙂 |
Before I apply Prettier formatting consistently to all Ory repos (which will change a ton of files), I want to propose to remove the single-quote override for Prettier. Reasons:
I am therefore proposing to remove the
singleQuote: true
override from the Ory-wide Prettier config. I think the benefit of removing pointless edge cases is worth the change. Curious what you think! No hard feelings if anybody sees it differently.