Skip to content
This repository has been archived by the owner. It is now read-only.

Adopt Prettier #63

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

Adopt Prettier #63

jasonLaster opened this issue Apr 9, 2019 · 4 comments

Comments

@jasonLaster
Copy link
Contributor

@jasonLaster jasonLaster 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
Copy link
Member

@juliandescottes juliandescottes 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
Copy link
Member

@gregtatum gregtatum 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
Copy link

@zoepage zoepage commented Apr 11, 2019

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

@victorporof
Copy link

@victorporof victorporof 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants