From 6e824d70690976bb29df8fa44fa56a2ab9d29319 Mon Sep 17 00:00:00 2001 From: littlefean <2028140990@qq.com> Date: Mon, 9 Dec 2024 15:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E4=BF=AE=E5=A4=8Deslint?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/algorithm/random.tsx | 2 +- .../stageManager/concreteMethods/StageNodeTextTransfer.tsx | 1 + src/pages/_toolbar.tsx | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/algorithm/random.tsx b/src/core/algorithm/random.tsx index c710d2e..0901fbe 100644 --- a/src/core/algorithm/random.tsx +++ b/src/core/algorithm/random.tsx @@ -20,7 +20,7 @@ export namespace Random { * @param lambda 泊松分布参数 */ export function poissonRandom(lambda: number): number { - let L = Math.exp(-lambda); + const L = Math.exp(-lambda); let p = 1.0; let k = 0; do { diff --git a/src/core/stage/stageManager/concreteMethods/StageNodeTextTransfer.tsx b/src/core/stage/stageManager/concreteMethods/StageNodeTextTransfer.tsx index 3fcdc27..838112a 100644 --- a/src/core/stage/stageManager/concreteMethods/StageNodeTextTransfer.tsx +++ b/src/core/stage/stageManager/concreteMethods/StageNodeTextTransfer.tsx @@ -11,6 +11,7 @@ export namespace StageNodeTextTransfer { }, 1000); } catch (e) { node.rename("Error"); + console.error(e); } } } diff --git a/src/pages/_toolbar.tsx b/src/pages/_toolbar.tsx index f6ed1ef..56673f6 100644 --- a/src/pages/_toolbar.tsx +++ b/src/pages/_toolbar.tsx @@ -434,6 +434,7 @@ const onSaveSelectedNew = async () => { path, content: JSON.stringify(data, null, 2), }) + // eslint-disable-next-line @typescript-eslint/no-unused-vars .then((_) => { Stage.effects.push(new ViewFlashEffect(Color.Black)); }) @@ -474,6 +475,7 @@ async function openBrowserOrFile() { function myOpen(url: string) { open(url) + // eslint-disable-next-line @typescript-eslint/no-unused-vars .then((_) => {}) .catch((e) => { // 依然会导致程序崩溃,具体原因未知