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

ja: Format /web/api using Prettier (part 2) #14666

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/ja/web/api/compression_streams_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ l10n:

```js
const compressedReadableStream = inputReadableStream.pipeThrough(
new CompressionStream("gzip")
new CompressionStream("gzip"),
);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ new CompressionStream(format)

```js
const compressedReadableStream = inputReadableStream.pipeThrough(
new CompressionStream("gzip")
new CompressionStream("gzip"),
);
```

Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/compressionstream/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ l10n:

```js
const compressedReadableStream = inputReadableStream.pipeThrough(
new CompressionStream("gzip")
new CompressionStream("gzip"),
);
```

Expand Down
14 changes: 7 additions & 7 deletions files/ja/web/api/console/assert/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ l10n:
## 構文

```js
assert(assertion, obj1)
assert(assertion, obj1, obj2)
assert(assertion, obj1, obj2, /* … ,*/ objN)
assert(assertion, obj1);
assert(assertion, obj1, obj2);
assert(assertion, obj1, obj2, /* … ,*/ objN);

assert(assertion, msg)
assert(assertion, msg, subst1)
assert(assertion, msg, subst1, /* … ,*/ substN)
assert(assertion, msg);
assert(assertion, msg, subst1);
assert(assertion, msg, subst1, /* … ,*/ substN);
```

### 引数
Expand All @@ -43,7 +43,7 @@ assert(assertion, msg, subst1, /* … ,*/ substN)
次のコード例は、アサーションに続く JavaScript オブジェクトの使用を示しています。

```js
const errorMsg = 'the # is not even';
const errorMsg = "the # is not even";
for (let number = 2; number <= 5; number++) {
console.log(`the # is ${number}`);
console.assert(number % 2 === 0, { number, errorMsg });
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/clear/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ l10n:
## 構文

```js
clear()
clear();
```

### 引数
Expand Down
4 changes: 2 additions & 2 deletions files/ja/web/api/console/count/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ l10n:
## 構文

```js
count()
count(label)
count();
count(label);
```

### 引数
Expand Down
4 changes: 2 additions & 2 deletions files/ja/web/api/console/countreset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ l10n:
## 構文

```js
countReset()
countReset(label)
countReset();
countReset(label);
```

### 引数
Expand Down
8 changes: 4 additions & 4 deletions files/ja/web/api/console/debug/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ l10n:
## 構文

```js
debug(obj1)
debug(obj1, /* …, */ objN)
debug(msg)
debug(msg, subst1, /* …, */ substN)
debug(obj1);
debug(obj1, /* …, */ objN);
debug(msg);
debug(msg, subst1, /* …, */ substN);
```

### 引数
Expand Down
4 changes: 2 additions & 2 deletions files/ja/web/api/console/dir/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ l10n:
## 構文

```js
dir(object)
dir(object);
```

### 引数
Expand All @@ -40,5 +40,5 @@ dir(object)

## 関連情報

- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85))
- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](<https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85)>)
- [Chrome Console API reference](https://developer.chrome.com/docs/devtools/console/api/#dir)
2 changes: 1 addition & 1 deletion files/ja/web/api/console/dirxml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ l10n:
## 構文

```js
dirxml(object)
dirxml(object);
```

### 引数
Expand Down
10 changes: 5 additions & 5 deletions files/ja/web/api/console/error/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ l10n:
## 構文

```js
error(obj1)
error(obj1, /* …, */ objN)
error(msg)
error(msg, subst1, /* …, */ substN)
error(obj1);
error(obj1, /* …, */ objN);
error(msg);
error(msg, subst1, /* …, */ substN);
```

### 引数
Expand Down Expand Up @@ -45,5 +45,5 @@ error(msg, subst1, /* …, */ substN)

## 関連情報

- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85))
- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](<https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85)>)
- [Chrome Developer Tools: Using the Console](https://developer.chrome.com/docs/devtools/console/api/#error)
4 changes: 2 additions & 2 deletions files/ja/web/api/console/group/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ l10n:
## 構文

```js
group()
group(label)
group();
group(label);
```

### 引数
Expand Down
4 changes: 2 additions & 2 deletions files/ja/web/api/console/groupcollapsed/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ l10n:
## 構文

```js
groupCollapsed()
groupCollapsed(label)
groupCollapsed();
groupCollapsed(label);
```

### 引数
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/groupend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ l10n:
## 構文

```js
groupEnd()
groupEnd();
```

### 引数
Expand Down
18 changes: 13 additions & 5 deletions files/ja/web/api/console/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ l10n:
`console` オブジェクトには任意のグローバルオブジェクトからアクセスできます。閲覧スコープの {{domxref("Window")}} や、特定の種類のワーカーを表す {{domxref("WorkerGlobalScope")}} の console プロパティを通してアクセスできます。これは {{domxref("Window.console")}} として公開されていますが、単に `console` として参照できます。

```js
console.log("Failed to open the specified link")
console.log("Failed to open the specified link");
```

このページでは、 `console` オブジェクトで使用できる[メソッド](#メソッド)やいくらかの[使用例](#使用例)を提供します。
Expand Down Expand Up @@ -126,8 +126,8 @@ My first car was a Dodge Charger . The object is: ({str:"Some text", id:5})
これらは引数リストの書式化文字列の後にある引数を引用します。例えば次のようになります。

```js
for (let i=0; i<5; i++) {
console.log("Hello, %s. You've called me %d times.", "Bob", i+1);
for (let i = 0; i < 5; i++) {
console.log("Hello, %s. You've called me %d times.", "Bob", i + 1);
}
```

Expand All @@ -146,7 +146,10 @@ Hello, Bob. You've called me 5 times.
`%c` ディレクティブを使用すると、コンソールの出力に CSS スタイルを適用することができます。

```js
console.log("This is %cMy stylish message", "color: yellow; font-style: italic; background-color: blue;padding: 2px");
console.log(
"This is %cMy stylish message",
"color: yellow; font-style: italic; background-color: blue;padding: 2px",
);
```

ディレクティブの前のテキストは影響を受けませんが、ディレクティブの後ろのテキストは引数の CSS 宣言を使用して装飾されます。
Expand All @@ -156,7 +159,12 @@ console.log("This is %cMy stylish message", "color: yellow; font-style: italic;
`%c` は複数回使用することができます。

```js
console.log("Multiple styles: %cred %corange", "color: red", "color: orange", "Additional unformatted message");
console.log(
"Multiple styles: %cred %corange",
"color: red",
"color: orange",
"Additional unformatted message",
);
```

`%c` で利用できるプロパティは次の通りです。 (少なくとも、 Firefox では — 他のブラウザーでは異なる可能性があります)。
Expand Down
10 changes: 5 additions & 5 deletions files/ja/web/api/console/info/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ l10n:
## 構文

```js
info(obj1)
info(obj1, /* …, */ objN)
info(msg)
info(msg, subst1, /* …, */ substN)
info(obj1);
info(obj1, /* …, */ objN);
info(msg);
info(msg, subst1, /* …, */ substN);
```

## 引数
Expand Down Expand Up @@ -45,4 +45,4 @@ info(msg, subst1, /* …, */ substN)

## 関連情報

- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85))
- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](<https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85)>)
12 changes: 5 additions & 7 deletions files/ja/web/api/console/log/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: console.log()
slug: Web/API/console/log
l10n:
sourceCommit:
---

