chore(web): add prettier and format

This commit is contained in:
Luke
2022-08-27 15:58:36 +02:00
parent cc76d23419
commit 4a5251b60b
44 changed files with 2933 additions and 1984 deletions

View File

@@ -1,4 +1,4 @@
import {isEnvBrowser} from "./misc";
import { isEnvBrowser } from './misc';
interface DebugEvent<T = any> {
action: string;
@@ -13,11 +13,11 @@ interface DebugEvent<T = any> {
* @param timer - How long until it should trigger (ms)
*/
export const debugData = <P>(events: DebugEvent<P>[], timer = 1000): void => {
if (process.env.NODE_ENV === "development" && isEnvBrowser()) {
if (process.env.NODE_ENV === 'development' && isEnvBrowser()) {
for (const event of events) {
setTimeout(() => {
window.dispatchEvent(
new MessageEvent("message", {
new MessageEvent('message', {
data: {
action: event.action,
data: event.data,
@@ -27,4 +27,4 @@ export const debugData = <P>(events: DebugEvent<P>[], timer = 1000): void => {
}, timer);
}
}
};
};