Page MenuHomePhabricator

[keyserver] Silence unused-promise Flow lint in backupDB
ClosedPublic

Authored by ashoat on Dec 4 2023, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 12:07 PM
Unknown Object (File)
Wed, Nov 27, 8:09 PM
Unknown Object (File)
Nov 22 2024, 9:15 AM
Unknown Object (File)
Nov 22 2024, 9:07 AM
Unknown Object (File)
Nov 22 2024, 9:04 AM
Unknown Object (File)
Nov 22 2024, 3:40 AM
Unknown Object (File)
Nov 7 2024, 6:00 PM
Unknown Object (File)
Oct 26 2024, 1:05 AM
Subscribers

Details

Summary

The async IIFE in backupDB contains two try-catch blocks that guarantee it will never reject.

As such, we're safe to ignore the unused-promise Flow lint. Our primary reason for enabling that Lint is to catch unhandled promise rejections within keyserver, but there is no potential of that here.

Regarding the void keyword: the Flow team recommends using the void keyword to silence the unused-promise Lint. See the "Fire-and-forget" part of this blog post.

Depends on D10177

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable