fix(lint): close type-check gaps in client scripts and tooling
Remove unused import flagged by CI lint, then harden the toolchain so such issues are caught before push: - lint-staged now also matches .tsx/.jsx (previously .tsx files skipped the pre-commit eslint pass, which is how the error reached CI) - eslint ignores generated client bundles (gitignored, not worth linting) - typecheck now also runs the client tsconfig; the hand-written browser source was excluded from the root config and never type-checked - consolidate the window global augmentations (showToast, parseJsonResponseOrThrow) into a single client globals.d.ts; the inline declare-global blocks failed (non-module files) and masked real errors Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
6bfaa4dec7
commit
4db9fc1b8a
6 files changed
+48
-37
No files matched your search
@@ -321,21 +321,6 @@ function refreshEmailRowCache(): void {
|
||||
updateEmailSelectionState();
|
||||
}
|
||||
|
||||
interface ToastHandle {
|
||||
update?: (msg: string, opts?: Record<string, unknown>) => void;
|
||||
dismiss?: () => void;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
showToast?: (msg: string, opts?: Record<string, unknown>) => ToastHandle;
|
||||
parseJsonResponseOrThrow?: (
|
||||
res: Response,
|
||||
opts?: Record<string, unknown>,
|
||||
) => Promise<Record<string, unknown>>;
|
||||
}
|
||||
}
|
||||
|
||||
function setupEmailDeleteButtons(): void {
|
||||
Array.from(
|
||||
document.querySelectorAll<HTMLButtonElement>(
|
||||
|
||||
Reference in new issue
Block a user