Skip to content

Commit 90a5afd

Browse files
committed
Fixed port forwarding and eslint env settings
1 parent 20f7320 commit 90a5afd

12 files changed

Lines changed: 13 additions & 26 deletions

File tree

backend/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func AuthMiddleware() gin.HandlerFunc {
104104
userID := c.GetHeader("X-User-ID")
105105
if userID == "" {
106106
// テスト用のダミーユーザーID (実際の認証基盤実装時に置き換える)
107-
userID = "test-user-uuid-12345"
107+
userID = "user-test-123"
108108
log.Printf("Warning: X-User-ID header not found, using default test user ID: %s", userID)
109109
}
110110
c.Set("userID", userID)

frontend/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ export default [
4040
'prettier/prettier': 'error',
4141
'@typescript-eslint/no-unused-vars': 'warn',
4242
},
43+
env: { browser: true, es2020: true },
4344
},
4445
];

frontend/src/components/common/atoms/Input.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ const StyledInput = styled.input`
2020
`;
2121

2222
const Input = forwardRef<
23-
// TODO: Remove eslint-disable-next-line after refactoring
24-
// eslint-disable-next-line no-undef
2523
HTMLInputElement,
26-
// eslint-disable-next-line no-undef
2724
InputHTMLAttributes<HTMLInputElement>
2825
>((props, ref) => <StyledInput {...props} ref={ref} />);
2926

frontend/src/components/common/atoms/Textarea.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ const StyledTextarea = styled.textarea`
2121
`;
2222

2323
const Textarea = forwardRef<
24-
// TODO: Remove eslint-disable-next-line after refactoring
25-
// eslint-disable-next-line no-undef
2624
HTMLTextAreaElement,
27-
// eslint-disable-next-line no-undef
2825
TextareaHTMLAttributes<HTMLTextAreaElement>
2926
>((props, ref) => <StyledTextarea {...props} ref={ref} />);
3027

frontend/src/components/complexes/organisms/ComplexCard.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,10 @@ const ActionsWrapper = styled.div`
7070
margin-top: auto; /* Pushes actions to the bottom */
7171
`;
7272

73-
// TODO: Remove eslint-disable-next-line after refactoring
7473
interface ComplexCardProps {
7574
complex: Complex;
76-
// eslint-disable-next-line no-unused-vars
7775
onViewGoals: (id: number) => void;
78-
// eslint-disable-next-line no-unused-vars
7976
onEdit: (id: number) => void;
80-
// eslint-disable-next-line no-unused-vars
8177
onDelete: (id: number) => void;
8278
animationDelay: number;
8379
}

frontend/src/components/complexes/organisms/ComplexList.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ const ListWrapper = styled.div`
1212

1313
interface ComplexListProps {
1414
complexes: Complex[];
15-
// eslint-disable-next-line no-unused-vars
1615
onViewGoals: (id: number) => void;
17-
// eslint-disable-next-line no-unused-vars
1816
onEdit: (id: number) => void;
19-
// eslint-disable-next-line no-unused-vars
2017
onDelete: (id: number) => void;
2118
onAddNewComplex: () => void; // For NoComplexesMessage
2219
}

frontend/src/i18n.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ i18n
2121
.init({
2222
resources,
2323
fallbackLng: 'ja', // デフォルトの言語
24-
// eslint-disable-next-line no-undef
2524
debug: process.env.NODE_ENV === 'development', // 開発モード時のみデバッグ情報を出力
2625

2726
interpolation: {

frontend/src/pages/ComplexFormPage.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,10 @@ const ComplexFormPage: React.FC = () => {
6565
mutationFn: createComplex,
6666
onSuccess: () => {
6767
queryClient.invalidateQueries({ queryKey: ['complexes'] }); // コンプレックス一覧キャッシュを無効化
68-
// eslint-disable-next-line no-undef
6968
alert(t('complexForm.successMessage')); // 成功メッセージ
7069
navigate('/'); // 一覧ページへ遷移
7170
},
7271
onError: (error) => {
73-
// eslint-disable-next-line no-undef
7472
alert(`${t('complexForm.errorMessage')}: ${error.message}`); // エラーメッセージ
7573
},
7674
});

frontend/src/pages/ComplexesPage.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ const ComplexesPage: React.FC = () => {
7070
mutationFn: deleteComplex,
7171
onSuccess: () => {
7272
queryClient.invalidateQueries({ queryKey: ['complexes'] }); // キャッシュを無効化して再フェッチ
73-
// eslint-disable-next-line no-undef
7473
alert(t('deleteConfirmation', { id: '' }).replace('{{id}} ', '')); // 実際には削除されたIDを渡す
7574
},
7675
onError: (err) => {
77-
// eslint-disable-next-line no-undef
7876
alert(`削除に失敗しました: ${err.message}`);
7977
},
8078
});
@@ -87,14 +85,12 @@ const ComplexesPage: React.FC = () => {
8785
const handleViewGoals = (id: number) => {
8886
console.log(`目標を見る/設定: Complex ID ${id}`);
8987
// TODO: React Routerを使用して目標設定ページへ遷移
90-
// eslint-disable-next-line no-undef
9188
alert(t('viewSetGoalsButton') + ` (ID: ${id}) 画面へ(未実装)`);
9289
};
9390

9491
const handleEditComplex = (id: number) => {
9592
console.log(`編集: Complex ID ${id}`);
9693
// TODO: React Routerを使用して編集ページへ遷移
97-
// eslint-disable-next-line no-undef
9894
alert(t('editButton') + ` (ID: ${id}) 画面へ(未実装)`);
9995
};
10096

frontend/src/services/api.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Complex, ComplexInput } from '../types/complex';
22

33
// 仮のユーザーID (認証基盤実装時に置き換える)
4-
const DUMMY_USER_ID = 'test-user-uuid-12345';
4+
const DUMMY_USER_ID = 'user-test-123';
55

66
const API_BASE_URL = '/api/v1';
77

@@ -12,7 +12,6 @@ const getAuthHeaders = () => ({
1212

1313
/* コンプレックス一覧取得 */
1414
export const fetchComplexes = async (): Promise<Complex[]> => {
15-
// eslint-disable-next-line no-undef
1615
const response = await fetch(`${API_BASE_URL}/complexes`, {
1716
headers: getAuthHeaders(),
1817
});
@@ -22,7 +21,6 @@ export const fetchComplexes = async (): Promise<Complex[]> => {
2221

2322
/* 新しいコンプレックスを登録 */
2423
export const createComplex = async (data: ComplexInput): Promise<Complex> => {
25-
// eslint-disable-next-line no-undef
2624
const response = await fetch(`${API_BASE_URL}/complexes`, {
2725
method: 'POST',
2826
headers: getAuthHeaders(),
@@ -34,7 +32,6 @@ export const createComplex = async (data: ComplexInput): Promise<Complex> => {
3432

3533
// コンプレックス削除 (ComplexesPage.tsxで使用していたダミー関数を置き換え)
3634
export const deleteComplex = async (id: number): Promise<void> => {
37-
// eslint-disable-next-line no-undef
3835
const response = await fetch(`${API_BASE_URL}/complexes/${id}`, {
3936
method: 'DELETE',
4037
headers: getAuthHeaders(),

0 commit comments

Comments
 (0)