style: format ts file with prettier

This commit is contained in:
Tristan Yang
2023-05-19 17:28:15 +08:00
parent 5bd0183651
commit 54f995803a
70 changed files with 1021 additions and 777 deletions
+6 -6
View File
@@ -17,10 +17,10 @@ interface Config {
const isLocalhost = Boolean(
window.location.hostname === "localhost" ||
// [::1] is the IPv6 localhost address.
window.location.hostname === "[::1]" ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
// [::1] is the IPv6 localhost address.
window.location.hostname === "[::1]" ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
);
export function register(config: Config) {
@@ -46,7 +46,7 @@ export function register(config: Config) {
navigator.serviceWorker.ready.then(() => {
console.log(
"This web app is being served cache-first by a service " +
"worker. To learn more, visit https://cra.link/PWA"
"worker. To learn more, visit https://cra.link/PWA"
);
});
} else {
@@ -75,7 +75,7 @@ function registerValidSW(swUrl: string, config: Config) {
// content until all client tabs are closed.
console.log(
"New content is available and will be used when all " +
"tabs for this page are closed. See https://cra.link/PWA."
"tabs for this page are closed. See https://cra.link/PWA."
);
// Execute callback