Add TypeScript ESLint configs and lint scripts

Add a repository .editorconfig and a root eslint.config.ts to standardize formatting and linting. Migrate packages/webui ESLint config to TypeScript (eslint.config.ts) with project-specific rules and tsconfigRootDir handling, and remove the old JS config. Update package.json to run ESLint directly (add lint and lint:fix) and add required ESLint/dev dependencies; also add jiti to packages/webui/package.json. Include a small formatting tweak to tsconfig.base.json.
This commit is contained in:
手瓜一十雪 committed 2026-05-20 19:08:45 +08:00
1 parent f21740a5d3
commit aea2676c31
30 files changed
+173 -1057

No files matched your search

@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import { Eye, Loader2, User, UserX } from 'lucide-react';
import { Button } from '@/components/ui/button';
import {
@@ -37,7 +37,7 @@ export function ProcessProbeDialog({ pid, processName, open, onOpenChange }: Pro
const [info, setInfo] = useState<QqPortLoginInfo | null>(null);
const [error, setError] = useState<string | null>(null);
const probe = async () => {
const probe = useCallback(async () => {
setLoading(true);
setError(null);
setInfo(null);
@@ -52,7 +52,7 @@ export function ProcessProbeDialog({ pid, processName, open, onOpenChange }: Pro
} finally {
setLoading(false);
}
};
}, [api.processes, pid]);
useEffect(() => {
if (open) {
@@ -61,7 +61,7 @@ export function ProcessProbeDialog({ pid, processName, open, onOpenChange }: Pro
setInfo(null);
setError(null);
}
}, [open]);
}, [open, probe]);
return (
<Dialog open={open} onOpenChange={onOpenChange}>