Skip to content
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

Merged
merged 12 commits into from
Jul 1, 2022
Merged

Conversation

kachick
Copy link
Member

@kachick kachick commented Jun 30, 2022

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

🇯🇵

@kachick kachick requested review from a team and pankona and removed request for a team June 30, 2022 15:28
@pankona
Copy link
Member

pankona commented Jul 1, 2022

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.

Copy link
Member

@pankona pankona left a 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!

@pankona pankona merged commit 6801e0a into main Jul 1, 2022
@pankona pankona deleted the dprint branch July 1, 2022 07:00
@kachick
Copy link
Member Author

kachick commented Jul 1, 2022

zero config

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.

@kachick
Copy link
Member Author

kachick commented Jul 1, 2022

Thanks for your approval!

kachick added a commit to pankona/hashira that referenced this pull request Jun 21, 2023
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
@kachick
Copy link
Member Author

kachick commented Feb 6, 2024

FYI: Microsoft is now using dprint for their TypeScript repository microsoft/TypeScript#54820

@kachick
Copy link
Member Author

kachick commented Jul 6, 2024

This PR does not perfectly drop prettier, it still used in HTML, CSS and YAML.

Completely replaced in #1487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants