-
Notifications
You must be signed in to change notification settings - Fork 51
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
[style] Use prettier instead of clang-format #1447
Comments
If contributors agree, I plan to
|
(1) I'm not sure about the thrend site really reflects (2) You can use // clang-format off
... `??` ...
// clang-format on (3) Looks better for me too, but 'better' may be a personal preference. Anyway I'm OK to move to new format and also OK to stay with |
Sure. But I think that's because typescript users only use prettier by npm. When they need linter or formatter, it's more natural to get tools from npm, not from apt-get system-wise installation.
I know this but
Sure, thanks for sharing your opinion 😄 |
Following comment is just my two cents :) Trends
Special grammars for typescript/javascript
Additional references
Conclusion
|
@llFreetimell Thanks for your summary :-D
I agree with this. For example, I used
FYI, eslint is more a linter than a formatter. The usage of those tools are different, eslint only checks the symantic errors/warnings, not style. We do not need to consider about eslint here. :-D (npm trend graph just draws a graph with any inputs) |
Done :-D |
What?
How about we use prettier for this project instead of clang-format?
Why?
There are three reasons
(1) To follow the trend.
![1103-npmtrends](https://user-images.githubusercontent.com/17171963/199672687-2926264b-4385-42e0-8574-0745b3374055.png)
This npm trend graph shows that prettier overwhelms clang-format in npm echo system.
(2) To use null-coalescing operator(
??
)#1445 the operator is not considered correct by clang-format, therefore it breaks it into
? ?
, which makes compilation error.(3) (personally) It looks better.
It seems that prettier understands typescript better and prettify
objects
orarrow functions
much better.The text was updated successfully, but these errors were encountered: