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

docs(ja): update Formatter in japanese #1076

Merged
merged 24 commits into from
Dec 13, 2023

Conversation

chansuke
Copy link
Member

@chansuke chansuke commented Dec 6, 2023

Summary

Fixes part of updated tasks

Test Plan

@chansuke chansuke requested a review from a team as a code owner December 6, 2023 07:08
Copy link

netlify bot commented Dec 6, 2023

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit f358986
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/6579ab3fe18efa0008301afb
😎 Deploy Preview https://deploy-preview-1076--biomejs.netlify.app/ja/formatter/differences-with-prettier
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the A-Website Area: website label Dec 6, 2023
@chansuke chansuke force-pushed the docs/update-formatter branch 4 times, most recently from db7bf92 to d056c2e Compare December 6, 2023 13:43
@unvalley
Copy link
Member

unvalley commented Dec 7, 2023

@chansuke Thank you for your work. We split the formatter page to three at #1098 . Could you update for this?

@chansuke chansuke force-pushed the docs/update-formatter branch 3 times, most recently from 1cac082 to 0e72d60 Compare December 8, 2023 11:21
@@ -8,7 +8,7 @@ import PackageManagerBiomeCommand from "@src/components/PackageManagerBiomeComma
Biomeは、スタイル関する議論に終止符を打つことを目的とした「opinionated」なformatterです。
[Prettierと近い哲学](https://prettier.io/docs/en/option-philosophy.html)を持ち、
スタイルに関する議論がBiomeのオプションに関する議論に発展するのを避けるために、いくつかのオプションのみをサポートしています。
チーム内での[本質的でない議論](https://ja.wikipedia.org/wiki/パーキンソンの凡俗法則)を防ぎ、本当に重要なことに集中できるようにするために、[新しいオプションを意図的に追加しない](https://github.com/prettier/prettier/issues/40)ようにしています。
チーム内での[些細な議論](https://ja.wikipedia.org/wiki/パーキンソンの凡俗法則)を防ぎ、本当に重要なことに集中できるようにするために、[新しいオプションを意図的に追加しない](https://github.com/prettier/prettier/issues/40)ようにしています。
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

些細な議論 is meaningful and suitable than 自転車置き場の議論 IMHO

@chansuke
Copy link
Member Author

chansuke commented Dec 8, 2023

@unvalley
Thank you so much for your comment. I've separated and also added option-philosophy translation.

Copy link
Contributor

@nissy-dev nissy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed except differences-with-prettier.md and left some comments.

description: 独断的なフォーマッターを設定する
---

>💡 Biomeは、[Prettierのオプション哲学](https://prettier.io/docs/en/option-philosophy)と同様のアプローチを採用しています。formatに関する既存のオプションセットは安定しており、新しいオプションは考慮される可能性が低いです。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>💡 Biomeは、[Prettierのオプション哲学](https://prettier.io/docs/en/option-philosophy)と同様のアプローチを採用しています。formatに関する既存のオプションセットは安定しており、新しいオプションは考慮される可能性が低いです
>💡 Biomeは、[Prettierのオプションに対する考え方](https://prettier.io/docs/en/option-philosophy)と同様のアプローチを採用しています。formatに関する既存のオプションセットは安定しており、新しいオプションが検討される可能性は低いです

@@ -0,0 +1,40 @@
---
title: Formatter Option Philosophy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Formatter Option Philosophy
title: Formatter オプションに対する考え方


## 言語ごとの設定

他のツールと違って、Biomeは、言語に属するオプションをその設定とは別の場所に配置します。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
他のツールと違って、Biomeは、言語に属するオプションをその設定とは別の場所に配置します
他のツールと違って、Biomeは言語ごとに関するオプションを設定することができます


>💡 Biomeは、[Prettierのオプション哲学](https://prettier.io/docs/en/option-philosophy)と同様のアプローチを採用しています。formatに関する既存のオプションセットは安定しており、新しいオプションは考慮される可能性が低いです。
>
>この文書では、Biomeがどのようにして今日の位置に到達したか、その歴史と今後の展望について説明しています。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>この文書では、Biomeがどのようにして今日の位置に到達したか、その歴史と今後の展望について説明しています。
>この文書では、Biomeがどのようにして今日の考え方に至ったのか、その歴史と今後の展望について説明しています。

>
>この文書では、Biomeがどのようにして今日の位置に到達したか、その歴史と今後の展望について説明しています。

Biomeは*独断的なフォーマッター*です。理想では、Biomeは正しいformat方法が1つだけ存在し、そのスタイルを常に強制すると考えています。プロジェクトに関係なく、セットアップに関係なく、Biomeによってformatされたコードは常に同じように見えるでしょう。別の視点から見ると、Biomeは*自動スタイルガイド*であり、他のスタイルガイドを実装するためのツールではありません。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Biomeは*独断的なフォーマッター*です。理想では、Biomeは正しいformat方法が1つだけ存在し、そのスタイルを常に強制すると考えています。プロジェクトに関係なく、セットアップに関係なく、Biomeによってformatされたコードは常に同じように見えるでしょう。別の視点から見ると、Biomeは*自動スタイルガイド*であり、他のスタイルガイドを実装するためのツールではありません。
Biomeは*「opinionated」なフォーマッター*です。理想的には、コードをformatする正しい方法は 1 つしかないと想定し、常にそのスタイルを強制することを意味します。プロジェクトに関係なく、セットアップに関係なく、Biomeによってformatされたコードは常に同じように見えるでしょう。別の視点から見ると、Biomeは独自の*自動スタイルガイド*であり、他のスタイルガイドを実装するためのツールではありません。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I' ve updated 「opinionated」なフォーマッター to 「opinionated」なformatter because of the textlint error


[Prettierのオプション哲学](https://twitter.com/Vjeux/status/1722733472522142022)に基づき、Biomeは新たなスタートを切るチャンスがあり、Prettierが `--bracket-same-line` や `--arrow-parens` などの既存のオプションで陥った落とし穴を避けることができました:

> ...[これら]は私たちが持っていることを望んでいるタイプのオプションではありません。チーム内で多くの議論を引き起こし、そのために申し訳ありません。今では削除するのが難しいため、これらのオプションは歴史的な遺物として存在し、他のオプションを追加するための動機付けにはなりません(「これらのオプションが存在するなら、なぜこのオプションはダメなのか?」)。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> ...[これら]は私たちが持っていることを望んでいるタイプのオプションではありません。チーム内で多くの議論を引き起こし、そのために申し訳ありません。今では削除するのが難しいため、これらのオプションは歴史的な遺物として存在し、他のオプションを追加するための動機付けにはなりません(「これらのオプションが存在するなら、なぜこのオプションはダメなのか?」)。
> ...これらのオプションについては、私たちは保持していることを望んでいません。チーム内で多くの議論を引き起こしており、それを申し訳なく思っています。今では削除するのが難しいため、これらのオプションは歴史的な成果物として存在しており、他のオプションを追加するための動機付けにはなりません(「これらのオプションが存在するなら、なぜこのオプションはダメなのか?」といったような)。

website/src/content/docs/ja/formatter/option-philosophy.md Outdated Show resolved Hide resolved

いずれにせよ、[Prettier Challengeが発表](https://twitter.com/Vjeux/status/1722733472522142022)された際、Biomeはこのチャレンジを受け入れることにし、Prettierが持つ全ての設定オプションを実装して完全な互換性を達成する必要がありました。

Biomeは依然としてPrettierと同じ哲学を共有しており、これらのオプションを互換性のためのレガシー機能として捉えており、将来的なオプションの追加の基準とは考えていません。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Biomeは依然としてPrettierと同じ哲学を共有しており、これらのオプションを互換性のためのレガシー機能として捉えており、将来的なオプションの追加の基準とは考えていません
だ、BiomeはPrettierと同じ考え方を共有しており、これらのオプションは互換性のためのレガシー機能として考えています。これらのオプションは、さらに多くのオプションが追加されることを示すものではなく、将来的な他のオプションの存在を裏付ける根拠として使用されるべきではありません


それにもかかわらず、Biomeはまだ比較的新しいツールとして確立されつつあり、他では実現不可能と思われる新しいアイデアや進歩への道を切り開く機会がたくさんあります。

Biomeのformatスタイルも比較的安定しており、Prettierとできるだけ一致するように続けていますが、意図的な逸脱もあります。Biomeのスタイルに対する変更は検討され、実装される可能性がありますが、これらも設定可能なオプションにはならず、代わりに将来のBiomeの全てのバージョンに一律に適用されることになります。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is duplicated. please remove


それにもかかわらず、Biomeはまだ比較的新しいツールとして確立されつつあり、他では実現不可能と思われる新しいアイデアや進歩への道を切り開く機会がたくさんあります。

Biomeのformatスタイルも比較的安定しており、Prettierとできるだけ一致するように続けていますが、意図的な逸脱もあります。Biomeのスタイルに対する変更は検討され、実装される可能性がありますが、これらも設定可能なオプションにはならず、代わりに将来のBiomeの全てのバージョンに一律に適用されることになります。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Biomeのformatスタイルも比較的安定しており、Prettierとできるだけ一致するように続けていますが、意図的な逸脱もあります。Biomeのスタイルに対する変更は検討され、実装される可能性がありますが、これらも設定可能なオプションにはならず、代わりに将来のBiomeの全てのバージョンに一律に適用されることになります。

Copy link
Contributor

@nissy-dev nissy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left additional comments about differences-with-prettier.md

@chansuke
Copy link
Member Author

@nissy-dev I appreciate for your review. I've fixed & squashed the commits.

@nissy-dev nissy-dev merged commit 582e1c4 into biomejs:main Dec 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Website Area: website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants