Skip to content

Commit

Permalink
Bump prettier from 3.0.3 to 3.1.0 (#30241)
Browse files Browse the repository at this point in the history
* Bump prettier from 3.0.3 to 3.1.0

Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.0.3...3.1.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Run prettier locally that should fix all the errors

* Update files/en-us/web/javascript/reference/operators/instanceof/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Add nolint to example-bad of JS instaceof docs

* Revert changes in package.json yarn.lock erroneously done locally

* Reapply package and yarn changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 14, 2023
1 parent 2c528c9 commit cbfc561
Show file tree
Hide file tree
Showing 25 changed files with 19,554 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
document.querySelector(
"#output",
).textContent = `Finished generating ${quota} primes!`;
document.querySelector("#output").textContent =
`Finished generating ${quota} primes!`;
});

document.querySelector("#reload").addEventListener("click", () => {
Expand Down Expand Up @@ -161,9 +160,8 @@ document.querySelector("#generate").addEventListener("click", () => {
// update the output box with a message for the user, including the number of
// primes that were generated, taken from the message data.
worker.addEventListener("message", (message) => {
document.querySelector(
"#output",
).textContent = `Finished generating ${message.data} primes!`;
document.querySelector("#output").textContent =
`Finished generating ${message.data} primes!`;
});

document.querySelector("#reload").addEventListener("click", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ We will also use the `Filter` enum in the `Todos.svelte` component.
filter === Filter.ACTIVE
? todos.filter((t) => !t.completed)
: filter === Filter.COMPLETED
? todos.filter((t) => t.completed)
: todos;
? todos.filter((t) => t.completed)
: todos;

$: {
if (filter === Filter.ALL) {
Expand Down Expand Up @@ -519,8 +519,8 @@ We will also use the `Filter` enum in the `Todos.svelte` component.
filter === Filter.ACTIVE
? todos.filter((t) => !t.completed)
: filter === Filter.COMPLETED
? todos.filter((t) => t.completed)
: todos;
? todos.filter((t) => t.completed)
: todos;

$: {
if (filter === Filter.ALL) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ Finally for this article, let's implement the ability to filter our to-dos by st
filter === "active"
? todos.filter((t) => !t.completed)
: filter === "completed"
? todos.filter((t) => t.completed)
: todos;
? todos.filter((t) => t.completed)
: todos;
```

We use the `filter` variable to control the active filter: _all_, _active_, or _completed_. Just assigning one of these values to the filter variable will activate the filter and update the list of to-dos. Let's see how to achieve this.
Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/batterymanager/chargingtime/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ A number.
navigator.getBattery().then((battery) => {
const time = battery.chargingTime;

document.querySelector(
"#chargingTime",
).textContent = `Time to fully charge the battery: ${time}s`;
document.querySelector("#chargingTime").textContent =
`Time to fully charge the battery: ${time}s`;
});
```

Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/batterymanager/dischargingtime/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ A number.
navigator.getBattery().then((battery) => {
const time = battery.dischargingTime;

document.querySelector(
"#dischargingTime",
).textContent = `Remaining time to fully discharge the battery: ${time}`;
document.querySelector("#dischargingTime").textContent =
`Remaining time to fully discharge the battery: ${time}`;
});
```

Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/batterymanager/levelchange_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ navigator.getBattery().then((battery) => {
battery.chargingTime / 60
}`;
} else {
document.querySelector(
"#stateBattery",
).textContent = `Discharging time: ${battery.dischargingTime / 60}`;
document.querySelector("#stateBattery").textContent =
`Discharging time: ${battery.dischargingTime / 60}`;
}
};
});
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/document/createtreewalker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ const treeWalker = document.createTreeWalker(
node.classList.contains("no-escape")
? NodeFilter.FILTER_REJECT
: node.closest(".escape")
? NodeFilter.FILTER_ACCEPT
: NodeFilter.FILTER_SKIP,
? NodeFilter.FILTER_ACCEPT
: NodeFilter.FILTER_SKIP,
);

while (treeWalker.nextNode()) {
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/htmlmarqueeelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _Inherits methods from its parent, {{DOMxRef("HTMLElement")}}._
height="200"
behavior="alternate"
style="border:solid">
<marquee behavior="alternate"> This text will bounce </marquee>
<marquee behavior="alternate">This text will bounce</marquee>
</marquee>
```

Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/ink_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ canvas.addEventListener("pointermove", async (evt) => {

style = { color: `rgba(${r}, ${g}, ${b}, 1)`, diameter: 10 };
move_cnt = 0;
document.getElementById(
"div",
).style.backgroundColor = `rgba(${r}, ${g}, ${b}, 0.6)`;
document.getElementById("div").style.backgroundColor =
`rgba(${r}, ${g}, ${b}, 0.6)`;
}
move_cnt += 1;
await presenter.updateInkTrailStartPoint(evt, style);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ canvas.addEventListener("pointermove", async (evt) => {

style = { color: `rgba(${r}, ${g}, ${b}, 1)`, diameter: 10 };
move_cnt = 0;
document.getElementById(
"div",
).style.backgroundColor = `rgba(${r}, ${g}, ${b}, 0.6)`;
document.getElementById("div").style.backgroundColor =
`rgba(${r}, ${g}, ${b}, 0.6)`;
}
move_cnt += 1;
await presenter.updateInkTrailStartPoint(evt, style);
Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/keyboardevent/metakey/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ A boolean value.

```js
function ismetaKey(e) {
document.querySelector(
"#output",
).textContent = `metaKey pressed? ${e.metaKey}`;
document.querySelector("#output").textContent =
`metaKey pressed? ${e.metaKey}`;
}
```

Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/response/json/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ fetch(myRequest)
listItem.appendChild(document.createElement("strong")).textContent =
product.Name;
listItem.append(` can be found in ${product.Location}. Cost: `);
listItem.appendChild(
document.createElement("strong"),
).textContent = `£${product.Price}`;
listItem.appendChild(document.createElement("strong")).textContent =
`£${product.Price}`;
myList.appendChild(listItem);
}
})
Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/rtcdatachannel/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ const dc = pc.createDataChannel("my channel");

//

document.getElementById(
"channel-name",
).innerHTML = `<span class='channelName'>${dc.label}</span>`;
document.getElementById("channel-name").innerHTML =
`<span class='channelName'>${dc.label}</span>`;
```

## Specifications
Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
document.querySelector(
"p",
).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
document.querySelector("p").textContent =
`Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
document.querySelector(
"p",
).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
document.querySelector("p").textContent =
`Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
document.querySelector(
"p",
).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
document.querySelector("p").textContent =
`Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}
initializeAttributes();
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/marquee/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The **`<marquee>`** [HTML](/en-US/docs/Web/HTML) element is used to insert a scr
height="200"
behavior="alternate"
style="border:solid">
<marquee behavior="alternate"> This text will bounce </marquee>
<marquee behavior="alternate">This text will bounce</marquee>
</marquee>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ browser-compat: javascript.operators.exponentiation

{{jsSidebar("Operators")}}

The **exponentiation (`**`)** operator returns the result of raising the first operand to the power of the second operand. It is equivalent to {{jsxref("Math.pow()")}}, except it also accepts [BigInts](/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) as operands.
The **exponentiation (`**`)\*\* operator returns the result of raising the first operand to the power of the second operand. It is equivalent to {{jsxref("Math.pow()")}}, except it also accepts [BigInts](/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) as operands.

{{EmbedInteractiveExample("pages/js/expressions-exponentiation.html")}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ browser-compat: javascript.operators.exponentiation_assignment

{{jsSidebar("Operators")}}

The **exponentiation assignment (`**=`)** operator performs [exponentiation](/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation) on the two operands and assigns the result to the left operand.
The **exponentiation assignment (`**=`)\*\* operator performs [exponentiation](/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation) on the two operands and assigns the result to the left operand.

{{EmbedInteractiveExample("pages/js/expressions-exponentiation-assignment.html")}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ Here, we load 10 modules, `/modules/module-0.js`, `/modules/module-1.js`, etc.,

```js
Promise.all(
Array.from({ length: 10 }).map((_, index) =>
import(`/modules/module-${index}.js`),
Array.from({ length: 10 }).map(
(_, index) => import(`/modules/module-${index}.js`),
),
).then((modules) => modules.forEach((module) => module.load()));
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ if (!(mycar instanceof Car)) {

This is really different from:

```js example-bad
```js-nolint example-bad
if (!mycar instanceof Car) {
// unreachable code
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ let classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
? " icon-expander"
: " icon-collapser";
? " icon-expander"
: " icon-collapser";
```

With a template literal but without nesting, you could do this:
Expand Down
Loading

0 comments on commit cbfc561

Please sign in to comment.