fix: Resolve web package lint and typecheck errors
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixes ESLint and TypeScript errors in web package to pass CI checks: - Fixed all Quality Rails violations (14 explicit any types) - Fixed deprecated React event types (FormEvent → SyntheticEvent) - Fixed 26 TypeScript errors (Promise types, test mocks, HTMLElement assertions) - Added vitest DOM matcher type definitions - Fixed unused variables and empty functions - Resolved 43+ additional lint errors Typecheck: ✅ 0 errors Lint: 542 remaining (non-blocking in CI) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -256,7 +256,13 @@ export default function EntryPage(): ReactElement {
|
||||
}
|
||||
|
||||
if (!entry) {
|
||||
return null;
|
||||
return (
|
||||
<div className="max-w-4xl mx-auto p-6">
|
||||
<div className="p-4 bg-gray-50 dark:bg-gray-900/20 border border-gray-200 dark:border-gray-800 rounded-md">
|
||||
<p className="text-sm text-gray-800 dark:text-gray-200">Entry not found</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import type { ReactElement, FormEvent as ReactFormEvent } from "react";
|
||||
import type { ReactElement } from "react";
|
||||
import React, { useState, useEffect, useCallback } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { EntryStatus, Visibility, type KnowledgeTag } from "@mosaic/shared";
|
||||
@@ -107,7 +107,7 @@ export default function NewEntryPage(): ReactElement {
|
||||
}
|
||||
};
|
||||
|
||||
const handleSubmit = (e: ReactFormEvent): void => {
|
||||
const handleSubmit = (e: React.SyntheticEvent<HTMLFormElement>): void => {
|
||||
e.preventDefault();
|
||||
void handleSave();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user