mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +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:
@@ -48,22 +48,32 @@ export class FakeAccountService implements AccountService {
|
||||
}
|
||||
|
||||
async addAccount(userId: UserId, accountData: AccountInfo): Promise<void> {
|
||||
// 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.mock.addAccount(userId, accountData);
|
||||
}
|
||||
|
||||
async setAccountName(userId: UserId, name: string): Promise<void> {
|
||||
// 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.mock.setAccountName(userId, name);
|
||||
}
|
||||
|
||||
async setAccountEmail(userId: UserId, email: string): Promise<void> {
|
||||
// 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.mock.setAccountEmail(userId, email);
|
||||
}
|
||||
|
||||
async setAccountStatus(userId: UserId, status: AuthenticationStatus): Promise<void> {
|
||||
// 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.mock.setAccountStatus(userId, status);
|
||||
}
|
||||
|
||||
async switchAccount(userId: UserId): Promise<void> {
|
||||
// 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.mock.switchAccount(userId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user