From 025df699666cd403b061d78e9c41461a74aad2cc Mon Sep 17 00:00:00 2001 From: OnkarRuikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Tue, 14 Nov 2023 19:13:56 +0530 Subject: [PATCH 1/2] fix: format docs with prettier 3.1 --- .../asynchronous/introducing_workers/index.md | 10 ++++++---- .../svelte_typescript/index.md | 8 ++++---- .../svelte_variables_props/index.md | 4 ++-- .../en-us/web/api/batterymanager/chargingtime/index.md | 5 +++-- .../web/api/batterymanager/dischargingtime/index.md | 5 +++-- .../web/api/batterymanager/levelchange_event/index.md | 5 +++-- files/en-us/web/api/document/createtreewalker/index.md | 4 ++-- files/en-us/web/api/ink_api/index.md | 5 +++-- .../api/inkpresenter/updateinktrailstartpoint/index.md | 5 +++-- files/en-us/web/api/keyboardevent/metakey/index.md | 5 +++-- files/en-us/web/api/response/json/index.md | 5 +++-- files/en-us/web/api/rtcdatachannel/label/index.md | 5 +++-- .../web/api/webgl_api/by_example/hello_glsl/index.md | 5 +++-- .../by_example/hello_vertex_attributes/index.md | 5 +++-- .../webgl_api/by_example/textures_from_code/index.md | 5 +++-- .../web/javascript/reference/operators/import/index.md | 4 ++-- .../javascript/reference/template_literals/index.md | 4 ++-- 17 files changed, 51 insertions(+), 38 deletions(-) diff --git a/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md b/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md index e2469be876df7be..b443708dde1824d 100644 --- a/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md +++ b/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md @@ -77,8 +77,9 @@ 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", () => { @@ -160,8 +161,9 @@ 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", () => { diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md index 8cc67795b8cc1bb..24761c75898ec25 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md @@ -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) { @@ -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) { diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md index 18c90f274da7a51..b543e3ebf1cc435 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md @@ -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. diff --git a/files/en-us/web/api/batterymanager/chargingtime/index.md b/files/en-us/web/api/batterymanager/chargingtime/index.md index 4e913bef4d8b3f0..b24a29c0ca07081 100644 --- a/files/en-us/web/api/batterymanager/chargingtime/index.md +++ b/files/en-us/web/api/batterymanager/chargingtime/index.md @@ -34,8 +34,9 @@ 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`; }); ``` diff --git a/files/en-us/web/api/batterymanager/dischargingtime/index.md b/files/en-us/web/api/batterymanager/dischargingtime/index.md index dc089410bbf11b9..373b2a339d19e74 100644 --- a/files/en-us/web/api/batterymanager/dischargingtime/index.md +++ b/files/en-us/web/api/batterymanager/dischargingtime/index.md @@ -33,8 +33,9 @@ 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}`; }); ``` diff --git a/files/en-us/web/api/batterymanager/levelchange_event/index.md b/files/en-us/web/api/batterymanager/levelchange_event/index.md index 1ae9271c7302bd7..c7b43a83c0badad 100644 --- a/files/en-us/web/api/batterymanager/levelchange_event/index.md +++ b/files/en-us/web/api/batterymanager/levelchange_event/index.md @@ -45,8 +45,9 @@ 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}`; } }; }); diff --git a/files/en-us/web/api/document/createtreewalker/index.md b/files/en-us/web/api/document/createtreewalker/index.md index cd201726d782654..367ced0f98e9115 100644 --- a/files/en-us/web/api/document/createtreewalker/index.md +++ b/files/en-us/web/api/document/createtreewalker/index.md @@ -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()) { diff --git a/files/en-us/web/api/ink_api/index.md b/files/en-us/web/api/ink_api/index.md index 37de7c9be251a92..b380d56bd63ee6f 100644 --- a/files/en-us/web/api/ink_api/index.md +++ b/files/en-us/web/api/ink_api/index.md @@ -91,8 +91,9 @@ 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); diff --git a/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md b/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md index 957beae5ac5bd9b..3e3f39f96c15883 100644 --- a/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md +++ b/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md @@ -97,8 +97,9 @@ 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); diff --git a/files/en-us/web/api/keyboardevent/metakey/index.md b/files/en-us/web/api/keyboardevent/metakey/index.md index 5ac693fdb2aa54e..6d3ca5fdea7dd78 100644 --- a/files/en-us/web/api/keyboardevent/metakey/index.md +++ b/files/en-us/web/api/keyboardevent/metakey/index.md @@ -33,8 +33,9 @@ A boolean value. ```js function ismetaKey(e) { - document.querySelector("#output").textContent = - `metaKey pressed? ${e.metaKey}`; + document.querySelector( + "#output", + ).textContent = `metaKey pressed? ${e.metaKey}`; } ``` diff --git a/files/en-us/web/api/response/json/index.md b/files/en-us/web/api/response/json/index.md index 44312c06a19fb03..d610ce0efe21c49 100644 --- a/files/en-us/web/api/response/json/index.md +++ b/files/en-us/web/api/response/json/index.md @@ -49,8 +49,9 @@ 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); } }) diff --git a/files/en-us/web/api/rtcdatachannel/label/index.md b/files/en-us/web/api/rtcdatachannel/label/index.md index 9dfe3a30da4982f..ac15fa0f88bbf15 100644 --- a/files/en-us/web/api/rtcdatachannel/label/index.md +++ b/files/en-us/web/api/rtcdatachannel/label/index.md @@ -39,8 +39,9 @@ const dc = pc.createDataChannel("my channel"); // … -document.getElementById("channel-name").innerHTML = - `${dc.label}`; +document.getElementById( + "channel-name", +).innerHTML = `${dc.label}`; ``` ## Specifications diff --git a/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md b/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md index 0c53c0ae8fc83f3..1f4727563c3290e 100644 --- a/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md +++ b/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md @@ -97,8 +97,9 @@ 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; } diff --git a/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md b/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md index b193e111de0eca1..ad7acf5652a002f 100644 --- a/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md +++ b/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md @@ -102,8 +102,9 @@ 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; } diff --git a/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md b/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md index 4fe34fe6edb8f91..bbdbe9992e1966b 100644 --- a/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md +++ b/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md @@ -108,8 +108,9 @@ 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(); diff --git a/files/en-us/web/javascript/reference/operators/import/index.md b/files/en-us/web/javascript/reference/operators/import/index.md index 993c995bbfbde83..676f51b83a5a5be 100644 --- a/files/en-us/web/javascript/reference/operators/import/index.md +++ b/files/en-us/web/javascript/reference/operators/import/index.md @@ -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())); ``` diff --git a/files/en-us/web/javascript/reference/template_literals/index.md b/files/en-us/web/javascript/reference/template_literals/index.md index 2c65696695e84a7..6c57d8141ffb452 100644 --- a/files/en-us/web/javascript/reference/template_literals/index.md +++ b/files/en-us/web/javascript/reference/template_literals/index.md @@ -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: From b5d0dfe250c420a667f68b56b8e5f7dae0a0d277 Mon Sep 17 00:00:00 2001 From: OnkarRuikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Tue, 14 Nov 2023 19:26:12 +0530 Subject: [PATCH 2/2] fix: after yarn install --- .../asynchronous/introducing_workers/index.md | 10 ++++------ .../svelte_typescript/index.md | 8 ++++---- .../svelte_variables_props/index.md | 4 ++-- .../en-us/web/api/batterymanager/chargingtime/index.md | 5 ++--- .../web/api/batterymanager/dischargingtime/index.md | 5 ++--- .../web/api/batterymanager/levelchange_event/index.md | 5 ++--- files/en-us/web/api/document/createtreewalker/index.md | 4 ++-- files/en-us/web/api/ink_api/index.md | 5 ++--- .../api/inkpresenter/updateinktrailstartpoint/index.md | 5 ++--- files/en-us/web/api/keyboardevent/metakey/index.md | 5 ++--- files/en-us/web/api/response/json/index.md | 5 ++--- files/en-us/web/api/rtcdatachannel/label/index.md | 5 ++--- .../web/api/webgl_api/by_example/hello_glsl/index.md | 5 ++--- .../by_example/hello_vertex_attributes/index.md | 5 ++--- .../webgl_api/by_example/textures_from_code/index.md | 5 ++--- .../web/javascript/reference/operators/import/index.md | 4 ++-- .../javascript/reference/template_literals/index.md | 4 ++-- 17 files changed, 38 insertions(+), 51 deletions(-) diff --git a/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md b/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md index b443708dde1824d..e2469be876df7be 100644 --- a/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md +++ b/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md @@ -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", () => { @@ -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", () => { diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md index 24761c75898ec25..8cc67795b8cc1bb 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_typescript/index.md @@ -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) { @@ -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) { diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md index b543e3ebf1cc435..18c90f274da7a51 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md @@ -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. diff --git a/files/en-us/web/api/batterymanager/chargingtime/index.md b/files/en-us/web/api/batterymanager/chargingtime/index.md index b24a29c0ca07081..4e913bef4d8b3f0 100644 --- a/files/en-us/web/api/batterymanager/chargingtime/index.md +++ b/files/en-us/web/api/batterymanager/chargingtime/index.md @@ -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`; }); ``` diff --git a/files/en-us/web/api/batterymanager/dischargingtime/index.md b/files/en-us/web/api/batterymanager/dischargingtime/index.md index 373b2a339d19e74..dc089410bbf11b9 100644 --- a/files/en-us/web/api/batterymanager/dischargingtime/index.md +++ b/files/en-us/web/api/batterymanager/dischargingtime/index.md @@ -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}`; }); ``` diff --git a/files/en-us/web/api/batterymanager/levelchange_event/index.md b/files/en-us/web/api/batterymanager/levelchange_event/index.md index c7b43a83c0badad..1ae9271c7302bd7 100644 --- a/files/en-us/web/api/batterymanager/levelchange_event/index.md +++ b/files/en-us/web/api/batterymanager/levelchange_event/index.md @@ -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}`; } }; }); diff --git a/files/en-us/web/api/document/createtreewalker/index.md b/files/en-us/web/api/document/createtreewalker/index.md index 367ced0f98e9115..cd201726d782654 100644 --- a/files/en-us/web/api/document/createtreewalker/index.md +++ b/files/en-us/web/api/document/createtreewalker/index.md @@ -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()) { diff --git a/files/en-us/web/api/ink_api/index.md b/files/en-us/web/api/ink_api/index.md index b380d56bd63ee6f..37de7c9be251a92 100644 --- a/files/en-us/web/api/ink_api/index.md +++ b/files/en-us/web/api/ink_api/index.md @@ -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); diff --git a/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md b/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md index 3e3f39f96c15883..957beae5ac5bd9b 100644 --- a/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md +++ b/files/en-us/web/api/inkpresenter/updateinktrailstartpoint/index.md @@ -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); diff --git a/files/en-us/web/api/keyboardevent/metakey/index.md b/files/en-us/web/api/keyboardevent/metakey/index.md index 6d3ca5fdea7dd78..5ac693fdb2aa54e 100644 --- a/files/en-us/web/api/keyboardevent/metakey/index.md +++ b/files/en-us/web/api/keyboardevent/metakey/index.md @@ -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}`; } ``` diff --git a/files/en-us/web/api/response/json/index.md b/files/en-us/web/api/response/json/index.md index d610ce0efe21c49..44312c06a19fb03 100644 --- a/files/en-us/web/api/response/json/index.md +++ b/files/en-us/web/api/response/json/index.md @@ -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); } }) diff --git a/files/en-us/web/api/rtcdatachannel/label/index.md b/files/en-us/web/api/rtcdatachannel/label/index.md index ac15fa0f88bbf15..9dfe3a30da4982f 100644 --- a/files/en-us/web/api/rtcdatachannel/label/index.md +++ b/files/en-us/web/api/rtcdatachannel/label/index.md @@ -39,9 +39,8 @@ const dc = pc.createDataChannel("my channel"); // … -document.getElementById( - "channel-name", -).innerHTML = `${dc.label}`; +document.getElementById("channel-name").innerHTML = + `${dc.label}`; ``` ## Specifications diff --git a/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md b/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md index 1f4727563c3290e..0c53c0ae8fc83f3 100644 --- a/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md +++ b/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md @@ -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; } diff --git a/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md b/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md index ad7acf5652a002f..b193e111de0eca1 100644 --- a/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md +++ b/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md @@ -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; } diff --git a/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md b/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md index bbdbe9992e1966b..4fe34fe6edb8f91 100644 --- a/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md +++ b/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md @@ -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(); diff --git a/files/en-us/web/javascript/reference/operators/import/index.md b/files/en-us/web/javascript/reference/operators/import/index.md index 676f51b83a5a5be..993c995bbfbde83 100644 --- a/files/en-us/web/javascript/reference/operators/import/index.md +++ b/files/en-us/web/javascript/reference/operators/import/index.md @@ -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())); ``` diff --git a/files/en-us/web/javascript/reference/template_literals/index.md b/files/en-us/web/javascript/reference/template_literals/index.md index 6c57d8141ffb452..2c65696695e84a7 100644 --- a/files/en-us/web/javascript/reference/template_literals/index.md +++ b/files/en-us/web/javascript/reference/template_literals/index.md @@ -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: