From 6e66f3995e055235b5efc12fa0d0daec282e2b36 Mon Sep 17 00:00:00 2001 From: yamanoku <0910yama@gmail.com> Date: Wed, 17 Apr 2024 01:16:55 +0900 Subject: [PATCH] =?UTF-8?q?noAssignInExpressions=E3=82=92OFF=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=A6hours=E3=82=92=E5=86=8D=E4=BB=A3=E5=85=A5?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/islands/counter.tsx | 4 ++-- app/routes/index.tsx | 4 ++-- biome.json | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/islands/counter.tsx b/app/islands/counter.tsx index 3e91a80f..c4420786 100644 --- a/app/islands/counter.tsx +++ b/app/islands/counter.tsx @@ -32,8 +32,8 @@ export default function Counter(props: InitialTime) { ); const days = Math.floor(diffInSeconds / (60 * 60 * 24)); // hoursを日本時間の24時間計算になるようにする - const hours = Math.floor((diffInSeconds / (60 * 60)) % 24) - 9; - hours < 0 ? hours + 24 : hours; + let hours = Math.floor((diffInSeconds / (60 * 60)) % 24) - 9; + hours < 0 ? (hours = hours + 24) : hours; const minutes = Math.floor((diffInSeconds / 60) % 60); const seconds = diffInSeconds % 60; diff --git a/app/routes/index.tsx b/app/routes/index.tsx index d716a014..90f0ad57 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -14,8 +14,8 @@ export default function Index() { const diffInSeconds = Math.floor((Number(nextBirthday) - Number(now)) / 1000); const days = Math.floor(diffInSeconds / (60 * 60 * 24)); // hoursを日本時間の24時間計算になるようにする - const hours = Math.floor((diffInSeconds / (60 * 60)) % 24) - 9; - hours < 0 ? hours + 24 : hours; + let hours = Math.floor((diffInSeconds / (60 * 60)) % 24) - 9; + hours < 0 ? (hours = hours + 24) : hours; const minutes = Math.floor((diffInSeconds / 60) % 60); const seconds = diffInSeconds % 60; diff --git a/biome.json b/biome.json index 3ab017cf..54968582 100644 --- a/biome.json +++ b/biome.json @@ -23,7 +23,10 @@ "linter": { "enabled": true, "rules": { - "recommended": true + "recommended": true, + "suspicious": { + "noAssignInExpressions": "off" + } } } }