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" + } } } }