Skip to content

Commit 9c68e84

Browse files
committed
fix: resolve all linter warnings and improve code quality
1 parent 1cd5682 commit 9c68e84

5 files changed

Lines changed: 463 additions & 468 deletions

File tree

apps/api/src/services/audio.service.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { ERROR_CODES } from "@sonory/shared-types";
22
import type { AudioMetadata, AudioUploadResult } from "@sonory/shared-types";
3-
import type { SupabaseClient } from "@supabase/supabase-js";
4-
import type { Context } from "hono";
53
import { APIException } from "../middleware/error";
6-
import { logger } from "../utils/logger";
74
import { BaseService } from "./base.service";
85
import { getSupabaseAdmin } from "./supabase";
96

apps/web/src/components/organisms/MapComponent/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ export function useMapComponent({
327327
});
328328

329329
// マップ初期化(一度だけ実行、依存関係は意図的に除外)
330-
// biome-ignore lint/correctness/useExhaustiveDependencies: Map should only initialize once
330+
// biome-ignore lint/correctness/useExhaustiveDependencies: Map should only initialize once to prevent recreation
331331
useEffect(() => {
332332
if (!mapContainerRef.current || mapInitializedRef.current) return;
333333

apps/web/src/components/organisms/MapComponent/hooks/useMapControls.ts

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -10,95 +10,95 @@
1010
* @returns キーボード制御の状態
1111
*/
1212

13-
import type mapboxgl from 'mapbox-gl'
14-
import { useEffect } from 'react'
13+
import type mapboxgl from "mapbox-gl";
14+
import { useEffect } from "react";
1515

1616
export type UseMapKeyboardShortcutsProps = {
17-
/** Mapboxマップインスタンス */
18-
map: mapboxgl.Map | null
19-
/** デバッグモードの状態 */
20-
debugMode: boolean
21-
/** デバッグモード切り替えのコールバック */
22-
onToggleDebugMode: () => void
23-
/** 位置情報再取得のコールバック */
24-
onGeolocationRetry: () => void
25-
/** 位置情報キャッシュクリア&再取得のコールバック */
26-
onGeolocationReset: () => void
27-
/** デバッグ時間変更のコールバック */
28-
onDebugTimeChange: (time: number | null) => void
29-
/** ライティング更新のコールバック */
30-
onUpdateLighting: () => void
31-
}
17+
/** Mapboxマップインスタンス */
18+
map: mapboxgl.Map | null;
19+
/** デバッグモードの状態 */
20+
debugMode: boolean;
21+
/** デバッグモード切り替えのコールバック */
22+
onToggleDebugMode: () => void;
23+
/** 位置情報再取得のコールバック */
24+
onGeolocationRetry: () => void;
25+
/** 位置情報キャッシュクリア&再取得のコールバック */
26+
onGeolocationReset: () => void;
27+
/** デバッグ時間変更のコールバック */
28+
onDebugTimeChange: (time: number | null) => void;
29+
/** ライティング更新のコールバック */
30+
onUpdateLighting: () => void;
31+
};
3232

3333
/**
3434
* マップ用キーボードショートカットフック
3535
*/
3636
export function useMapControls({
37-
map,
38-
debugMode,
39-
onToggleDebugMode,
40-
onGeolocationRetry,
41-
onGeolocationReset,
42-
onDebugTimeChange,
43-
onUpdateLighting,
37+
map: _map,
38+
debugMode,
39+
onToggleDebugMode,
40+
onGeolocationRetry,
41+
onGeolocationReset,
42+
onDebugTimeChange,
43+
onUpdateLighting,
4444
}: UseMapKeyboardShortcutsProps): void {
45-
useEffect(() => {
46-
const handleKeyDown = (e: KeyboardEvent): void => {
47-
// Shift + D でデバッグモード切り替え
48-
if (e.shiftKey && e.key === 'D') {
49-
onToggleDebugMode()
50-
}
45+
useEffect(() => {
46+
const handleKeyDown = (e: KeyboardEvent): void => {
47+
// Shift + D でデバッグモード切り替え
48+
if (e.shiftKey && e.key === "D") {
49+
onToggleDebugMode();
50+
}
5151

52-
// Shift + G で位置情報を再取得
53-
if (e.shiftKey && e.key === 'G') {
54-
e.preventDefault()
55-
onGeolocationRetry()
56-
}
52+
// Shift + G で位置情報を再取得
53+
if (e.shiftKey && e.key === "G") {
54+
e.preventDefault();
55+
onGeolocationRetry();
56+
}
5757

58-
// Shift + R で位置情報キャッシュをクリアして再取得
59-
if (e.shiftKey && e.key === 'R') {
60-
e.preventDefault()
61-
onGeolocationReset()
62-
}
58+
// Shift + R で位置情報キャッシュをクリアして再取得
59+
if (e.shiftKey && e.key === "R") {
60+
e.preventDefault();
61+
onGeolocationReset();
62+
}
6363

64-
// デバッグモード時の時間帯変更ショートカット
65-
if (debugMode) {
66-
// Shift + 1-4 で時間帯を変更
67-
if (e.shiftKey && ['1', '2', '3', '4'].includes(e.key)) {
68-
e.preventDefault()
69-
const timeMap: Record<string, number> = {
70-
'1': 6, // 朝 (dawn)
71-
'2': 12, // 昼 (day)
72-
'3': 18, // 夕方 (dusk)
73-
'4': 22, // 夜 (night)
74-
}
75-
const newTime = timeMap[e.key]
76-
if (newTime !== undefined) {
77-
onDebugTimeChange(newTime)
78-
onUpdateLighting()
79-
}
80-
}
64+
// デバッグモード時の時間帯変更ショートカット
65+
if (debugMode) {
66+
// Shift + 1-4 で時間帯を変更
67+
if (e.shiftKey && ["1", "2", "3", "4"].includes(e.key)) {
68+
e.preventDefault();
69+
const timeMap: Record<string, number> = {
70+
"1": 6, // 朝 (dawn)
71+
"2": 12, // 昼 (day)
72+
"3": 18, // 夕方 (dusk)
73+
"4": 22, // 夜 (night)
74+
};
75+
const newTime = timeMap[e.key];
76+
if (newTime !== undefined) {
77+
onDebugTimeChange(newTime);
78+
onUpdateLighting();
79+
}
80+
}
8181

82-
// Shift + 0 でデバッグ時間をリセット
83-
if (e.shiftKey && e.key === '0') {
84-
e.preventDefault()
85-
onDebugTimeChange(null)
86-
onUpdateLighting()
87-
}
88-
}
89-
}
82+
// Shift + 0 でデバッグ時間をリセット
83+
if (e.shiftKey && e.key === "0") {
84+
e.preventDefault();
85+
onDebugTimeChange(null);
86+
onUpdateLighting();
87+
}
88+
}
89+
};
9090

91-
window.addEventListener('keydown', handleKeyDown)
91+
window.addEventListener("keydown", handleKeyDown);
9292

93-
return () => {
94-
window.removeEventListener('keydown', handleKeyDown)
95-
}
96-
}, [
97-
debugMode,
98-
onToggleDebugMode,
99-
onGeolocationRetry,
100-
onGeolocationReset,
101-
onDebugTimeChange,
102-
onUpdateLighting,
103-
])
93+
return () => {
94+
window.removeEventListener("keydown", handleKeyDown);
95+
};
96+
}, [
97+
debugMode,
98+
onToggleDebugMode,
99+
onGeolocationRetry,
100+
onGeolocationReset,
101+
onDebugTimeChange,
102+
onUpdateLighting,
103+
]);
104104
}

0 commit comments

Comments
 (0)