[dep] update to eslint 9

This commit is contained in:
Purp1e
2024-11-11 10:04:00 +08:00
parent e308309fb8
commit b1d505fd6b
36 changed files with 353 additions and 218 deletions

View File

@@ -1,7 +1,7 @@
import { SteamUser } from '@/types/steam'
import { tauriStore } from '@/utils/persist'
import { create } from 'zustand'
import { persist, createJSONStorage } from 'zustand/middleware'
import type { SteamUser } from "@/types/steam"
import { tauriStore } from "@/utils/persist"
import { create } from "zustand"
import { createJSONStorage, persist } from "zustand/middleware"
const mock_user: SteamUser = {
steamID64: "76561198052315353",
@@ -14,20 +14,20 @@ const mock_user: SteamUser = {
}
interface SteamState {
dir: string,
csDir: string,
users: SteamUser[],
isDirValid: boolean,
isCsDirValid: boolean,
dir: string
csDir: string
users: SteamUser[]
isDirValid: boolean
isCsDirValid: boolean
}
interface SteamAction {
setDir: (dir: string) => void,
setCsDir: (dir: string) => void,
setUsers: (users: SteamUser[]) => void,
setIsDirValid: (valid: boolean) => void,
setIsCsDirValid: (valid: boolean) => void,
currentUser: () => SteamUser,
setDir: (dir: string) => void
setCsDir: (dir: string) => void
setUsers: (users: SteamUser[]) => void
setIsDirValid: (valid: boolean) => void
setIsCsDirValid: (valid: boolean) => void
currentUser: () => SteamUser
}
const STORE_NAME = "steam"
@@ -53,8 +53,8 @@ const useSteamStore = create<SteamState & SteamAction>()(
{
name: STORE_NAME, // name of item in the storage (must be unique)
storage: createJSONStorage(() => storage), // (optional) by default the 'localStorage' is used
}
)
},
),
)
export default useSteamStore
export default useSteamStore