refactor: skipLibCheck

This commit is contained in:
kunish 2023-09-03 20:23:02 +08:00
parent 1f8efbc869
commit b4739d6dba
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
8 changed files with 14 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea
node_modules
dist

View File

@ -26,7 +26,7 @@ export const App = () => {
createEffect(() => {
if (selectedEndpoint() && endpoint()) {
useProxies().updateProxies()
void useProxies().updateProxies()
}
})
@ -48,7 +48,7 @@ export const App = () => {
<Show when={selectedEndpoint()}>
<Route path={ROUTES.Overview} component={Overview} />
<Route path={ROUTES.Proxies} component={Proxies} />
<Route path={ROUTES.Proxyprovider} component={ProxyProvider} />
<Route path={ROUTES.ProxyProvider} component={ProxyProvider} />
<Route path={ROUTES.Rules} component={Rules} />
<Route path={ROUTES.Conns} component={Connections} />
<Route path={ROUTES.Log} component={Logs} />

View File

@ -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: <IconGlobeFilled />,
})

View File

@ -36,7 +36,7 @@ export const themes = [
export enum ROUTES {
Overview = '/overview',
Proxies = '/proxies',
Proxyprovider = '/proxyprovider',
ProxyProvider = '/proxyprovider',
Rules = '/rules',
Conns = '/conns',
Log = '/logs',

View File

@ -308,7 +308,7 @@ export default () => {
<td
onContextMenu={(e) => {
e.preventDefault()
writeClipboard(cell.renderValue() as string)
void writeClipboard(cell.renderValue() as string)
}}
>
{flexRender(

View File

@ -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)
}}
/>
)

View File

@ -19,7 +19,7 @@ const [proxyNodeMap, setProxyNodeMap] = createSignal<Record<string, ProxyInfo>>(
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<string, ProxyProvider> }>()
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()
}

View File

@ -1,6 +1,7 @@
{
"compilerOptions": {
"strict": true,
"skipLibCheck": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",