Skip to content
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

document prettier integration better #7615

Closed
brlewis opened this issue Aug 30, 2019 · 2 comments · Fixed by #7663
Closed

document prettier integration better #7615

brlewis opened this issue Aug 30, 2019 · 2 comments · Fixed by #7663

Comments

@brlewis
Copy link
Contributor

brlewis commented Aug 30, 2019

Is your proposal related to a problem?

In Formatting Code Automatically the example uses a command-line option to configure prettier to favor single quotes. At the end it directs people to how they might configure their editor. But the editor is going to use prettier defaults, not the command with options that's part of the git hook, so the editor will keep changing to double quotes, making git diff less useful, until changes are committed and it switches back to single quotes.

Describe the solution you'd like

Plan A would be not to include any configuration in the example. This would be most concise and simple. Full disclosure this is partly because I'm personally on a "don't customize anything" kick wanting to just take the defaults on everything wherever possible.

Describe alternatives you've considered

If there's objection to removing the single-quote configuration from the example, plan B would be to add a "prettier" key to the package.json customization in the example. That way the prettier config would be where all integrations could find it.

Additional context

More discussion on prettier defaults

heyimalex added a commit that referenced this issue Sep 5, 2019
Passing options directly to the cli is not great practice, since default editor integrations won't pick it up and many people are just going to copy paste this snippet. This change removes that customization and prettier will use its very sane defaults.

Closes #7615
@brlewis
Copy link
Contributor Author

brlewis commented Sep 6, 2019

Although I can't see any comments on #7646 it looks like plan A got rejected. Any thoughts on plan B? And could someone please add tag: documentation? I don't have the ability to add tags.

@heyimalex
Copy link
Contributor

Oh I just accidentally created the pr as a branch on master when I meant to do it on my own fork, so I closed it and didn't get around to redoing it. If you want you can create the same pr?

@lock lock bot locked and limited conversation to collaborators Sep 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants