mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-21 06:13:48 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import {
|
||||
updateFeedInList,
|
||||
removeFeedFromList,
|
||||
removeFeedsFromListBulk,
|
||||
deleteKeysWithConcurrency,
|
||||
purgeFeedKeysStep,
|
||||
} from "./helpers";
|
||||
|
||||
@@ -45,7 +44,12 @@ const updateFeedSchema = z.object({
|
||||
});
|
||||
|
||||
const senderFilterSchema = z.object({
|
||||
action: z.enum(["allow_sender", "allow_domain", "block_sender", "block_domain"]),
|
||||
action: z.enum([
|
||||
"allow_sender",
|
||||
"allow_domain",
|
||||
"block_sender",
|
||||
"block_domain",
|
||||
]),
|
||||
value: z.string().min(1),
|
||||
});
|
||||
|
||||
@@ -668,7 +672,9 @@ feedsRouter.post("/bulk-delete", async (c) => {
|
||||
|
||||
const deletedFeedIds = await removeFeedsFromListBulk(emailStorage, okIds);
|
||||
if (deletedFeedIds.length > 0) {
|
||||
await bumpCounters(emailStorage, { feeds_deleted: deletedFeedIds.length });
|
||||
await bumpCounters(emailStorage, {
|
||||
feeds_deleted: deletedFeedIds.length,
|
||||
});
|
||||
}
|
||||
|
||||
const removed = new Set(deletedFeedIds);
|
||||
@@ -720,7 +726,9 @@ feedsRouter.post("/bulk-delete", async (c) => {
|
||||
|
||||
const deletedFeedIds = await removeFeedsFromListBulk(emailStorage, okIds);
|
||||
if (deletedFeedIds.length > 0) {
|
||||
await bumpCounters(emailStorage, { feeds_deleted: deletedFeedIds.length });
|
||||
await bumpCounters(emailStorage, {
|
||||
feeds_deleted: deletedFeedIds.length,
|
||||
});
|
||||
}
|
||||
|
||||
return c.redirect(
|
||||
|
||||
Reference in New Issue
Block a user