Zod EVERYWHERE (#2027)

* Zod EVERYWHERE

* Add no-unused-vars rule to eslint in front

* Add no-unused-vars rule to eslint in pusher

* Add no-unused-vars rule to eslint in back

* Remove unused PlayerTexture guards

* Fix data providing on room connection

Co-authored-by: Alexis Faizeau <a.faizeau@workadventu.re>
This commit is contained in:
Alexis Faizeau
2022-04-12 14:21:19 +02:00
committed by GitHub
parent 41e62051d4
commit d1e8243c47
161 changed files with 1131 additions and 1248 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import type CancelablePromise from "cancelable-promise";
import type { Readable, Writable } from "svelte/store";
import type { Readable } from "svelte/store";
export type CoWebsiteState = "asleep" | "loading" | "ready";
+6 -6
View File
@@ -52,7 +52,7 @@ class CoWebsiteManager {
trails: number[] | undefined;
};
private resizeObserver = new ResizeObserver((entries) => {
private resizeObserver = new ResizeObserver(() => {
this.resizeAllIframes();
});
@@ -223,7 +223,7 @@ class CoWebsiteManager {
this.fire();
};
this.cowebsiteAsideHolderDom.addEventListener("mousedown", (event) => {
this.cowebsiteAsideHolderDom.addEventListener("mousedown", () => {
if (this.isFullScreen) return;
const coWebsite = this.getMainCoWebsite();
@@ -240,7 +240,7 @@ class CoWebsiteManager {
document.addEventListener("mousemove", movecallback);
});
document.addEventListener("mouseup", (event) => {
document.addEventListener("mouseup", () => {
if (!this.resizing || this.isFullScreen) return;
document.removeEventListener("mousemove", movecallback);
const coWebsite = this.getMainCoWebsite();
@@ -277,7 +277,7 @@ class CoWebsiteManager {
document.addEventListener("touchmove", movecallback);
});
document.addEventListener("touchend", (event) => {
document.addEventListener("touchend", () => {
if (!this.resizing || this.isFullScreen) return;
this.previousTouchMoveCoordinates = null;
document.removeEventListener("touchmove", movecallback);
@@ -298,7 +298,7 @@ class CoWebsiteManager {
}
private transitionListeners() {
this.cowebsiteDom.addEventListener("transitionend", (event) => {
this.cowebsiteDom.addEventListener("transitionend", () => {
if (this.cowebsiteDom.classList.contains("loading")) {
this.fire();
}
@@ -552,7 +552,7 @@ class CoWebsiteManager {
}
coWebsite.unload().catch((err) => {
console.error("Cannot unload cowebsite on remove from stack");
console.error("Cannot unload cowebsite on remove from stack", err);
});
}
+1
View File
@@ -14,6 +14,7 @@ export function getColorRgbFromHue(hue: number): { r: number; g: number; b: numb
return hsv_to_rgb(hue, 0.5, 0.95);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function stringToDouble(string: string): number {
let num = 1;
for (const char of string.split("")) {