Enable @typescript-eslint/explicit-function-return-type
in /src (#9788)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier * Enable `@typescript-eslint/explicit-function-return-type` in /src * Fix types * tsc strict fixes * Delint * Fix test * Fix bad merge
This commit is contained in:
parent
7a36ba0fde
commit
030b7e90bf
683 changed files with 3459 additions and 3013 deletions
|
@ -70,7 +70,7 @@ const useSignOut = (
|
|||
} => {
|
||||
const [signingOutDeviceIds, setSigningOutDeviceIds] = useState<ExtendedDevice["device_id"][]>([]);
|
||||
|
||||
const onSignOutCurrentDevice = () => {
|
||||
const onSignOutCurrentDevice = (): void => {
|
||||
Modal.createDialog(
|
||||
LogoutDialog,
|
||||
{}, // props,
|
||||
|
@ -80,7 +80,7 @@ const useSignOut = (
|
|||
);
|
||||
};
|
||||
|
||||
const onSignOutOtherDevices = async (deviceIds: ExtendedDevice["device_id"][]) => {
|
||||
const onSignOutOtherDevices = async (deviceIds: ExtendedDevice["device_id"][]): Promise<void> => {
|
||||
if (!deviceIds.length) {
|
||||
return;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ const useSignOut = (
|
|||
|
||||
try {
|
||||
setSigningOutDeviceIds([...signingOutDeviceIds, ...deviceIds]);
|
||||
await deleteDevicesWithInteractiveAuth(matrixClient, deviceIds, async (success) => {
|
||||
await deleteDevicesWithInteractiveAuth(matrixClient, deviceIds, async (success): Promise<void> => {
|
||||
if (success) {
|
||||
await onSignoutResolvedCallback();
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ const SessionManagerTab: React.FC = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const onGoToFilteredList = (filter: FilterVariation) => {
|
||||
const onGoToFilteredList = (filter: FilterVariation): void => {
|
||||
setFilter(filter);
|
||||
clearTimeout(scrollIntoViewTimeoutRef.current);
|
||||
// wait a tick for the filtered section to rerender with different height
|
||||
|
@ -160,7 +160,7 @@ const SessionManagerTab: React.FC = () => {
|
|||
const otherSessionsCount = Object.keys(otherDevices).length;
|
||||
const shouldShowOtherSessions = otherSessionsCount > 0;
|
||||
|
||||
const onVerifyCurrentDevice = () => {
|
||||
const onVerifyCurrentDevice = (): void => {
|
||||
Modal.createDialog(SetupEncryptionDialog as unknown as React.ComponentType, { onFinished: refreshDevices });
|
||||
};
|
||||
|
||||
|
@ -173,7 +173,7 @@ const SessionManagerTab: React.FC = () => {
|
|||
Modal.createDialog(VerificationRequestDialog, {
|
||||
verificationRequestPromise,
|
||||
member: currentUserMember,
|
||||
onFinished: async () => {
|
||||
onFinished: async (): Promise<void> => {
|
||||
const request = await verificationRequestPromise;
|
||||
request.cancel();
|
||||
await refreshDevices();
|
||||
|
@ -183,7 +183,7 @@ const SessionManagerTab: React.FC = () => {
|
|||
[requestDeviceVerification, refreshDevices, currentUserMember],
|
||||
);
|
||||
|
||||
const onSignoutResolvedCallback = async () => {
|
||||
const onSignoutResolvedCallback = async (): Promise<void> => {
|
||||
await refreshDevices();
|
||||
setSelectedDeviceIds([]);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue