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

[Platform RFC] Run prettier --write on merge #17011

Open
GregBrimble opened this issue Sep 23, 2024 · 1 comment
Open

[Platform RFC] Run prettier --write on merge #17011

GregBrimble opened this issue Sep 23, 2024 · 1 comment
Assignees
Labels
DevRel Tasks that need support from developer relations.

Comments

@GregBrimble
Copy link
Member

A couple of assumptions:

  1. When making an edit, starting from a consistently formatted page makes creating that edit easier.
  2. Not everyone is making these changes in an IDE with Prettier installed (e.g. GitHub online directly)
  3. We don't want to block edits which don't conform to formatting rules. We do want to allow them to be made without any additional friction.
  4. We don't love reviewing PRs which come from contributors which have an auto-formatter installed on their IDE, so inadvertently pull in unrelated formatting changes with their PRs.
  5. Consistent formatting is useful to both contributors, and to our readers (esp. for code snippets).

I propose making a (non-trivial) effort to run prettier --write across the codebase, and then, in order to maintain that consistency going forward, run prettier --write again on every merge atop the contributor's content commits. Couple of ways we could technically do this, and I don't really mind about the specifics. Just wanted to start the conversation here about actually trying to uphold some consistency here.

@haleycode haleycode added the DevRel Tasks that need support from developer relations. label Sep 23, 2024
@Cherry
Copy link
Contributor

Cherry commented Sep 23, 2024

Huge +1 to this from me (as per some of my recent PRs), and relates partially to #7798, and pushes way more in that direction.

https://autofix.ci/ is a great modern solution for making this as frictionless as possible for contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevRel Tasks that need support from developer relations.
Projects
None yet
Development

No branches or pull requests

6 participants