改行の追加 to Class#556
Closed
aster-void wants to merge 2 commits into
Closed
Conversation
prettier が対応してなさそうなので prettier-ignore 追加しました
Deploying with
|
| Latest commit: |
b0ffa1e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ec2e75c9.utcode-learn.pages.dev |
| Branch Preview URL: | https://allow-short-term-types.utcode-learn.pages.dev |
chvmvd
reviewed
Nov 6, 2023
Contributor
chvmvd
left a comment
There was a problem hiding this comment.
これだと不要な空白が随所に入ってしまう気がします。
Contributor
Author
そうですね。幅がほかの文字の 1/8 くらいしかなさそうなので、句点では気づかないレベルだと思いますが、句読点以外ではやめておきます |
Contributor
Author
|
(もとはといえば Term の type が冗長なのが悪いと思います) |
Contributor
|
改行してはいけないところでされているところがありそうです。 |
aster-void
commented
Nov 6, 2023
|
|
||
| 同じ属性を持つ<Term type="javascriptObject">オブジェクト</Term>を複数生成するときに役立つのが**<Term type="javascriptClass">クラス</Term>**です。<Term type="javascriptClass">クラス</Term>では、<Term type="javascriptObject">オブジェクト</Term>の<Term type="javascriptProperty">プロパティ</Term>を予め設定しておくだけでなく、下の<Term type="javascriptMethod">メソッド</Term>の節で説明するように、<Term type="javascriptProperty">プロパティ</Term>を引数にもつような関数も設定しておくことができます。これにより、同じコードを何度も書く必要がなくなるというメリットがあります。<Term type="javascriptClass">クラス</Term>は、同じ<Term type="javascriptProperty">プロパティ</Term>を持つ<Term type="javascriptObject">オブジェクト</Term>を統一的に扱うための仕組みであり、<Term type="javascriptObject">オブジェクト</Term>の設計図と言えます。 | ||
| 同じ属性を持つ<Term type="javascriptObject">オブジェクト</Term>を複数生成するときに役立つのが**<Term type="javascriptClass">クラス</Term>**です。 | ||
|
|
Contributor
Author
There was a problem hiding this comment.
ここの空行いらないですね
prettier-ignoreもこの上に動かします
aster-void
commented
Nov 6, 2023
|
|
||
| 次のコードでは、 | ||
| 先ほど作った `tanaka` のように `name` や `age` という<Term type="javascriptProperty">プロパティ</Term>を持つ<Term type="javascriptObject">オブジェクト</Term>の設計図として、 | ||
|
|
aster-void
commented
Nov 6, 2023
|
|
||
| <Term type="javascriptClass">クラス</Term> `Student` を定義しています。 | ||
|
|
||
| {/* prettier-ignore */} |
aster-void
commented
Nov 6, 2023
| こうしてできた<Term type="javascriptObject">オブジェクト</Term>を、 | ||
| もとになった<Term type="javascriptClass">クラス</Term>の**<Term type="javascriptInstance">インスタンス</Term>**と呼びます。 | ||
| 今回の `age` <Term type="javascriptProperty">プロパティ</Term>のように、 | ||
|
|
Contributor
|
後、読点の後に改行を入れるのはあまり一般的ではない気がします。どうなんでしょう。 |
chelproc
reviewed
Nov 8, 2023
Contributor
chelproc
left a comment
There was a problem hiding this comment.
1文おきに改行入れるのはよさそうですが文中の改行は自分も一般的ではないと思います。
Contributor
Author
|
これも #561 に移行します! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
元のはさすがに読みにくく差分も見にくいのでこっちにさせてください
prettier が対応してなさそうなので prettier-ignore 追加しました