fix(lint): suppress react-hooks/set-state-in-effect on pre-existing sync patterns

CI now blocks on ESLint, which surfaced two pre-existing useEffect
sync-from-server patterns. Annotated with targeted eslint-disable
comments and a note that the proper fix lives in 1.4.0 alongside the
settings-page split — refactoring derivation here would touch a
2100-line file.
This commit is contained in:
Marc-André Bombeck authored and Marc-André Bombeck committed 2026-04-27 00:28:28 +02:00
1 parent 53235a0fb7
commit 05142841fa
2 files changed
+8

No files matched your search

+7
View File
@@ -2939,8 +2939,15 @@ function UserAIProviderSubsection() {
useEffect(() => {
if (!data) return;
// Sync-from-server pattern: form draft state is initialised from the
// fetched user record. Could be reworked into a derived-state approach,
// but that's a non-trivial refactor of this monolithic settings page —
// tracked for the 1.4.0 settings split.
// eslint-disable-next-line react-hooks/set-state-in-effect
setProvider(data.provider ?? "");
// eslint-disable-next-line react-hooks/set-state-in-effect
setModel(data.model ?? "");
// eslint-disable-next-line react-hooks/set-state-in-effect
setBaseUrl(data.baseUrl ?? "");
}, [data]);
+1
View File
@@ -37,6 +37,7 @@ export function PasswordStrength({
useEffect(() => {
if (!password) {
// eslint-disable-next-line react-hooks/set-state-in-effect
setResult(null);
return;
}