From b4739d6dbab3150bcfff509147f7e079022204bf Mon Sep 17 00:00:00 2001 From: kunish Date: Sun, 3 Sep 2023 20:23:02 +0800 Subject: [PATCH] refactor: skipLibCheck --- .gitignore | 1 + src/App.tsx | 4 ++-- src/components/Header.tsx | 2 +- src/constants/index.ts | 2 +- src/pages/Connections.tsx | 2 +- src/pages/Proxies.tsx | 6 +++--- src/signals/proxies.ts | 8 ++++---- tsconfig.json | 1 + 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 76add87..76fb2e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.idea node_modules dist \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 131ff04..edfe558 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -26,7 +26,7 @@ export const App = () => { createEffect(() => { if (selectedEndpoint() && endpoint()) { - useProxies().updateProxies() + void useProxies().updateProxies() } }) @@ -48,7 +48,7 @@ export const App = () => { - + diff --git a/src/components/Header.tsx b/src/components/Header.tsx index e74d379..6ebfb3a 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -103,7 +103,7 @@ export const Header = () => { if (proxyProviders().length > 0) { list.splice(2, 0, { - href: ROUTES.Proxyprovider, + href: ROUTES.ProxyProvider, name: t('proxyProviders'), icon: , }) diff --git a/src/constants/index.ts b/src/constants/index.ts index c05cf15..8caf07f 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -36,7 +36,7 @@ export const themes = [ export enum ROUTES { Overview = '/overview', Proxies = '/proxies', - Proxyprovider = '/proxyprovider', + ProxyProvider = '/proxyprovider', Rules = '/rules', Conns = '/conns', Log = '/logs', diff --git a/src/pages/Connections.tsx b/src/pages/Connections.tsx index 56c2cce..8dfcd87 100644 --- a/src/pages/Connections.tsx +++ b/src/pages/Connections.tsx @@ -308,7 +308,7 @@ export default () => { { e.preventDefault() - writeClipboard(cell.renderValue() as string) + void writeClipboard(cell.renderValue() as string) }} > {flexRender( diff --git a/src/pages/Proxies.tsx b/src/pages/Proxies.tsx index d64808e..54d93ed 100644 --- a/src/pages/Proxies.tsx +++ b/src/pages/Proxies.tsx @@ -1,6 +1,6 @@ import { useI18n } from '@solid-primitives/i18n' import { IconBrandSpeedtest } from '@tabler/icons-solidjs' -import { Show, createSignal } from 'solid-js' +import { createSignal, Show } from 'solid-js' import { Button, Collapse, @@ -26,7 +26,7 @@ export default () => { ) const onProxyNodeClick = async (proxy: Proxy, proxyName: string) => { - setProxyGroupByProxyName(proxy, proxyName) + void setProxyGroupByProxyName(proxy, proxyName) } const onSpeedTestClick = async (e: MouseEvent, name: string) => { @@ -79,7 +79,7 @@ export default () => { proxyNames={sortedProxyNames} now={proxy.now} onClick={(name) => { - onProxyNodeClick(proxy, name) + void onProxyNodeClick(proxy, name) }} /> ) diff --git a/src/signals/proxies.ts b/src/signals/proxies.ts index 0c09df9..5a79f76 100644 --- a/src/signals/proxies.ts +++ b/src/signals/proxies.ts @@ -19,7 +19,7 @@ const [proxyNodeMap, setProxyNodeMap] = createSignal>( export const useProxies = () => { const request = useRequest() - const setProxyInfoByProixes = (proxies: Proxy[] | ProxyNode[]) => { + const setProxyInfoByProxies = (proxies: Proxy[] | ProxyNode[]) => { proxies.forEach((proxy) => { const latency = proxy.history.at(-1)?.delay || -1 @@ -44,7 +44,7 @@ export const useProxies = () => { .json<{ providers: Record }>() Object.values(providers).forEach((provider) => { - setProxyInfoByProixes(provider.proxies) + setProxyInfoByProxies(provider.proxies) }) setProxyProviders( @@ -60,7 +60,7 @@ export const useProxies = () => { const sortIndex = [...(proxies['GLOBAL'].all ?? []), 'GLOBAL'] const proxiesArray = Object.values(proxies) - setProxyInfoByProixes(proxiesArray) + setProxyInfoByProxies(proxiesArray) setProxies( proxiesArray .filter((proxy) => proxy.all?.length) @@ -122,7 +122,7 @@ export const useProxies = () => { const healthCheckByProviderName = async (providerName: string) => { await request.get(`providers/proxies/${providerName}/healthcheck`, { - timeout: 30 * 1000, // thie api is a little bit slow sometimes... + timeout: 30 * 1000, // this api is a little bit slow sometimes... }) await updateProxies() } diff --git a/tsconfig.json b/tsconfig.json index 317af43..1d4858a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "strict": true, + "skipLibCheck": true, "target": "ESNext", "module": "ESNext", "moduleResolution": "node",