diff --git a/frontend/src/components/shared/config/configSections/AdminAdvancedSection.tsx b/frontend/src/components/shared/config/configSections/AdminAdvancedSection.tsx index c1382afc2..45963582e 100644 --- a/frontend/src/components/shared/config/configSections/AdminAdvancedSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminAdvancedSection.tsx @@ -172,7 +172,7 @@ export default function AdminAdvancedSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminConnectionsSection.tsx b/frontend/src/components/shared/config/configSections/AdminConnectionsSection.tsx index 5bd92c978..89addd101 100644 --- a/frontend/src/components/shared/config/configSections/AdminConnectionsSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminConnectionsSection.tsx @@ -9,9 +9,6 @@ import PendingBadge from '../PendingBadge'; import ProviderCard from './ProviderCard'; import { ALL_PROVIDERS, - OAUTH2_PROVIDERS, - GENERIC_OAUTH2_PROVIDER, - SAML2_PROVIDER, Provider, } from './providerDefinitions'; import apiClient from '../../../../services/apiClient'; @@ -98,7 +95,7 @@ export default function AdminConnectionsSection() { return result; }, - saveTransformer: (settings) => { + saveTransformer: () => { // This section doesn't have a global save button // Individual providers save through their own handlers return { @@ -210,7 +207,7 @@ export default function AdminConnectionsSection() { throw new Error('Failed to save'); } } - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), @@ -264,7 +261,7 @@ export default function AdminConnectionsSection() { throw new Error('Failed to disconnect'); } } - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), @@ -299,7 +296,7 @@ export default function AdminConnectionsSection() { } else { throw new Error('Failed to save'); } - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminDatabaseSection.tsx b/frontend/src/components/shared/config/configSections/AdminDatabaseSection.tsx index b724bbb03..a8f742fe2 100644 --- a/frontend/src/components/shared/config/configSections/AdminDatabaseSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminDatabaseSection.tsx @@ -85,7 +85,7 @@ export default function AdminDatabaseSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminEndpointsSection.tsx b/frontend/src/components/shared/config/configSections/AdminEndpointsSection.tsx index 7dc921ebc..b29b97fce 100644 --- a/frontend/src/components/shared/config/configSections/AdminEndpointsSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminEndpointsSection.tsx @@ -36,7 +36,7 @@ export default function AdminEndpointsSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminFeaturesSection.tsx b/frontend/src/components/shared/config/configSections/AdminFeaturesSection.tsx index 7506c60ec..7f6170529 100644 --- a/frontend/src/components/shared/config/configSections/AdminFeaturesSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminFeaturesSection.tsx @@ -76,7 +76,7 @@ export default function AdminFeaturesSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminGeneralSection.tsx b/frontend/src/components/shared/config/configSections/AdminGeneralSection.tsx index bb1458100..4cf0f938f 100644 --- a/frontend/src/components/shared/config/configSections/AdminGeneralSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminGeneralSection.tsx @@ -145,7 +145,7 @@ export default function AdminGeneralSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminLegalSection.tsx b/frontend/src/components/shared/config/configSections/AdminLegalSection.tsx index a83a53bb6..ef19c44cc 100644 --- a/frontend/src/components/shared/config/configSections/AdminLegalSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminLegalSection.tsx @@ -40,7 +40,7 @@ export default function AdminLegalSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminMailSection.tsx b/frontend/src/components/shared/config/configSections/AdminMailSection.tsx index 0fcf4db52..239202db9 100644 --- a/frontend/src/components/shared/config/configSections/AdminMailSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminMailSection.tsx @@ -40,7 +40,7 @@ export default function AdminMailSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminPremiumSection.tsx b/frontend/src/components/shared/config/configSections/AdminPremiumSection.tsx index d3840bd63..69a77a8f3 100644 --- a/frontend/src/components/shared/config/configSections/AdminPremiumSection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminPremiumSection.tsx @@ -37,7 +37,7 @@ export default function AdminPremiumSection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminPrivacySection.tsx b/frontend/src/components/shared/config/configSections/AdminPrivacySection.tsx index 8f410d4a0..fccc12605 100644 --- a/frontend/src/components/shared/config/configSections/AdminPrivacySection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminPrivacySection.tsx @@ -83,7 +83,7 @@ export default function AdminPrivacySection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/AdminSecuritySection.tsx b/frontend/src/components/shared/config/configSections/AdminSecuritySection.tsx index 7e9d1e3be..6c489cd0f 100644 --- a/frontend/src/components/shared/config/configSections/AdminSecuritySection.tsx +++ b/frontend/src/components/shared/config/configSections/AdminSecuritySection.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { TextInput, NumberInput, Switch, Button, Stack, Paper, Text, Loader, Group, Select, PasswordInput, Alert, Badge, Accordion, Textarea } from '@mantine/core'; +import { NumberInput, Switch, Button, Stack, Paper, Text, Loader, Group, Select, Alert, Badge, Accordion, Textarea } from '@mantine/core'; import { alert } from '../../../toast'; import LocalIcon from '../../LocalIcon'; import RestartConfirmationModal from '../RestartConfirmationModal'; @@ -147,7 +147,7 @@ export default function AdminSecuritySection() { try { await saveSettings(); showRestartModal(); - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/components/shared/config/configSections/Overview.tsx b/frontend/src/components/shared/config/configSections/Overview.tsx index 8d04ac430..762fb6eaa 100644 --- a/frontend/src/components/shared/config/configSections/Overview.tsx +++ b/frontend/src/components/shared/config/configSections/Overview.tsx @@ -61,7 +61,7 @@ const Overview: React.FC = () => { try { await signOut(); navigate('/login'); - } catch (error) { + } catch (_error) { console.error('Logout error:', error); } }; diff --git a/frontend/src/components/shared/config/configSections/ProviderCard.tsx b/frontend/src/components/shared/config/configSections/ProviderCard.tsx index 5ce015613..a44868a6e 100644 --- a/frontend/src/components/shared/config/configSections/ProviderCard.tsx +++ b/frontend/src/components/shared/config/configSections/ProviderCard.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { Paper, Group, Text, Badge, Button, Collapse, Stack, TextInput, Textarea, Switch, PasswordInput } from '@mantine/core'; +import { Paper, Group, Text, Button, Collapse, Stack, TextInput, Textarea, Switch, PasswordInput } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import LocalIcon from '../../LocalIcon'; import { Provider, ProviderField } from './providerDefinitions'; diff --git a/frontend/src/components/shared/config/useRestartServer.ts b/frontend/src/components/shared/config/useRestartServer.ts index 21493762d..b204f47ec 100644 --- a/frontend/src/components/shared/config/useRestartServer.ts +++ b/frontend/src/components/shared/config/useRestartServer.ts @@ -39,7 +39,7 @@ export function useRestartServer() { } else { throw new Error('Failed to restart'); } - } catch (error) { + } catch (_error) { alert({ alertType: 'error', title: t('admin.error', 'Error'), diff --git a/frontend/src/hooks/useAdminSettings.ts b/frontend/src/hooks/useAdminSettings.ts index 875311f51..d7321c1b3 100644 --- a/frontend/src/hooks/useAdminSettings.ts +++ b/frontend/src/hooks/useAdminSettings.ts @@ -1,6 +1,6 @@ import { useState } from 'react'; import apiClient from '../services/apiClient'; -import { mergePendingSettings, isFieldPending, hasPendingChanges, getCurrentValue } from '../utils/settingsPendingHelper'; +import { mergePendingSettings, isFieldPending, hasPendingChanges } from '../utils/settingsPendingHelper'; interface UseAdminSettingsOptions { sectionName: string; @@ -152,7 +152,7 @@ function computeDelta(original: any, current: any): any { const delta: any = {}; for (const key in current) { - if (!current.hasOwnProperty(key)) continue; + if (!Object.prototype.hasOwnProperty.call(current, key)) continue; const originalValue = original[key]; const currentValue = current[key]; diff --git a/frontend/src/utils/settingsPendingHelper.ts b/frontend/src/utils/settingsPendingHelper.ts index 89a4991da..980930fea 100644 --- a/frontend/src/utils/settingsPendingHelper.ts +++ b/frontend/src/utils/settingsPendingHelper.ts @@ -120,7 +120,7 @@ function deepMerge(target: any, source: any): any { const result = { ...target }; for (const key in source) { - if (source.hasOwnProperty(key)) { + if (Object.prototype.hasOwnProperty.call(source, key)) { const sourceValue = source[key]; const targetValue = result[key];