fix(spotlight): remove all non-null assertions to pass oxlint

- Refactor groupDispatchers to accept userId as a parameter instead of closing over nullable userId
- Replace mutationGroup! with a guard clause
- Use optional chaining for preferenceChildrenOptionsByKey lookup with fallback
This commit is contained in:
Thomas Camlong committed 2026-06-01 10:30:41 +02:00
1 parent 0449716805
commit e67d603570
2 files changed
+13 -11

No files matched your search

@@ -65,7 +65,8 @@ export const preferencesGroup = createGroup<PreferencesGroupOption>({
useInteraction: (option) => ({
type: "children",
...(option.preferenceKey
? preferenceChildrenOptionsByKey[option.preferenceKey as keyof typeof preferenceChildrenOptionsByKey]!({})
? (preferenceChildrenOptionsByKey[option.preferenceKey as keyof typeof preferenceChildrenOptionsByKey]?.({}) ??
settingsChildrenOptions({}))
: settingsChildrenOptions({})),
}),
});