chore: add knip and remove the dead code it reports (#247)

Adds knip (pnpm knip, knip.ts covering src, scripts, perf and e2e) and runs it in the CI frontend job. Removes what it reported: the unused codemirror and @types/dompurify dependencies, exports and test hooks used nowhere (AppLogo, Tooltip, barrel re-exports, duplicate default exports of lazily loaded settings pages), the unused iterateAll helper, and the zh entry for a deleted notification. rustfmt (used by lint-staged) is ignored as a toolchain binary.

Co-authored-by: jaw52 <[email protected]>
Цей коміт міститься в:
Jaw authored and GitHub committed 2026-10-29 23:21:56 +08:00
1 джерело c3b3534f08
коміт 5217f8570b
54 files changed
+588 -351

No files matched your search

-5
Переглянути файл
@@ -21,11 +21,6 @@ function load() {
.finally(() => (loading = false));
}
/** For tests: languages that have a debugger (`null` = unknown, allow everything). */
export function _setDebuggableLanguages(ids: Iterable<string> | null) {
debuggable = ids ? new Set(ids) : null;
}
/** Whether a new breakpoint may be placed in a file of `language`. */
export function canPlaceBreakpoint(language: string): boolean {
if (workflowSettings().debugger.breakpointsAnyFile) return true;
-7
Переглянути файл
@@ -229,10 +229,3 @@ export function setMuted(muted: boolean) {
persist();
for (const path of Object.keys(useBreakpoints.getState().byFile)) scheduleSync(path);
}
export function allBreakpoints(): Array<{ path: string; bp: BreakpointEntry }> {
const { byFile } = useBreakpoints.getState();
return Object.keys(byFile)
.sort()
.flatMap((path) => byFile[path]!.map((bp) => ({ path, bp })));
}