Migrate to stylistic

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-10-16 16:43:07 +01:00
parent d8052e6a73
commit 6c6bf811a6
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
124 changed files with 239 additions and 196 deletions

View file

@ -57,7 +57,7 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
await client.setPowerLevel(room.roomId, userIds, powerLevel);
setSelectedUsers([]);
setPowerLevel(defaultUserLevel);
} catch (error) {
} catch {
Modal.createDialog(ErrorDialog, {
title: _t("common|error"),
description: _t("error|update_power_level"),

View file

@ -52,7 +52,7 @@ async function checkIdentityServerUrl(u: string): Promise<string | null> {
} else {
return _t("identity_server|error_connection");
}
} catch (e) {
} catch {
return _t("identity_server|error_connection");
}
}

View file

@ -61,7 +61,7 @@ export const UserPersonalInfoSettings: React.FC<UserPersonalInfoSettingsProps> =
setEmails(threepids.threepids.filter((a) => a.medium === ThreepidMedium.Email));
setPhoneNumbers(threepids.threepids.filter((a) => a.medium === ThreepidMedium.Phone));
setLoadingState("loaded");
} catch (e) {
} catch {
setLoadingState("error");
}
}, [client]);

View file

@ -156,7 +156,7 @@ const UserProfileSettings: React.FC<UserProfileSettingsProps> = ({
const { content_uri: uri } = await client.uploadContent(avatarFile);
await client.setAvatarUrl(uri);
setAvatarURL(uri);
} catch (e) {
} catch {
setAvatarError(true);
} finally {
removeToast();

View file

@ -40,7 +40,7 @@ const DeviceNameEditor: React.FC<Props & { stopEditing: () => void }> = ({ devic
try {
await saveDeviceName(deviceName);
stopEditing();
} catch (error) {
} catch {
setError(_t("settings|sessions|error_set_name"));
setIsLoading(false);
}

View file

@ -126,7 +126,7 @@ export const DiscoverySettings: React.FC = () => {
);
logger.warn(e);
}
} catch (e) {}
} catch {}
})();
}, [client, getThreepidState]);

View file

@ -101,7 +101,7 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
this.setState<any>({ [kind]: deviceId });
try {
await MediaDeviceHandler.instance.setDevice(deviceId, kind);
} catch (error) {
} catch {
logger.error(`Failed to set device ${kind}: ${deviceId}`);
// reset state to current value
this.setState<any>({ [kind]: mapDeviceKindToHandlerValue(kind) });