style: fix lint across client packages

eslint --fix autofixes plus manual repairs: max-len line splits
(fake-api handlers, notifier/slots JSDoc, spec signatures), charAt over
non-null-asserted indexing in slash detect/menu cores, Array.from for
code-point capping, typeof assertions for unbound-method in specs,
generic getByRole for the send-button cast, effect disposer void-wrap in
command register, and dropped unused type imports.
This commit is contained in:
imccyu
2026-07-27 04:08:02 +08:00
parent a27be43ac1
commit f6396f2573
35 changed files with 122 additions and 89 deletions
+7 -9
View File
@@ -110,15 +110,13 @@ export const menuReduce: MenuReduce = (state, ev) => {
if (!state.open) return state
const pos = positions(state.groups)
if (pos.length === 0) return state
const at = state.highlight
? pos.findIndex(p => p.source === state.highlight!.source && p.index === state.highlight!.index)
: -1
const next = at < 0
? (ev.dir === 1 ? pos[0]! : pos[pos.length - 1]!)
: pos[(at + ev.dir + pos.length) % pos.length]!
if (state.highlight && next.source === state.highlight.source && next.index === state.highlight.index) {
return state
}
const hl = state.highlight
const at = hl ? pos.findIndex(p => p.source === hl.source && p.index === hl.index) : -1
const next = pos[at < 0
? (ev.dir === 1 ? 0 : pos.length - 1)
: (at + ev.dir + pos.length) % pos.length]
if (next === undefined) return state
if (hl && next.source === hl.source && next.index === hl.index) return state
return { ...state, highlight: next }
}
case 'close':