diff --git a/package.json b/package.json index d0db45acf..7aaad2da2 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "vite", "build": "vite build", "serve": "vite preview", - "pretty": "prettier --write 'src/**/*.{js,scss,ts,tsx,md}'", + "pretty": "prettier --log-level warn --write 'src/**/*.{js,scss,ts,tsx,md}'", "fmt": "pnpm lint && pnpm pretty" }, "browserslist": [ diff --git a/src/api/mock.ts b/src/api/mock.ts index 9ab8db9a6..eb8284fc5 100644 --- a/src/api/mock.ts +++ b/src/api/mock.ts @@ -12,7 +12,7 @@ const MOCK_HANDLERS = [ key: 'GET/configs', enabled: false, handler: (_u: string, _i: RequestInit) => { - return apiError('{"name": "hello"}') + return apiError('{"name": "hello"}'); // return json(makeConfig()); }, }, diff --git a/src/components/backend/BackendList.tsx b/src/components/backend/BackendList.tsx index b0118b9f5..5aa0b2cab 100644 --- a/src/components/backend/BackendList.tsx +++ b/src/components/backend/BackendList.tsx @@ -8,7 +8,7 @@ import { toast } from 'sonner'; import { req } from '$src/api/fetch'; import { useToggle } from '$src/hooks/basic'; import { getURLAndInit } from '$src/misc/request-helper'; -import { noop, sleep } from '$src/misc/utils'; +import { sleep } from '$src/misc/utils'; import { clashAPIConfigsAtom, findClashAPIConfigIndex, @@ -18,8 +18,6 @@ import { ClashAPIConfig } from '$src/types'; import s from './BackendList.module.scss'; -const PASS_THRU_ERROR = {}; - export function BackendList() { const navigate = useNavigate(); const [apiConfigs, setApiConfigs] = useAtom(clashAPIConfigsAtom); diff --git a/src/misc/constants.ts b/src/misc/constants.ts index 3b7db8061..5eed486de 100644 --- a/src/misc/constants.ts +++ b/src/misc/constants.ts @@ -1,3 +1,3 @@ export const ENDPOINT = { - config: '/configs' -} + config: '/configs', +};