Upgrade Biome to 2.4.7 and enable 54 additional lint rules
Add rules covering bug prevention (noLeakedRender, noFloatingPromises, noImportCycles, noReactForwardRef), security (noScriptUrl, noAlert), performance (noAwaitInLoops, useTopLevelRegex), and code style (noNestedTernary, useGlobalThis, useNullishCoalescing, useSortedClasses, plus ~40 more). Fix all violations: extract top-level regex constants, guard React && renders with boolean coercion, refactor nested ternaries, replace window with globalThis, sort Tailwind classes, and introduce expectDomainError test helper to eliminate conditional expects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ export function SourceManager({ onCacheCleared }: SourceManagerProps) {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
loadSources();
|
||||
void loadSources();
|
||||
}, [loadSources]);
|
||||
|
||||
const handleClearSource = async (sourceCode: string) => {
|
||||
@@ -48,7 +48,7 @@ export function SourceManager({ onCacheCleared }: SourceManagerProps) {
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-2 py-8 text-center">
|
||||
<Database className="h-8 w-8 text-muted-foreground" />
|
||||
<p className="text-sm text-muted-foreground">No cached sources</p>
|
||||
<p className="text-muted-foreground text-sm">No cached sources</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -56,12 +56,12 @@ export function SourceManager({ onCacheCleared }: SourceManagerProps) {
|
||||
return (
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm font-semibold text-foreground">
|
||||
<span className="font-semibold text-foreground text-sm">
|
||||
Cached Sources
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="hover:text-hover-destructive hover:border-hover-destructive"
|
||||
className="hover:border-hover-destructive hover:text-hover-destructive"
|
||||
onClick={handleClearAll}
|
||||
>
|
||||
<Trash2 className="mr-1 h-3 w-3" />
|
||||
@@ -75,10 +75,10 @@ export function SourceManager({ onCacheCleared }: SourceManagerProps) {
|
||||
className="flex items-center justify-between rounded-md border border-border px-3 py-2"
|
||||
>
|
||||
<div>
|
||||
<span className="text-sm text-foreground">
|
||||
<span className="text-foreground text-sm">
|
||||
{source.displayName}
|
||||
</span>
|
||||
<span className="ml-2 text-xs text-muted-foreground">
|
||||
<span className="ml-2 text-muted-foreground text-xs">
|
||||
{source.creatureCount} creatures
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user