Commit 70b4af60 authored by Chunchi Che's avatar Chunchi Che

fix eslint

parent 3405b9d2
import axios from "axios";
import sqliteMiddleWare, { sqliteCmd } from "@/middleware/sqlite";
export interface CardMeta {
......@@ -57,7 +55,8 @@ export async function fetchCard(id: number): Promise<CardMeta> {
return res.selectResult ? res.selectResult : { id, data: {}, text: {} };
}
window.fetchCard = fetchCard;
// TS检查错误,先注释掉
// window.fetchCard = fetchCard;
export function getCardStr(meta: CardMeta, idx: number): string | undefined {
switch (idx) {
......
......@@ -14,6 +14,7 @@ interface ImportMeta {
import { EventEmitter } from "eventemitter3";
/* eslint no-var: 0 */
declare global {
var eventBus: EventEmitter;
var myExtraDeckCodes: number[];
......
// Some implementation of infrastructure
/* eslint import/export: 0 */
export * from "./eventbus";
export * from "./sleep";
export * from "./stream";
export * from "./eventbus";
import { sleep } from "@/infra";
import { fetchCard, ygopro } from "@/api";
import { fetchEsHintMeta, matStore, cardStore } from "@/stores";
import { sleep } from "@/infra";
import { cardStore, fetchEsHintMeta, matStore } from "@/stores";
import { zip } from "@/ui/Duel/utils";
export default async (draw: ygopro.StocGameMessage.MsgDraw) => {
......
import { v4 as v4uuid } from "uuid";
import { fetchCard, ygopro } from "@/api";
import { fetchOverlayMeta, store, cardStore, CardType } from "@/stores";
import { cardStore, CardType, fetchOverlayMeta, store } from "@/stores";
type MsgMove = ygopro.StocGameMessage.MsgMove;
import { useConfig } from "@/config";
import { sleep } from "@/infra";
......
import { ygopro } from "@/api";
import MsgPosChange = ygopro.StocGameMessage.MsgPosChange;
import { fetchEsHintMeta, matStore, cardStore } from "@/stores";
import { cardStore, fetchEsHintMeta, matStore } from "@/stores";
export default (posChange: MsgPosChange) => {
const { location, controler, sequence } = posChange.card_info;
......
import { v4 as uuidv4 } from "uuid";
import { ygopro } from "@/api";
import { matStore, cardStore } from "@/stores";
import { cardStore, matStore } from "@/stores";
type MsgReloadField = ygopro.StocGameMessage.MsgReloadField;
type ZoneActions = ygopro.StocGameMessage.MsgReloadField.ZoneAction[];
......
import { ygopro } from "@/api";
import {
cardStore,
clearAllIdleInteractivities as clearAllIdleInteractivities,
type Interactivity,
InteractType,
matStore,
cardStore,
} from "@/stores";
import MsgSelectBattleCmd = ygopro.StocGameMessage.MsgSelectBattleCmd;
......
import { ygopro } from "@/api";
import {
cardStore,
clearAllIdleInteractivities as clearAllIdleInteractivities,
type Interactivity,
InteractType,
matStore,
cardStore,
} from "@/stores";
import MsgSelectIdleCmd = ygopro.StocGameMessage.MsgSelectIdleCmd;
......
import { ygopro } from "@/api";
import { matStore, cardStore } from "@/stores";
import { cardStore, matStore } from "@/stores";
import { zip } from "@/ui/Duel/utils";
type MsgShuffleHand = ygopro.StocGameMessage.MsgShuffleHand;
......
export * from "./cardStore";
export * from "./chatStore";
export * from "./joinStore";
export * from "./matStore";
export * from "./messageStore";
export * from "./moraStore";
export * from "./playerStore";
export * from "./cardStore";
export * from "./placeStore";
export * from "./playerStore";
import { proxy } from "valtio";
import { devtools } from "valtio/utils";
import { cardStore } from "./cardStore";
import { chatStore } from "./chatStore";
import { joinStore } from "./joinStore";
import { matStore } from "./matStore";
import { messageStore } from "./messageStore";
import { moraStore } from "./moraStore";
import { playerStore } from "./playerStore";
import { cardStore } from "./cardStore";
import { placeStore } from "./placeStore";
import { playerStore } from "./playerStore";
export const store = proxy({
playerStore,
......
/* eslint valtio/avoid-this-in-proxy: 0 */
import { cloneDeep } from "lodash-es";
import { v4 as v4uuid } from "uuid";
import { proxy } from "valtio";
import { ygopro } from "@/api";
import { fetchCard } from "@/api/cards";
import { useConfig } from "@/config";
import type {
CardState,
......
import { ygopro } from "@/api";
import { proxy } from "valtio";
import type { Interactivity } from "./matStore/types";
import { ygopro } from "@/api";
import { matStore } from "@/stores";
import type { Interactivity } from "./matStore/types";
export type PlaceInteractivity =
| Interactivity<{
controler: number;
......
/* eslint valtio/avoid-this-in-proxy: 0 */
import { proxy } from "valtio";
import { ygopro } from "@/api";
......
......@@ -13,10 +13,9 @@ import {
SortCardModal,
YesNoModal,
} from "./Message";
import Mat from "./PlayMat";
import { Mat as NewMat } from "./NewPlayMat";
import { Menu } from "./NewPlayMat/Menu";
import Mat from "./PlayMat";
const NeosDuel = () => {
return (
......
import { type FC } from "react";
import classnames from "classnames";
import "./index.scss";
import classnames from "classnames";
import { type FC } from "react";
import { type INTERNAL_Snapshot as Snapshot, useSnapshot } from "valtio";
import { sendSelectPlaceResponse, ygopro } from "@/api";
import {
placeStore,
type PlaceInteractivity,
messageStore,
CardType,
cardStore,
CardType,
messageStore,
type PlaceInteractivity,
placeStore,
} from "@/stores";
import { useSnapshot, type INTERNAL_Snapshot as Snapshot } from "valtio";
import { sendSelectPlaceResponse, ygopro } from "@/api";
import { interactTypeToString } from "../../utils";
const BgExtraRow: FC = () => {
......
import React, { useEffect, type CSSProperties, type FC, useState } from "react";
import { cardStore, messageStore, CardType } from "@/stores";
import "./index.scss";
import { animated, to, useSpring } from "@react-spring/web";
import classnames from "classnames";
import React, { type CSSProperties, type FC, useEffect, useState } from "react";
import { useSnapshot } from "valtio";
import { useSpring, animated, to } from "@react-spring/web";
import { ygopro } from "@/api";
import { useConfig } from "@/config";
import { moveToDeck, moveToGround, moveToHand, moveToOutside } from "./springs";
import { cardStore, CardType, messageStore } from "@/stores";
import { interactTypeToString } from "../../utils";
import classnames from "classnames";
import { moveToDeck, moveToGround, moveToHand, moveToOutside } from "./springs";
const NeosConfig = useConfig();
......
export * from "./toDeck";
export * from "./toGround";
export * from "./toHand";
export * from "./toDeck";
export * from "./toOutside";
import { isMe, type CardType } from "@/stores";
import { SpringApi } from "./types";
import { matConfig } from "../../utils";
import { ygopro } from "@/api";
import { easings } from "@react-spring/web";
import { ygopro } from "@/api";
import { type CardType, isMe } from "@/stores";
import { matConfig } from "../../utils";
import { SpringApi } from "./types";
import { asyncStart } from "./utils";
const {
......
import { isMe, type CardType } from "@/stores";
import { SpringApi } from "./types";
import { matConfig } from "../../utils";
import { ygopro } from "@/api";
import { easings } from "@react-spring/web";
import { ygopro } from "@/api";
import { type CardType, isMe } from "@/stores";
import { matConfig } from "../../utils";
import { SpringApi } from "./types";
import { asyncStart } from "./utils";
const {
......
import { isMe, type CardType, cardStore } from "@/stores";
import { SpringApi } from "./types";
import { matConfig } from "../../utils";
import { ygopro } from "@/api";
import { easings } from "@react-spring/web";
import { ygopro } from "@/api";
import { cardStore, type CardType, isMe } from "@/stores";
import { matConfig } from "../../utils";
import { SpringApi } from "./types";
import { asyncStart } from "./utils";
const {
......
import { isMe, type CardType } from "@/stores";
import { SpringApi } from "./types";
import { matConfig } from "../../utils";
import { ygopro } from "@/api";
import { easings } from "@react-spring/web";
import { ygopro } from "@/api";
import { type CardType, isMe } from "@/stores";
import { matConfig } from "../../utils";
import { SpringApi } from "./types";
import { asyncStart } from "./utils";
const {
......
import { type SpringValue, type SpringRef } from "@react-spring/web";
import { type SpringRef, type SpringValue } from "@react-spring/web";
export type SpringApi = SpringRef<{
x: number;
......
import { type SpringRef, type SpringConfig } from "@react-spring/web";
import { type SpringConfig, type SpringRef } from "@react-spring/web";
export const asyncStart = <T extends {}>(api: SpringRef<T>) => {
return (p: Partial<T> & { config: SpringConfig }) =>
......
import type { FC, PropsWithChildren } from "react";
import "./index.scss";
import { Bg } from "../Bg";
import { Card } from "../Card";
import { type CSSConfig, toCssProperties, matConfig } from "../utils";
import type { FC, PropsWithChildren } from "react";
import { useSnapshot } from "valtio";
import { cardStore } from "@/stores";
import { useSnapshot } from "valtio";
import { Bg } from "../Bg";
import { Card } from "../Card";
import { type CSSConfig, matConfig, toCssProperties } from "../utils";
// 后面再改名
export const Mat: FC = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment