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

Adopt Prettier #63

Open
jasonLaster opened this issue Apr 9, 2019 · 4 comments

Comments

Projects
None yet
5 participants
@jasonLaster
Copy link
Contributor

commented Apr 9, 2019

It would be nice to adopt prettier across devtools and perhaps m-c globally.

Benefits

  • it will provide a consistent set of styles for the project that can be overridden can via eslint
  • it will simplify our eslint config
  • it will be like James 🤗never left
  • it helps contributors and code reviews
  • the debugger has been using it for the past two years and it is great
  • it has good editor / vcs integrations
  • When we discussed this in the tuesday node meeting, Dan Mosedale mentioned that he and Mark Banner discussed adding prettier globally to be consistent with C++ clang. Adding prettier for devtools would be a good test case for what prettier across MC would look like.

Process changes

  • We would run prettier once to update the devtools files
  • We would update the devtools eslint config to include the eslint-prettier plugin.
  • At that point, ./mach lint will begin picking up the regressions and reporting them on try as well.
@juliandescottes

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

When we discussed this in the tuesday node meeting, Dan Mosedale mentioned that he and Mark Banner discussed adding prettier globally to be consistent with C++ clang. Adding prettier for devtools would be a good test case for what prettier across MC would look like.

I am totally in favor of enforcing formatting for all our JS. Whether it's prettier or clang (I think some people use clang for js formatting as well?) I don't mind. I would only ask that we don't diverge from the rest of the style used in the JS codebase in mozilla-central. But according to your last edit this is part of a global effort to add formatting everywhere in m-c, so it sounds great :)

@gregtatum

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

Yes please. This has been a huge win for the Firefox Profiler, and simplifies the code review process. I really appreciate the clang format for the C++ side of things in Gecko.

@zoepage

This comment has been minimized.

Copy link

commented Apr 11, 2019

I love prettier and would be in favor, especially as we can lint JS and CSS here.

@victorporof

This comment has been minimized.

Copy link

commented Apr 11, 2019

I've been investigating this a considerable amount the past month or so, and have a lot of data to share here. Some conversations in this document: https://docs.google.com/document/d/1P_Wcb9VwLN8GpvyHq-_2XNcbHWTHhUfu_JYgadS-7vY/edit#heading=h.jrzw5jojmbmk

I'll pop by to chat about it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.