1
0
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:
Will Martin
2024-02-02 15:13:37 -05:00
committed by GitHub
parent 6e96964c1a
commit cb8849c355
273 changed files with 1602 additions and 0 deletions

View File

@@ -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: [

View File

@@ -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: [

View File

@@ -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: [

View File

@@ -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: [

View File

@@ -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: [

View File

@@ -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":

View File

@@ -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();
}