-
Notifications
You must be signed in to change notification settings - Fork 604
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
Choose a single code formatter #2842
Comments
I would be open to a suggestion of changing the default formatter in I think one of the most fundamental requirements is that the formatter should be able to support both JS and TS. Based on that criteria only |
Honestly, I voted above to switch everything to clang, but want to hear from everyone. @jmdobry @fhinkel @crwilcox @kinwa91 @theacodes @alexander-fenster |
Making sure @stephenplusplus and @callmehiphop get to chime in here as well :) |
One more negative for |
I like Re: Inflexibility, aren't we (Google) the authors of our own |
In theory yes. In practice, most of the folks on this thread (that have a stake in this) are much more likely to contribute changes to a JS/TS project rather than one written in C++. AFAIK, TS support in clang-format is maintained mostly single-handedly (by @mprobst). Things like TSX support, e.g., are probably not high in the priority list for internal Google stuff, but may be important for external users and for docs and samples we provide for Google Cloud. |
There are two things - changing The tricky bit about changing the style is that it's often hard to find a formatting style that is accepted by at least the large majority of users. I personally don't actually care all that much - as long as it's not eye bleeding terrible, I'm happy to have some consistent style that's automatically enforced. But some people care a lot, and The other question is stuff like adding TSX support. I wouldn't actually be opposed to replacing our use of Does that make sense? |
Hi Everybody! A few months ago I was tasked with defining the It's important to remember that As a developer, I expect to be able to fix most lint+format errors both:
For my two cents, the pattern that these Unfortunately, the pattern we use for In addition to these workflow shortcomings, I'd consider any of the following on its own to be a "deal breaker", bad enough that I would strongly advise against any individual or organization adopting
I'm not qualified to weigh the arguments in favor of My recommendation is to adopt for |
ts-style has switched to prettier google/gts#259 |
This is actually complete 🥂 |
Throughout our various repositories, we use a variety of code formatters:
Across TypeScript and JavaScript, samples and libraries, it would be ideal to standardize on a single one. My initial instinct is to use clang-format because it works well enough with
gts
, but I'm just tossing ideas. Thoughts?Please vote your choice 😄
After this has at least 10 folks chiming in, we'll make a call.
The text was updated successfully, but these errors were encountered: