diff --git a/client/src/app/components/OidcProvider.tsx b/client/src/app/components/OidcProvider.tsx index ccf779055..5e926ed0c 100644 --- a/client/src/app/components/OidcProvider.tsx +++ b/client/src/app/components/OidcProvider.tsx @@ -58,7 +58,7 @@ const AuthEnabledOidcProvider: React.FC = ({ url_state: window.location.pathname + window.location.search, }); } - }, [auth.isAuthenticated, auth.isLoading, auth.error, auth.signinRedirect]); + }, [auth]); if (auth.isAuthenticated) { return }>{children}; diff --git a/client/src/app/hooks/table-controls/active-item/useActiveItemEffects.ts b/client/src/app/hooks/table-controls/active-item/useActiveItemEffects.ts index fc58d3364..de5e47ba6 100644 --- a/client/src/app/hooks/table-controls/active-item/useActiveItemEffects.ts +++ b/client/src/app/hooks/table-controls/active-item/useActiveItemEffects.ts @@ -37,5 +37,5 @@ export const useActiveItemEffects = ({ if (!isLoading && activeItemId && !activeItem) { clearActiveItem(); } - }, [isLoading, activeItemId, activeItem]); // TODO fix the exhaustive-deps lint warning here without affecting behavior + }, [isLoading, activeItemId, activeItem, clearActiveItem]); }; diff --git a/client/src/app/hooks/useUrlParams.ts b/client/src/app/hooks/useUrlParams.ts index 91cf894f6..92531ce9b 100644 --- a/client/src/app/hooks/useUrlParams.ts +++ b/client/src/app/hooks/useUrlParams.ts @@ -110,10 +110,11 @@ export const useUrlParams = < params = allParamsEmpty ? defaultValue : deserialize(serializedParams); } + /* eslint-disable @eslint-react/exhaustive-deps -- setParams and defaultValue are stable per-mount; including them causes render loops */ React.useEffect(() => { if (allParamsEmpty) setParams(defaultValue); - // Leaving this rule enabled results in a cascade of unnecessary useCallbacks: }, [allParamsEmpty]); + /* eslint-enable @eslint-react/exhaustive-deps */ return [params, setParams]; }; diff --git a/eslint.config.mjs b/eslint.config.mjs index 37cf5f34d..5f16e81b4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -43,7 +43,6 @@ export default defineConfig([ "@eslint-react/no-unnecessary-use-prefix": "off", "@typescript-eslint/no-unused-vars": "off", "@eslint-react/static-components": "off", - "@eslint-react/exhaustive-deps": "off", "@eslint-react/no-nested-component-definitions": "off", "@tanstack/query/prefer-query-options": "off", "@tanstack/query/exhaustive-deps": "off",