1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-03-11 13:30:39 +01:00

eslint: report unused disable directives (#13463)

Remove any unused disable directives and FIXMEs in our code
This commit is contained in:
Thomas Rittson 2025-03-10 23:33:08 +10:00 committed by GitHub
parent afd715c79c
commit ef72f513b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
69 changed files with 12 additions and 91 deletions

View File

@ -1,4 +1,4 @@
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
/* eslint-disable @typescript-eslint/no-require-imports */
module.exports = {
plugins: [
require("postcss-import"),

View File

@ -99,7 +99,6 @@ import { AwaitDesktopDialogComponent } from "./await-desktop-dialog.component";
VaultTimeoutInputComponent,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class AccountSecurityComponent implements OnInit, OnDestroy {
protected readonly VaultTimeoutAction = VaultTimeoutAction;

View File

@ -479,7 +479,6 @@ describe("OverlayBackground", () => {
it("will set up onMessage and onConnect listeners", () => {
overlayBackground["setupExtensionMessageListeners"]();
// eslint-disable-next-line
expect(chrome.runtime.onMessage.addListener).toHaveBeenCalled();
expect(chrome.runtime.onConnect.addListener).toHaveBeenCalled();
});

View File

@ -1412,7 +1412,6 @@ export default class AutofillService implements AutofillServiceInterface {
let doesContainValue = false;
CreditCardAutoFillConstants.CardAttributesExtended.forEach((attributeName) => {
// eslint-disable-next-line no-prototype-builtins
if (doesContainValue || !field[attributeName]) {
return;
}

View File

@ -34,12 +34,8 @@ export default class IdleBackground {
const idleHandler = (newState: string) => {
if (newState === "active") {
// 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.notificationsService.reconnectFromActivity();
} 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.notificationsService.disconnectFromInactivity();
}
};

View File

@ -85,7 +85,6 @@ describe("BrowserTaskSchedulerService", () => {
callback,
);
// @ts-expect-error mocking global browser object
// eslint-disable-next-line no-global-assign
globalThis.browser = {};
chrome.alarms.get = jest.fn().mockImplementation((_name, callback) => callback(undefined));
});
@ -95,8 +94,7 @@ describe("BrowserTaskSchedulerService", () => {
jest.clearAllTimers();
jest.useRealTimers();
// eslint-disable-next-line no-global-assign
globalThis.browser = undefined;
(globalThis.browser as any) = undefined;
});
describe("setTimeout", () => {

View File

@ -1,4 +1,4 @@
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
/* eslint-disable @typescript-eslint/no-require-imports */
const config = require("../../libs/components/tailwind.config.base");
config.content = [

View File

@ -571,7 +571,7 @@ export class GetCommand extends DownloadCommand {
const pubKey = Utils.fromB64ToArray(response.publicKey);
fingerprint = await this.keyService.getFingerprint(id, pubKey);
} catch {
// eslint-disable-next-line
// empty - handled by the null check below
}
}

View File

@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-require-imports, no-undef */
/* eslint-disable @typescript-eslint/no-require-imports */
module.exports = {
plugins: [
require("postcss-import"),

View File

@ -53,7 +53,6 @@ import { NativeMessagingManifestService } from "../services/native-messaging-man
selector: "app-settings",
templateUrl: "settings.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class SettingsComponent implements OnInit, OnDestroy {
// For use in template
protected readonly VaultTimeoutAction = VaultTimeoutAction;

View File

@ -719,12 +719,8 @@ export class AppComponent implements OnInit, OnDestroy {
private idleStateChanged() {
if (this.isIdle) {
// 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.notificationsService.disconnectFromInactivity();
} 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.notificationsService.reconnectFromActivity();
}
}

View File

@ -37,7 +37,6 @@ const BroadcasterSubscriptionId = "TwoFactorComponent";
selector: "app-two-factor",
templateUrl: "two-factor-v1.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class TwoFactorComponentV1 extends BaseTwoFactorComponent implements OnDestroy {
@ViewChild("twoFactorOptions", { read: ViewContainerRef, static: true })
twoFactorOptionsModal: ViewContainerRef;

View File

@ -91,7 +91,6 @@ export class WindowMain {
app.quit();
return;
} else {
// eslint-disable-next-line
app.on("second-instance", (event, argv, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
if (this.win != null) {

View File

@ -57,8 +57,6 @@ export class ElectronKeyService extends DefaultKeyService {
}
override async clearStoredUserKey(keySuffix: KeySuffixOptions, 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
await super.clearStoredUserKey(keySuffix, userId);
}

View File

@ -15,7 +15,6 @@ import { SearchBarService } from "../../../app/layout/search/search-bar.service"
selector: "app-vault-items",
templateUrl: "vault-items.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class VaultItemsComponent extends BaseVaultItemsComponent {
constructor(
searchService: SearchService,

View File

@ -1,4 +1,4 @@
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
/* eslint-disable @typescript-eslint/no-require-imports */
const config = require("../../libs/components/tailwind.config.base");
config.content = [

View File

@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-require-imports, no-undef */
/* eslint-disable @typescript-eslint/no-require-imports */
module.exports = {
plugins: [
require("postcss-import"),

View File

@ -663,9 +663,6 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
this.organization.id,
filteredUsers.map((user) => user.id),
);
// 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
// Bulk Status component open
const dialogRef = BulkStatusComponent.open(this.dialogService, {
data: {

View File

@ -25,7 +25,6 @@ import { PolicyEditComponent, PolicyEditDialogResult } from "./policy-edit.compo
selector: "app-org-policies",
templateUrl: "policies.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class PoliciesComponent implements OnInit {
@ViewChild("editTemplate", { read: ViewContainerRef, static: true })
editModalRef: ViewContainerRef;

View File

@ -31,7 +31,6 @@ import { TwoFactorVerifyComponent } from "../../../auth/settings/two-factor/two-
selector: "app-two-factor-setup",
templateUrl: "../../../auth/settings/two-factor/two-factor-setup.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent implements OnInit {
tabbedHeader = false;
constructor(

View File

@ -173,8 +173,6 @@ export class AppComponent implements OnDestroy, OnInit {
type: "success",
});
if (premiumConfirmed) {
// 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
await this.router.navigate(["settings/subscription/premium"]);
}
break;
@ -359,12 +357,8 @@ export class AppComponent implements OnDestroy, OnInit {
private idleStateChanged() {
if (this.isIdle) {
// 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.notificationsService.disconnectFromInactivity();
} 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.notificationsService.reconnectFromActivity();
}
}

View File

@ -40,7 +40,6 @@ import { OrganizationInvite } from "../organization-invite/organization-invite";
selector: "app-login",
templateUrl: "login-v1.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class LoginComponentV1 extends BaseLoginComponent implements OnInit {
showResetPasswordAutoEnrollWarning = false;
enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;

View File

@ -43,7 +43,6 @@ import {
selector: "emergency-access",
templateUrl: "emergency-access.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class EmergencyAccessComponent implements OnInit {
@ViewChild("addEdit", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;
@ViewChild("takeoverTemplate", { read: ViewContainerRef, static: true })

View File

@ -33,7 +33,6 @@ type EmergencyAccessTakeoverDialogData = {
selector: "emergency-access-takeover",
templateUrl: "emergency-access-takeover.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class EmergencyAccessTakeoverComponent
extends ChangePasswordComponent
implements OnInit, OnDestroy
@ -86,7 +85,6 @@ export class EmergencyAccessTakeoverComponent
.subscribe((enforcedPolicyOptions) => (this.enforcedPolicyOptions = enforcedPolicyOptions));
}
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
ngOnDestroy(): void {
super.ngOnDestroy();
}

View File

@ -18,7 +18,6 @@ import { EmergencyViewDialogComponent } from "./emergency-view-dialog.component"
templateUrl: "emergency-access-view.component.html",
providers: [{ provide: CipherFormConfigService, useClass: DefaultCipherFormConfigService }],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class EmergencyAccessViewComponent implements OnInit {
@ViewChild("attachments", { read: ViewContainerRef, static: true })
attachmentsModalRef: ViewContainerRef;

View File

@ -37,7 +37,6 @@ import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legac
selector: "app-sso",
templateUrl: "sso-v1.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class SsoComponentV1 extends BaseSsoComponent implements OnInit {
protected formGroup = new FormGroup({
identifier: new FormControl(null, [Validators.required]),

View File

@ -37,7 +37,6 @@ import {
selector: "app-two-factor",
templateUrl: "two-factor-v1.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class TwoFactorComponentV1 extends BaseTwoFactorComponent implements OnInit, OnDestroy {
@ViewChild("twoFactorOptions", { read: ViewContainerRef, static: true })
twoFactorOptionsModal: ViewContainerRef;

View File

@ -16,7 +16,6 @@ import { ToastService } from "@bitwarden/components";
selector: "app-verify-email-token",
templateUrl: "verify-email-token.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class VerifyEmailTokenComponent implements OnInit {
constructor(
private router: Router,

View File

@ -15,7 +15,6 @@ import { ToastService } from "@bitwarden/components";
selector: "app-verify-recover-delete",
templateUrl: "verify-recover-delete.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class VerifyRecoverDeleteComponent implements OnInit {
email: string;

View File

@ -36,7 +36,6 @@ import {
@Component({
templateUrl: "payment-method.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class PaymentMethodComponent implements OnInit, OnDestroy {
loading = false;
firstLoaded = false;

View File

@ -24,7 +24,6 @@ import { SharedModule } from "../../shared";
standalone: true,
imports: [SharedModule],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class TaxInfoComponent implements OnInit, OnDestroy {
private destroy$ = new Subject<void>();
@ -91,7 +90,7 @@ export class TaxInfoComponent implements OnInit, OnDestroy {
async ngOnInit() {
// Provider setup
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
this.route.queryParams.subscribe((params) => {
this.providerId = params.providerId;
});

View File

@ -82,7 +82,6 @@ import {
} from "@bitwarden/common/platform/notifications/internal";
import { AppIdService as DefaultAppIdService } from "@bitwarden/common/platform/services/app-id.service";
import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service";
// eslint-disable-next-line import/no-restricted-paths -- Implementation for memory storage
import { MigrationBuilderService } from "@bitwarden/common/platform/services/migration-builder.service";
import { MigrationRunner } from "@bitwarden/common/platform/services/migration-runner";
import { DefaultSdkClientFactory } from "@bitwarden/common/platform/services/sdk/default-sdk-client-factory";

View File

@ -1,6 +1,5 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
// eslint-disable-next-line no-restricted-imports
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { ReactiveFormsModule } from "@angular/forms";
import { mock, MockProxy } from "jest-mock-extended";

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line no-restricted-imports
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { mock, MockProxy } from "jest-mock-extended";
import { of } from "rxjs";

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line no-restricted-imports
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { MockProxy, mock } from "jest-mock-extended";
import { of } from "rxjs";

View File

@ -19,7 +19,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { DialogService } from "@bitwarden/components";
import { PasswordRepromptService, CipherFormConfigService } from "@bitwarden/vault";
// eslint-disable-next-line no-restricted-imports
import { RoutedVaultFilterBridgeService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service";
import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter.service";
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
@ -38,7 +37,6 @@ import { ExposedPasswordsReportComponent as BaseExposedPasswordsReportComponent
RoutedVaultFilterBridgeService,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class ExposedPasswordsReportComponent
extends BaseExposedPasswordsReportComponent
implements OnInit

View File

@ -18,7 +18,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { DialogService } from "@bitwarden/components";
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
// eslint-disable-next-line no-restricted-imports
import { RoutedVaultFilterBridgeService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service";
import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter.service";
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
@ -37,7 +36,6 @@ import { InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponen
RoutedVaultFilterBridgeService,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class InactiveTwoFactorReportComponent
extends BaseInactiveTwoFactorReportComponent
implements OnInit

View File

@ -18,7 +18,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { DialogService } from "@bitwarden/components";
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
// eslint-disable-next-line no-restricted-imports
import { RoutedVaultFilterBridgeService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service";
import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter.service";
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
@ -37,7 +36,6 @@ import { ReusedPasswordsReportComponent as BaseReusedPasswordsReportComponent }
RoutedVaultFilterBridgeService,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class ReusedPasswordsReportComponent
extends BaseReusedPasswordsReportComponent
implements OnInit

View File

@ -18,7 +18,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { DialogService } from "@bitwarden/components";
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
// eslint-disable-next-line no-restricted-imports
import { RoutedVaultFilterBridgeService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service";
import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter.service";
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
@ -37,7 +36,6 @@ import { UnsecuredWebsitesReportComponent as BaseUnsecuredWebsitesReportComponen
RoutedVaultFilterBridgeService,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class UnsecuredWebsitesReportComponent
extends BaseUnsecuredWebsitesReportComponent
implements OnInit

View File

@ -19,7 +19,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { DialogService } from "@bitwarden/components";
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
// eslint-disable-next-line no-restricted-imports
import { RoutedVaultFilterBridgeService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service";
import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vault-filter/services/routed-vault-filter.service";
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
@ -38,7 +37,6 @@ import { WeakPasswordsReportComponent as BaseWeakPasswordsReportComponent } from
RoutedVaultFilterBridgeService,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class WeakPasswordsReportComponent
extends BaseWeakPasswordsReportComponent
implements OnInit

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line no-restricted-imports
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { MockProxy, mock } from "jest-mock-extended";
import { of } from "rxjs";

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line no-restricted-imports
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { MockProxy, mock } from "jest-mock-extended";
import { of } from "rxjs";

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line no-restricted-imports
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { mock, MockProxy } from "jest-mock-extended";
import { of } from "rxjs";

View File

@ -39,7 +39,6 @@ import { SendAccessTextComponent } from "./send-access-text.component";
NoItemsModule,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class AccessComponent implements OnInit {
protected send: SendAccessView;
protected sendType = SendType;

View File

@ -61,7 +61,6 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
);
}
// eslint-disable-next-line @typescript-eslint/no-empty-function
async ngOnInit() {
this.orgDomains$ = this.orgDomainService.orgDomains$;

View File

@ -25,7 +25,6 @@ import { DialogService, ToastService } from "@bitwarden/components";
selector: "app-org-manage-scim",
templateUrl: "scim.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class ScimComponent implements OnInit {
loading = true;
organizationId: string;

View File

@ -9,7 +9,6 @@ import { OrganizationPlansComponent } from "@bitwarden/web-vault/app/billing";
selector: "app-create-organization",
templateUrl: "create-organization.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class CreateOrganizationComponent implements OnInit {
@ViewChild(OrganizationPlansComponent, { static: true })
orgPlansComponent: OrganizationPlansComponent;

View File

@ -20,7 +20,6 @@ import { EventExportService } from "@bitwarden/web-vault/app/tools/event-export"
selector: "provider-events",
templateUrl: "events.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class EventsComponent extends BaseEventsComponent implements OnInit {
exportFileName = "provider-events";
providerId: string;

View File

@ -21,7 +21,6 @@ import { DialogService, ToastService } from "@bitwarden/components";
selector: "provider-account",
templateUrl: "account.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class AccountComponent implements OnDestroy, OnInit {
selfHosted = false;
loading = true;

View File

@ -14,7 +14,6 @@ import { ToastService } from "@bitwarden/components";
selector: "app-verify-recover-delete-provider",
templateUrl: "verify-recover-delete-provider.component.html",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class VerifyRecoverDeleteProviderComponent implements OnInit {
name: string;

View File

@ -15,7 +15,6 @@ import {
DrawerType,
PasswordHealthReportApplicationsResponse,
} from "@bitwarden/bit-common/tools/reports/risk-insights/models/password-health";
// eslint-disable-next-line no-restricted-imports -- used for dependency injection
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
import { devFlagEnabled } from "@bitwarden/common/platform/misc/flags";

View File

@ -27,6 +27,9 @@ export default tseslint.config(
importPlugin.flatConfigs.typescript,
eslintConfigPrettier, // Disables rules that conflict with Prettier
],
linterOptions: {
reportUnusedDisableDirectives: "error",
},
plugins: {
rxjs: rxjs,
"rxjs-angular": angularRxjs,

View File

@ -107,7 +107,6 @@ export class LoginViaAuthRequestComponentV1
this.authRequestService.authRequestPushNotification$
.pipe(takeUntil(this.destroy$))
.subscribe((id) => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.verifyAndHandleApprovedAuthReq(id).catch((e: Error) => {
this.toastService.showToast({
variant: "error",

View File

@ -4,7 +4,6 @@ import { ActivatedRoute, convertToParamMap, Router } from "@angular/router";
import { mock, MockProxy } from "jest-mock-extended";
import { BehaviorSubject } from "rxjs";
// eslint-disable-next-line no-restricted-imports
import { WINDOW } from "@bitwarden/angular/services/injection-tokens";
import {
LoginStrategyServiceAbstraction,

View File

@ -6,7 +6,6 @@ import { ActivatedRoute, NavigationExtras, Router } from "@angular/router";
import { firstValueFrom } from "rxjs";
import { first } from "rxjs/operators";
// eslint-disable-next-line no-restricted-imports
import { WINDOW } from "@bitwarden/angular/services/injection-tokens";
import {
LoginStrategyServiceAbstraction,

View File

@ -23,7 +23,6 @@ import { KeyService } from "@bitwarden/key-management";
@Directive({
selector: "app-user-verification",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class UserVerificationComponent implements ControlValueAccessor, OnInit, OnDestroy {
private _invalidSecret = false;
@Input()

View File

@ -6,7 +6,6 @@ import { ActivatedRoute, convertToParamMap, Router } from "@angular/router";
import { mock, MockProxy } from "jest-mock-extended";
import { BehaviorSubject } from "rxjs";
// eslint-disable-next-line no-restricted-imports
import { WINDOW } from "@bitwarden/angular/services/injection-tokens";
import {
LoginStrategyServiceAbstraction,

View File

@ -68,7 +68,6 @@ import { ActiveClientVerificationOption } from "./active-client-verification-opt
CalloutModule,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class UserVerificationFormInputComponent implements ControlValueAccessor, OnInit, OnDestroy {
@Input() verificationType: "server" | "client" = "server"; // server represents original behavior
private _invalidSecret = false;

View File

@ -14,7 +14,6 @@ export abstract class TokenRequest {
this.device = device != null ? device : null;
}
// eslint-disable-next-line
alterIdentityTokenHeaders(headers: Headers) {
// Implemented in subclass if required
}

View File

@ -1,6 +1,5 @@
import { MockProxy, mock } from "jest-mock-extended";
// eslint-disable-next-line import/no-restricted-paths -- Needed to print log messages
import { FakeStorageService } from "../../spec/fake-storage.service";
// eslint-disable-next-line import/no-restricted-paths -- Needed client type enum
import { ClientType } from "../enums";

View File

@ -1,5 +1,4 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
// eslint-disable-next-line
import "zone.js/testing";
import { getTestBed } from "@angular/core/testing";

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const userAccountData = `nickname,url,username,password,additionalInfo,twofaSecret,status,tags
PasswordNickname,www.google.com,user.name@email.com,abc123,This is the additional information text.,someTOTPSeed,active,someTag`;

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const userCreditCardData = `nickname,status,tags,cardNumber,cardName,exp_month,exp_year,cvv,additionalInfo
Visa test card,active,someTag,4111111111111111,Joe User,04,24,222,This is the additional information field`;

View File

@ -1,4 +1,3 @@
/* eslint-disable */
export const userIdCardData = `nickname,status,tags,idType,idNumber,idName,idIssuanceDate,idExpirationDate,idCountry,additionalInfo
Joe User's nickname,active,someTag,Driver's License,123456,Joe M User,02/02/2022,02/02/2024,United States,Additional information
Passport ID card,active,someTag,Passport,1234567,Joe M User,03/07/2022,03/07/2028,United States,Additional information field

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const userIdentityData = `nickname,status,tags,firstName,middleName,lastName,email,firstAddressLine,secondAddressLine,title,gender,number,city,country,zipCode,additionalInfo
Joe User's nickname,active,someTag,Joe,M,User,joe.user@email.com,1 Example House,Suite 300,Mr,Male,2223334444,Portland,United States,04101,Additional information field`;

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const userNoteData = `nickname,status,content
The title of a secure note,active,"The content of a secure note. Lorem ipsum, etc."`;

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const userTwoFaData = `nickname,status,tags,authToken,additionalInfo
2FA nickname,active,someTag,someTOTPSeed,"Additional information field content. "`;

View File

@ -260,7 +260,6 @@ export class DefaultKeyService implements KeyServiceAbstraction {
}
if (keySuffix === KeySuffixOptions.Pin && userId != null) {
// 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.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);
// 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

View File

@ -36,7 +36,7 @@ import {
} from "@bitwarden/vault";
// FIXME: remove `/apps` import from `/libs`
// FIXME: remove `src` and fix import
// eslint-disable-next-line import/no-restricted-paths, no-restricted-imports
// eslint-disable-next-line no-restricted-imports
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/src/app/core/tests";
import { CipherFormService } from "./abstractions/cipher-form.service";