From 2696a635db6843e21be3d21fb75ff23d0e32216a Mon Sep 17 00:00:00 2001 From: Kuizuo Date: Thu, 4 Jan 2024 03:59:34 +0800 Subject: [PATCH] chore: lint fix (#47) --- apps/playground/src/App.tsx | 2 +- apps/playground/src/components/DirectoryNode.tsx | 2 +- apps/playground/src/components/FileNode.tsx | 2 +- apps/playground/src/context/DeobfuscateContext.tsx | 5 +++-- apps/playground/src/webcrack.worker.ts | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/playground/src/App.tsx b/apps/playground/src/App.tsx index 46c415e2..4619dfba 100644 --- a/apps/playground/src/App.tsx +++ b/apps/playground/src/App.tsx @@ -6,7 +6,7 @@ import MonacoEditor from './components/MonacoEditor'; import Sidebar from './components/Sidebar'; import Tab from './components/Tab'; import { DeobfuscateContextProvider } from './context/DeobfuscateContext'; -import { DeobfuscateResult } from './webcrack.worker'; +import type { DeobfuscateResult } from './webcrack.worker'; export const [settings, setSettings] = createStore({ deobfuscate: true, diff --git a/apps/playground/src/components/DirectoryNode.tsx b/apps/playground/src/components/DirectoryNode.tsx index efcfe7f7..39afd8eb 100644 --- a/apps/playground/src/components/DirectoryNode.tsx +++ b/apps/playground/src/components/DirectoryNode.tsx @@ -1,6 +1,6 @@ import { For, Show } from 'solid-js'; import FileNode from './FileNode'; -import { TreeNode } from './FileTree'; +import type { TreeNode } from './FileTree'; interface Props extends TreeNode { onFileClick?: (node: TreeNode) => void; diff --git a/apps/playground/src/components/FileNode.tsx b/apps/playground/src/components/FileNode.tsx index 06df1f5b..56409a20 100644 --- a/apps/playground/src/components/FileNode.tsx +++ b/apps/playground/src/components/FileNode.tsx @@ -1,4 +1,4 @@ -import { TreeNode } from './FileTree'; +import type { TreeNode } from './FileTree'; interface Props extends TreeNode { onClick?: () => void; diff --git a/apps/playground/src/context/DeobfuscateContext.tsx b/apps/playground/src/context/DeobfuscateContext.tsx index eea809de..f78be626 100644 --- a/apps/playground/src/context/DeobfuscateContext.tsx +++ b/apps/playground/src/context/DeobfuscateContext.tsx @@ -1,7 +1,8 @@ -import { ParentProps, createContext, createSignal, useContext } from 'solid-js'; +import type { ParentProps} from 'solid-js'; +import { createContext, createSignal, useContext } from 'solid-js'; import type { Options } from 'webcrack'; import { evalCode } from '../sandbox'; -import { +import type { DeobfuscateResult, WorkerRequest, WorkerResponse, diff --git a/apps/playground/src/webcrack.worker.ts b/apps/playground/src/webcrack.worker.ts index 4897fbbe..0c6e7814 100644 --- a/apps/playground/src/webcrack.worker.ts +++ b/apps/playground/src/webcrack.worker.ts @@ -1,4 +1,5 @@ -import { Options, Sandbox, webcrack } from 'webcrack'; +import type { Options, Sandbox} from 'webcrack'; +import { webcrack } from 'webcrack'; export type WorkerRequest = | { type: 'deobfuscate'; code: string; options: Options }