Skip to content

Commit 0bcacb4

Browse files
committed
use @ as alias
1 parent c0b4853 commit 0bcacb4

16 files changed

Lines changed: 51 additions & 51 deletions

app/lib/game-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { eq, notInArray, sql } from "drizzle-orm";
22
import type { DrizzleD1Database } from "drizzle-orm/d1";
3-
import { gameState, haiyama, kyoku } from "~/lib/db/schema";
4-
import type { Hai } from "~/lib/hai/types";
5-
import { sortTehai } from "~/lib/hai/types";
6-
import type { GameState, GameStateRecord } from "~/lib/types";
3+
import { gameState, haiyama, kyoku } from "@/lib/db/schema";
4+
import type { Hai } from "@/lib/hai/types";
5+
import { sortTehai } from "@/lib/hai/types";
6+
import type { GameState, GameStateRecord } from "@/lib/types";
77

88
export async function getGameState(
99
db: DrizzleD1Database,

app/routes/_index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Link, useNavigate } from "react-router";
2-
import { authClient } from "~/lib/auth-client";
2+
import { authClient } from "@/lib/auth-client";
33
import github from "/github.svg";
44
import logo from "/logo.svg";
55

app/routes/api.agari.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { eq } from "drizzle-orm";
22
import { redirect } from "react-router";
3-
import { getAuth } from "~/lib/auth";
4-
import { getDB } from "~/lib/db";
5-
import { gameState } from "~/lib/db/schema";
6-
import { getGameState, recordKyoku, restartGame } from "~/lib/game-service";
7-
import judgeAgari from "~/lib/hai/agari";
8-
import { sortTehai } from "~/lib/hai/types";
9-
import { getAgariScoreDelta } from "~/lib/score";
3+
import { getAuth } from "@/lib/auth";
4+
import { getDB } from "@/lib/db";
5+
import { gameState } from "@/lib/db/schema";
6+
import { getGameState, recordKyoku, restartGame } from "@/lib/game-service";
7+
import judgeAgari from "@/lib/hai/agari";
8+
import { sortTehai } from "@/lib/hai/types";
9+
import { getAgariScoreDelta } from "@/lib/score";
1010
import type { Route } from "./+types/api.agari";
1111

1212
export async function action({ context, request }: Route.ActionArgs) {

app/routes/api.auth.$.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getAuth } from "~/lib/auth";
1+
import { getAuth } from "@/lib/auth";
22
import type { Route } from "./+types/api.auth.$";
33

44
async function handleAuth(

app/routes/api.ryukyoku.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { eq } from "drizzle-orm";
22
import { redirect } from "react-router";
3-
import { getAuth } from "~/lib/auth";
4-
import { getDB } from "~/lib/db";
5-
import { gameState } from "~/lib/db/schema";
6-
import { getGameState, recordKyoku, restartGame } from "~/lib/game-service";
7-
import { calculateShanten } from "~/lib/hai/shanten";
3+
import { getAuth } from "@/lib/auth";
4+
import { getDB } from "@/lib/db";
5+
import { gameState } from "@/lib/db/schema";
6+
import { getGameState, recordKyoku, restartGame } from "@/lib/game-service";
7+
import { calculateShanten } from "@/lib/hai/shanten";
88
import type { Route } from "./+types/api.ryukyoku";
99

1010
export async function action({ context, request }: Route.ActionArgs) {

app/routes/api.tedashi.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { redirect } from "react-router";
22
import { z } from "zod";
3-
import { getAuth } from "~/lib/auth";
4-
import { getDB } from "~/lib/db";
5-
import { getGameState, tedashi, toGameState } from "~/lib/game-service";
3+
import { getAuth } from "@/lib/auth";
4+
import { getDB } from "@/lib/db";
5+
import { getGameState, tedashi, toGameState } from "@/lib/game-service";
66
import type { Route } from "./+types/api.tedashi";
77

88
const tedashiSchema = z.object({

app/routes/api.tsumogiri.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { redirect } from "react-router";
2-
import { getAuth } from "~/lib/auth";
3-
import { getDB } from "~/lib/db";
4-
import { getGameState, toGameState, tsumogiri } from "~/lib/game-service";
2+
import { getAuth } from "@/lib/auth";
3+
import { getDB } from "@/lib/db";
4+
import { getGameState, toGameState, tsumogiri } from "@/lib/game-service";
55
import type { Route } from "./+types/api.tsumogiri";
66

77
export async function action({ context, request }: Route.ActionArgs) {

app/routes/gameover.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { desc, eq, sql } from "drizzle-orm";
22
import { useNavigate } from "react-router";
3-
import { getAuth } from "~/lib/auth";
4-
import { authClient } from "~/lib/auth-client";
5-
import { getDB } from "~/lib/db";
6-
import { kyoku } from "~/lib/db/schema";
3+
import { getAuth } from "@/lib/auth";
4+
import { authClient } from "@/lib/auth-client";
5+
import { getDB } from "@/lib/db";
6+
import { kyoku } from "@/lib/db/schema";
77
import type { Route } from "./+types/gameover";
88

99
export interface GameOverData {

app/routes/play.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { type ShouldRevalidateFunctionArgs, useFetcher } from "react-router";
2-
import { getAuth } from "~/lib/auth";
3-
import { getDB } from "~/lib/db";
2+
import { getAuth } from "@/lib/auth";
3+
import { getDB } from "@/lib/db";
44
import {
55
getGameState,
66
getRandomHaiyama,
77
initGame,
88
toGameState,
9-
} from "~/lib/game-service";
10-
import judgeAgari from "~/lib/hai/agari";
11-
import { calculateShanten } from "~/lib/hai/shanten";
12-
import type { Hai } from "~/lib/hai/types";
13-
import { sortTehai } from "~/lib/hai/types";
14-
import { getAgariScoreDelta } from "~/lib/score";
15-
import type { GameState } from "~/lib/types";
9+
} from "@/lib/game-service";
10+
import judgeAgari from "@/lib/hai/agari";
11+
import { calculateShanten } from "@/lib/hai/shanten";
12+
import type { Hai } from "@/lib/hai/types";
13+
import { sortTehai } from "@/lib/hai/types";
14+
import { getAgariScoreDelta } from "@/lib/score";
15+
import type { GameState } from "@/lib/types";
1616
import type { Route } from "./+types/play";
1717
import { AgariModal } from "./play/AgariModal";
1818
import { computeOptimisticGameState } from "./play/computeOptimisticGameState";

app/routes/play/AgariModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FetcherWithComponents } from "react-router";
2-
import type { Hai } from "~/lib/hai/types";
3-
import { haiToIndex, indexToHai } from "~/lib/hai/types";
2+
import type { Hai } from "@/lib/hai/types";
3+
import { haiToIndex, indexToHai } from "@/lib/hai/types";
44
import { getHaiKey } from "./utils";
55

66
type AgariDetail =

0 commit comments

Comments
 (0)