mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 19:23:52 +00:00
Add eslint rule no-floating-promises (#7789)
* add eslint rule no-floating-promises * add eslint-disable comment to offending lines
This commit is contained in:
@@ -57,6 +57,8 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
this.loading = true;
|
||||
this.sub = await this.apiService.getUserSubscription();
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/settings/subscription/premium"]);
|
||||
return;
|
||||
}
|
||||
@@ -83,6 +85,8 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
this.reinstatePromise = this.apiService.postReinstatePremium();
|
||||
await this.reinstatePromise;
|
||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("reinstated"));
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
@@ -112,6 +116,8 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
null,
|
||||
this.i18nService.t("canceledSubscription"),
|
||||
);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
@@ -140,6 +146,8 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
closeUpdateLicense(load: boolean) {
|
||||
this.showUpdateLicense = false;
|
||||
if (load) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}
|
||||
}
|
||||
@@ -152,6 +160,8 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
closeStorage(load: boolean) {
|
||||
this.showAdjustStorage = false;
|
||||
if (load) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user