Adopt Prettier
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 lintwill begin picking up the regressions and reporting them on try as well.
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 :)
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.
I love prettier and would be in favor, especially as we can lint JS and CSS here.
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 :)