chore(format): add prettier-plugin-organize-imports and sort imports

This commit is contained in:
zetaloop
2026-02-25 15:34:33 +08:00
parent d4a0765cad
commit 2d42473910
88 changed files with 266 additions and 246 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from "zustand"
import type { User, UserRole, VerificationStatus } from "@/lib/types"
import { create } from "zustand"
interface NotificationPrefs {
order: boolean
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockChatMessages, mockChatSessions, mockUsers } from "@/lib/mock"
import type { ChatMessage, ChatSession, Order } from "@/lib/types"
import { create } from "zustand"
interface ChatState {
sessions: ChatSession[]
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockComments } from "@/lib/mock"
import type { Comment, User } from "@/lib/types"
import { create } from "zustand"
interface CommentState {
comments: Comment[]
+4 -4
View File
@@ -1,14 +1,14 @@
import { create } from "zustand"
import { DISPUTE_TO_RESOLVED_MS, DISPUTE_TO_REVIEWING_MS } from "@/lib/config/demo-timers"
import { generateId } from "@/lib/id"
import { allow, deny } from "@/lib/policy/assert"
import type { Actor } from "@/lib/policy/actor"
import type { PolicyDecision } from "@/lib/policy/decision"
import { mockDisputes } from "@/lib/mock"
import type { Actor } from "@/lib/policy/actor"
import { allow, deny } from "@/lib/policy/assert"
import type { PolicyDecision } from "@/lib/policy/decision"
import type { Dispute } from "@/lib/types"
import { useAuthStore } from "@/store/auth"
import { useNotificationStore } from "@/store/notifications"
import { useOrderStore } from "@/store/orders"
import { create } from "zustand"
type DisputeTimelineType = "created" | "response" | "reviewing" | "resolved" | "appealed"
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockFavorites } from "@/lib/mock"
import type { Favorite } from "@/lib/types"
import { create } from "zustand"
interface FavoriteState {
favorites: Favorite[]
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockNotifications } from "@/lib/mock"
import type { Notification } from "@/lib/types"
import { create } from "zustand"
interface CreateNotificationInput {
type: Notification["type"]
+5 -5
View File
@@ -1,4 +1,3 @@
import { create } from "zustand"
import {
ORDER_ACCEPT_TIMEOUT_MS,
ORDER_CLOSE_TIMEOUT_MS,
@@ -6,16 +5,17 @@ import {
} from "@/lib/config/demo-timers"
import { evaluateOrderTransition, type OrderAction } from "@/lib/domain/order-machine"
import { generateId } from "@/lib/id"
import { allow, deny } from "@/lib/policy/assert"
import type { Actor } from "@/lib/policy/actor"
import type { PolicyDecision } from "@/lib/policy/decision"
import { mockOrders } from "@/lib/mock"
import type { Actor } from "@/lib/policy/actor"
import { allow, deny } from "@/lib/policy/assert"
import type { PolicyDecision } from "@/lib/policy/decision"
import type { Order, OrderStatus, PlayerService } from "@/lib/types"
import { useAuthStore } from "@/store/auth"
import { useChatStore } from "@/store/chat"
import { useNotificationStore } from "@/store/notifications"
import { useWalletStore } from "@/store/wallet"
import { useShopStore } from "@/store/shops"
import { useWalletStore } from "@/store/wallet"
import { create } from "zustand"
interface CreateOrderInput {
consumerId: string
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from "zustand"
import type { Player } from "@/lib/types"
import { create } from "zustand"
type PlayerStatus = Player["status"]
+1 -1
View File
@@ -1,6 +1,6 @@
import { create } from "zustand"
import { mockPlayers } from "@/lib/mock"
import type { Player } from "@/lib/types"
import { create } from "zustand"
interface PlayerState {
players: Player[]
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockPosts } from "@/lib/mock"
import type { Post, User, UserRole } from "@/lib/types"
import { create } from "zustand"
interface CreatePostInput {
author: User
+2 -2
View File
@@ -1,10 +1,10 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockReviews, mockUsers } from "@/lib/mock"
import { allow, deny } from "@/lib/policy/assert"
import type { PolicyDecision } from "@/lib/policy/decision"
import { mockReviews, mockUsers } from "@/lib/mock"
import type { Review } from "@/lib/types"
import { useOrderStore } from "@/store/orders"
import { create } from "zustand"
interface SubmitReviewInput {
orderId: string
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockServices } from "@/lib/mock"
import type { PlayerService } from "@/lib/types"
import { create } from "zustand"
interface ServiceState {
services: PlayerService[]
+1 -1
View File
@@ -1,6 +1,6 @@
import { create } from "zustand"
import { mockShops } from "@/lib/mock"
import type { Shop, ShopSection } from "@/lib/types"
import { create } from "zustand"
interface ShopState {
shops: Shop[]
+2 -2
View File
@@ -1,9 +1,9 @@
import { create } from "zustand"
import { calculateOrderIncome } from "@/lib/domain/income"
import { generateId } from "@/lib/id"
import { mockTransactions, walletBalance } from "@/lib/mock"
import { useShopStore } from "@/store/shops"
import type { WalletTransaction } from "@/lib/types"
import { useShopStore } from "@/store/shops"
import { create } from "zustand"
interface WalletState {
balance: number