From b2213cdf9073f42a1532b2886e03554cdede2a07 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Fri, 24 May 2024 19:09:19 +0800 Subject: [PATCH] fix: lint issue --- dprint.json | 10 +++++----- package.json | 2 +- src/components/audio.tsx | 2 +- src/components/preferences.tsx | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dprint.json b/dprint.json index 9d51f9ca..df4ffd4a 100644 --- a/dprint.json +++ b/dprint.json @@ -10,10 +10,10 @@ "build" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.88.9.wasm", - "https://plugins.dprint.dev/json-0.19.1.wasm", - "https://plugins.dprint.dev/markdown-0.16.3.wasm", - "https://plugins.dprint.dev/g-plane/malva-v0.1.4.wasm", - "https://plugins.dprint.dev/g-plane/markup_fmt-v0.3.1.wasm" + "https://plugins.dprint.dev/typescript-0.90.5.wasm", + "https://plugins.dprint.dev/json-0.19.2.wasm", + "https://plugins.dprint.dev/markdown-0.17.0.wasm", + "https://plugins.dprint.dev/g-plane/malva-v0.4.0.wasm", + "https://plugins.dprint.dev/g-plane/markup_fmt-v0.8.0.wasm" ] } diff --git a/package.json b/package.json index 8ae472e2..2b24af7f 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build": "vite build", "fix:fmt": "dprint fmt", "check:fmt": "dprint check", - "check:lint": "oxlint src -D correctness -D pedantic" + "check:lint": "oxlint src -D correctness -W pedantic" }, "imports": { "#const/*": "./src/const/*" diff --git a/src/components/audio.tsx b/src/components/audio.tsx index af8d8330..fb8e9ceb 100644 --- a/src/components/audio.tsx +++ b/src/components/audio.tsx @@ -80,7 +80,7 @@ const TimeLine: React.FC<{ duration: number; paused: boolean }> = ({ duration, p const value = ev.target.value; rafId.current = requestAnimationFrame(() => { - const time = Number.parseInt(value, 0); + const time = Number.parseInt(value, 10); setCurrentTime(time); audioRef.currentTime = time; }); diff --git a/src/components/preferences.tsx b/src/components/preferences.tsx index e4ce5641..7df04887 100644 --- a/src/components/preferences.tsx +++ b/src/components/preferences.tsx @@ -73,7 +73,8 @@ export const Preferences: React.FC = () => { } if (value.length === 3) { - value = [].map.call(value, (v: string) => v + v).join(""); + const [r, g, b] = value; + value = r + r + g + g + b + b; } if (value.length < 6) { value = value.padEnd(6, "0");