1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00:00

Forbid promise misuse (#6360)

This commit is contained in:
Oscar Hinton
2023-09-26 23:07:22 +02:00
committed by GitHub
parent abd3e66e20
commit c5475f78ea
6 changed files with 10 additions and 11 deletions

View File

@@ -205,6 +205,7 @@ export default class AutofillService implements AutofillServiceInterface {
if (
options.cipher.type !== CipherType.Login ||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
totpPromise ||
!options.cipher.login.totp ||
(!canAccessPremium && !options.cipher.organizationUseTotp)

View File

@@ -116,6 +116,7 @@ export class NativeMessagingService {
switch (message.command) {
case "biometricUnlock": {
// eslint-disable-next-line @typescript-eslint/no-misused-promises
if (!this.platformUtilService.supportsBiometric()) {
return this.send({ command: "biometricUnlock", response: "not supported" }, appId);
}

View File

@@ -53,6 +53,7 @@ export class UserSubscriptionComponent implements OnInit {
return;
}
// eslint-disable-next-line @typescript-eslint/no-misused-promises
if (this.stateService.getHasPremiumPersonally()) {
this.loading = true;
this.sub = await this.apiService.getUserSubscription();

View File

@@ -74,6 +74,7 @@ export class PremiumComponent implements OnInit {
try {
if (this.selfHosted) {
// eslint-disable-next-line @typescript-eslint/no-misused-promises
if (!this.tokenService.getEmailVerified()) {
this.platformUtilsService.showToast(
"error",