-
-
Notifications
You must be signed in to change notification settings - Fork 35
style: Prefer single quotes #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Requesting fast-tracking. |
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.
Can we configure Prettier to instead not touch code blocks at all? We may want to use them to describe examples that are explicitly not well formatted. I'd like Prettier to not get in the way.
You can do so in your markdown file by prepending a comment before the code block: https://prettier.io/docs/en/ignore#markdown |
This is about our repo's configuration. I'm with @stasm: can we make it just ignore the code blocks? Switching to single-quotes is great for JS examples---not so much for other languages (which we also quote sometimes) |
There isn't a way to ignore all markdown code blocks, but the link I mention above shows how to skip prettifying specific cases. Including a minimal config (as added here) will also make Prettier use that explicitly, and not e.g. whatever a user has configured as their default in an editor plugin. |
I know you care about this, @eemeli, and that you put effort to configure the bot, but I continue to have doubts about it, and this issue showcases another friction point that I think we could simply not have. I understand using Prettier for code, but in my mind there's less utility for prose, even when written in Markdown. Prose is free-form and sometimes will not look exactly like the linter wants it to look, and that's OK. Humans are good at parsing ambiguous input :) What problems does the bot solve? I browsed through some of its recent commits, and it mostly removes accidental trailing spaces, and converts my bullet points from OTOH, the bot adds noise to the PR, and breaks the flow of pushing to the branch while still working on it via local edits. I now have to stash, push, pull, pop stash, resolve conflicts, for arguably little benefit. And now, as we've seen in #477 (comment), the bot also overwrites an example whose purpose was to use a different style. I can learn to live with this, but I guess I'm going to also be a bit grumpy every time I hit a merge conflict between my pushes. |
I'm with @stasm. This is generating a lot of work/noise/turbulence for not much noticeable benefit. I'm a big believer in standardized formatting, but this tool is consuming a lot of cycles that could better be applied to the many work items we have. If I promise to practice using |
Closing in favour of #491. |
Update our Prettier styles to prefer single quotes, as requested in #477 (comment).