mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +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:
@@ -20,6 +20,8 @@ describe("ExposedPasswordsReportComponent", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
auditService = mock<AuditService>();
|
||||
// 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
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ExposedPasswordsReportComponent, I18nPipe],
|
||||
providers: [
|
||||
|
||||
@@ -18,6 +18,8 @@ describe("InactiveTwoFactorReportComponent", () => {
|
||||
let fixture: ComponentFixture<InactiveTwoFactorReportComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
// 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
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [InactiveTwoFactorReportComponent, I18nPipe],
|
||||
providers: [
|
||||
|
||||
@@ -17,6 +17,8 @@ describe("ReusedPasswordsReportComponent", () => {
|
||||
let fixture: ComponentFixture<ReusedPasswordsReportComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
// 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
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ReusedPasswordsReportComponent, I18nPipe],
|
||||
providers: [
|
||||
|
||||
@@ -17,6 +17,8 @@ describe("UnsecuredWebsitesReportComponent", () => {
|
||||
let fixture: ComponentFixture<UnsecuredWebsitesReportComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
// 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
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [UnsecuredWebsitesReportComponent, I18nPipe],
|
||||
providers: [
|
||||
|
||||
@@ -20,6 +20,8 @@ describe("WeakPasswordsReportComponent", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
passwordStrengthService = mock<PasswordStrengthServiceAbstraction>();
|
||||
// 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
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [WeakPasswordsReportComponent, I18nPipe],
|
||||
providers: [
|
||||
|
||||
@@ -76,6 +76,8 @@ export class SendComponent extends BaseSendComponent {
|
||||
|
||||
// Broadcaster subscription - load if sync completes in the background
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||
// 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.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "syncCompleted":
|
||||
|
||||
@@ -82,6 +82,8 @@ export class ExportComponent extends BaseExportComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
// 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.doExport();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user