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
+3 -2
View File
@@ -1,10 +1,11 @@
import { WokaDetail, WokaDetailsResult, WokaList, wokaPartNames } from "../Messages/JsonMessages/PlayerTextures";
import { WokaDetail, WokaList, wokaPartNames } from "../Messages/JsonMessages/PlayerTextures";
import { WokaServiceInterface } from "./WokaServiceInterface";
class LocalWokaService implements WokaServiceInterface {
/**
* Returns the list of all available Wokas & Woka Parts for the current user.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async getWokaList(roomId: string, token: string): Promise<WokaList | undefined> {
const wokaData: WokaList = await require("../../data/woka.json");
if (!wokaData) {
@@ -21,7 +22,7 @@ class LocalWokaService implements WokaServiceInterface {
*
* If one of the textures cannot be found, undefined is returned (and the user should be redirected to Woka choice page!)
*/
async fetchWokaDetails(textureIds: string[]): Promise<WokaDetailsResult | undefined> {
async fetchWokaDetails(textureIds: string[]): Promise<WokaDetail[] | undefined> {
const wokaData: WokaList = await require("../../data/woka.json");
const textures = new Map<
string,