-
Notifications
You must be signed in to change notification settings - Fork 5
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
Integrate dprint to enable no-mixed-operators
in eslint
#489
Conversation
I think it is not necessary to reproduce prettier's behavior if we use dprint. I like default configuration. If possible, I don't want to see any configuration files at all. I like zero config. If we choice dprint, let's use it without any configuration. minimal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use it!
dprint/dprint#413 exists. However I think choosing dprint means to need some config because of the configurable tool direction as we use eslint config. |
Thanks for your approval! |
ref: #866, #869 This configuration is not my preference. It keeps zero configration as possible we can. Because I respect the pankona wish as he said as mobu-of-the-world/mobu#489 (comment). --- Ignore files around gitbook Because some of them are generated by tools. And we may drop gitbook dependency. See #870
FYI: Microsoft is now using dprint for their TypeScript repository microsoft/TypeScript#54820 |
Completely replaced in #1487 |
dprint vs prettier
Both have the strongness. Prettier has strong opinion and huge community, and looks stable behavior in these days.
dprint is pluggable, configurable and super fast ⚡.
Why dprint now?
Because prettier does not provide some options with their opinion.
A most negative to me is prettier/prettier#187.
I strongly agree eslint rule no-mixed-operators.
At least, added parenthesis should not be removed by formatter if it was coder wanted.
However no option exists when using prettier.
It is a blocker to me especially developing around timer logics as #486.
Dprint is frequently developing now. So some style can't be adjusted to prettier does well.
But I 👍 for their decisions and I think it is enough ready to be used.
How
This PR does not perfectly drop prettier, it still used in HTML, CSS and YAML. Dprint runs on TypeScript, JavaScript, JSON, Markdown.
And needed to enable renovate to upgrade their plugins.
Configure
Some choice exists, however I have chosen minimum one.
If you strongly want enable some options, look at https://dprint.dev/config/ and https://dprint.dev/plugins/typescript/.
I can't reproduce 100% prettier behaviors even I have tried with some options in few hours.
Refs
🇯🇵