{{APIRef("Console API")}}
Expand All @@ -15,10 +13,10 @@ l10n:
## 構文

```js
log(obj1)
log(obj1, /* …, */ objN)
log(msg)
log(msg, subst1, /* …, */ substN)
log(obj1);
log(obj1, /* …, */ objN);
log(msg);
log(msg, subst1, /* …, */ substN);
```

### 引数
Expand Down Expand Up @@ -52,5 +50,5 @@ log(msg, subst1, /* …, */ substN)

## 関連情報

- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85))
- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](<https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85)>)
- [NodeJS: Console API](https://nodejs.org/docs/latest/api/console.html#console_console_log_data)
2 changes: 1 addition & 1 deletion files/ja/web/api/console/profile/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ l10n:
## 構文

```js
profile(profileName)
profile(profileName);
```

### 引数
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/profileend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ i10n:
## 構文

```js
profileEnd(profileName)
profileEnd(profileName);
```

### 引数
Expand Down
10 changes: 7 additions & 3 deletions files/ja/web/api/console/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ console.table(me);
```js
// 配列の配列

const people = [["John", "Smith"], ["Jane", "Doe"], ["Emily", "Jones"]]
const people = [
["John", "Smith"],
["Jane", "Doe"],
["Emily", "Jones"],
];
console.table(people);
```

Expand Down Expand Up @@ -118,8 +122,8 @@ console.table([john, jane, emily], ["firstName"]);
## 構文

```js
table(data)
table(data, columns)
table(data);
table(data, columns);
```

### 引数
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/time/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ l10n:
## 構文

```js
time(label)
time(label);
```

### 引数
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/timeend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ l10n:
## 構文

```js
timeEnd(label)
timeEnd(label);
```

### 引数
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/timelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ l10n:
## 構文

```js
timeLog(label)
timeLog(label);
```

### 引数
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/console/timestamp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ l10n:
## 構文

```js
timeStamp(label)
timeStamp(label);
```

## 引数
Expand Down
4 changes: 2 additions & 2 deletions files/ja/web/api/console/trace/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ i10n:
## 構文

```js
trace()
trace(object1, /* …, */ objectN)
trace();
trace(object1, /* …, */ objectN);
```

### 引数
Expand Down
10 changes: 5 additions & 5 deletions files/ja/web/api/console/warn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ i10n:
## 構文

```js
warn(obj1)
warn(obj1, /* …, */ objN)
warn(msg)
warn(msg, subst1, /* …, */ substN)
warn(obj1);
warn(obj1, /* …, */ objN);
warn(msg);
warn(msg, subst1, /* …, */ substN);
```

## 引数
Expand Down Expand Up @@ -47,4 +47,4 @@ warn(msg, subst1, /* …, */ substN)

## 関連情報

- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85))
- [MSDN: F12 ツールのコンソールを使ったエラーおよびステータスの表示](<https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg589530(v=vs.85)>)
Loading