Add no-misused/floating-promises lint rule
This commit is contained in:
@@ -25,9 +25,9 @@ async function applyThemeLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
applyTheme();
|
||||
applyThemeLoop();
|
||||
void applyTheme();
|
||||
void applyThemeLoop();
|
||||
|
||||
window.SignalContext.nativeThemeListener.subscribe(() => {
|
||||
applyTheme();
|
||||
void applyTheme();
|
||||
});
|
||||
|
@@ -155,7 +155,7 @@ window.setMenuBarVisibility = visibility =>
|
||||
window.updateSystemTraySetting = (
|
||||
systemTraySetting /* : Readonly<SystemTraySetting> */
|
||||
) => {
|
||||
ipc.invoke('update-system-tray-setting', systemTraySetting);
|
||||
void ipc.invoke('update-system-tray-setting', systemTraySetting);
|
||||
};
|
||||
|
||||
window.restart = () => {
|
||||
@@ -322,7 +322,7 @@ ipc.on('show-group-via-link', (_event, info) => {
|
||||
const { hash } = info;
|
||||
const { showGroupViaLink } = window.Events;
|
||||
if (showGroupViaLink) {
|
||||
showGroupViaLink(hash);
|
||||
void showGroupViaLink(hash);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -332,7 +332,7 @@ ipc.on('show-conversation-via-signal.me', (_event, info) => {
|
||||
|
||||
const { showConversationViaSignalDotMe } = window.Events;
|
||||
if (showConversationViaSignalDotMe) {
|
||||
showConversationViaSignalDotMe(hash);
|
||||
void showConversationViaSignalDotMe(hash);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -347,7 +347,7 @@ ipc.on('install-sticker-pack', (_event, info) => {
|
||||
const { packId, packKey } = info;
|
||||
const { installStickerPack } = window.Events;
|
||||
if (installStickerPack) {
|
||||
installStickerPack(packId, packKey);
|
||||
void installStickerPack(packId, packKey);
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -39,7 +39,7 @@ contextBridge.exposeInMainWorld('SignalContext', {
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
SignalContext.executeMenuRole('close');
|
||||
void SignalContext.executeMenuRole('close');
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
@@ -48,9 +48,9 @@ contextBridge.exposeInMainWorld('SignalContext', {
|
||||
message,
|
||||
onAccept: () => {
|
||||
if (!forCamera) {
|
||||
mediaPermissions.setValue(true);
|
||||
void mediaPermissions.setValue(true);
|
||||
} else {
|
||||
mediaCameraPermissions.setValue(true);
|
||||
void mediaCameraPermissions.setValue(true);
|
||||
}
|
||||
onClose();
|
||||
},
|
||||
|
@@ -311,7 +311,7 @@ const renderPreferences = async () => {
|
||||
onHasStoriesDisabledChanged: reRender(async (value: boolean) => {
|
||||
await settingHasStoriesDisabled.setValue(value);
|
||||
if (!value) {
|
||||
ipcDeleteAllMyStories();
|
||||
void ipcDeleteAllMyStories();
|
||||
}
|
||||
return value;
|
||||
}),
|
||||
@@ -379,7 +379,7 @@ const renderPreferences = async () => {
|
||||
function reRender<Value>(f: (value: Value) => Promise<Value>) {
|
||||
return async (value: Value) => {
|
||||
await f(value);
|
||||
renderPreferences();
|
||||
void renderPreferences();
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user