From dd9194333e52afc5e4fd0ccafea7080ee82a2739 Mon Sep 17 00:00:00 2001 From: kagan Date: Sun, 9 Feb 2025 02:26:48 +0900 Subject: [PATCH] fix: fix ESLint errors --- src/components/ConsoleOutput.tsx | 3 +-- src/server/linter/index.mjs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/ConsoleOutput.tsx b/src/components/ConsoleOutput.tsx index 440b777..b5ea2f4 100644 --- a/src/components/ConsoleOutput.tsx +++ b/src/components/ConsoleOutput.tsx @@ -16,8 +16,7 @@ export const ConsoleOutput = forwardRef((_, ref) => { useEffect(() => { if (wrapperRef.current) { - // eslint-disable-next-line unicorn/prefer-global-this -- fix it later - const elementStyle = window.getComputedStyle(wrapperRef.current); + const elementStyle = globalThis.getComputedStyle(wrapperRef.current); const terminal = new Terminal({ theme: { background: elementStyle.backgroundColor, diff --git a/src/server/linter/index.mjs b/src/server/linter/index.mjs index df5985d..1e84e23 100644 --- a/src/server/linter/index.mjs +++ b/src/server/linter/index.mjs @@ -8,8 +8,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -// eslint-disable-next-line unicorn/text-encoding-identifier-case -- fix it later -const content = fs.readFileSync(path.resolve(__dirname, './constants.json'), { encoding: 'utf-8' }); +const content = fs.readFileSync(path.resolve(__dirname, './constants.json'), { encoding: 'utf8' }); const constants = JSON.parse(content); main();