Skip to content

Commit e962a9c

Browse files
committed
upgrade and specify the prettier version
1 parent e9adeae commit e962a9c

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

.github/workflows/frontend.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
with:
3030
node-version: 18
3131
- name: Code Formatter
32-
run: npx prettier -c frontend/*.{html,css,ts}
32+
run: npx prettier@3.0.0 -c frontend/*.{html,css,ts}

frontend/about.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<meta charset="utf-8" />
33
<title>About Pinging.net</title>
44
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

frontend/dark_mode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ document.addEventListener("DOMContentLoaded", () => {
1717
return console.error("Unknown case");
1818
}
1919
switchDarkMode(next);
20-
})
20+
}),
2121
);
2222
});
2323

frontend/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta charset="utf-8" />

frontend/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function createNewPingingRow(sec: number) {
181181
function setPingResultForSecond(
182182
sentMillis: number,
183183
result: string,
184-
nowMillis = Date.now()
184+
nowMillis = Date.now(),
185185
) {
186186
const elapsed = nowMillis - sentMillis;
187187
const sec = millisToWholeSec(sentMillis);
@@ -195,7 +195,7 @@ function setPingResultForSecond(
195195
"had result",
196196
result,
197197
"in",
198-
elapsed + "ms"
198+
elapsed + "ms",
199199
);
200200
}
201201
let toSave: string | number = result;
@@ -398,7 +398,7 @@ async function testHttpOrDns(testName: string) {
398398
{
399399
method: "GET",
400400
cache: "no-store",
401-
}
401+
},
402402
);
403403
}
404404

@@ -411,7 +411,7 @@ async function testHttpOrDns(testName: string) {
411411
log(
412412
testName.toUpperCase(),
413413
"test completed successfully in",
414-
duration + "ms"
414+
duration + "ms",
415415
);
416416
updateStatus(testName, GOOD);
417417
} catch (error) {
@@ -485,11 +485,11 @@ async function setupRtc() {
485485
{
486486
method: "POST",
487487
body: rtcPeer.localDescription!.sdp,
488-
}
488+
},
489489
);
490490
const resp_json = await response.json();
491491
await rtcPeer.setRemoteDescription(
492-
new RTCSessionDescription(resp_json.answer)
492+
new RTCSessionDescription(resp_json.answer),
493493
);
494494
var candidate = new RTCIceCandidate(resp_json.candidate);
495495
await rtcPeer.addIceCandidate(candidate);
@@ -553,7 +553,7 @@ function getEventTimestamp(evt: Event, nowMillis: number, sentMillis: number) {
553553
"Event time in the future",
554554
sentMillis,
555555
eventStamp,
556-
nowMillis
556+
nowMillis,
557557
);
558558
return nowMillis;
559559
}
@@ -565,7 +565,7 @@ function getEventTimestamp(evt: Event, nowMillis: number, sentMillis: number) {
565565
"Event time too far in past",
566566
sentMillis,
567567
eventStamp,
568-
nowMillis
568+
nowMillis,
569569
);
570570
return nowMillis;
571571
}
@@ -600,7 +600,7 @@ function onPingResponse(evt: MessageEvent) {
600600
console.error(
601601
"rtcPeerLocation does not match existing:",
602602
newRtcPeerLocation,
603-
rtcPeerLocation
603+
rtcPeerLocation,
604604
);
605605
}
606606
}
@@ -610,7 +610,7 @@ function onPingResponse(evt: MessageEvent) {
610610
setPingResultForSecond(sentMillis, PING_SUCCESS, receivedMillis);
611611
if (lastRtcConnectAttempt + RECONNECT_WEBRTC_PERIOD <= Date.now()) {
612612
log(
613-
"Reconnecting WebRTC connection in case the server connection info has updated."
613+
"Reconnecting WebRTC connection in case the server connection info has updated.",
614614
);
615615
setupRtc();
616616
}

frontend/not-found.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<meta charset="utf-8" />
33
<title>Not Found</title>
44
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

scripts/check_formatting

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33
cd $(git -C "$(dirname "${BASH_SOURCE[0]}")" rev-parse --show-toplevel)
44

5-
npx prettier -c frontend/*.{html,css,ts}
5+
npx prettier@3.0.0 -c frontend/*.{html,css,ts}
66

77
pushd backend
88
cargo fmt --check -v

0 commit comments

Comments
 (0)