mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-2340] Enable use-lifecycle-interface (#5488)
Enables one of the recommended rules of @angular-eslint. Since this rule was fairly trivial to fix and has no QA effects it seemed reasonable to migrate all code.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
|
||||
import { AppComponent as BaseAppComponent } from "@bitwarden/web-vault/app/app.component";
|
||||
|
||||
@@ -10,7 +10,7 @@ import { MaximumVaultTimeoutPolicy } from "./admin-console/policies/maximum-vaul
|
||||
selector: "app-root",
|
||||
templateUrl: "../../../../apps/web/src/app/app.component.html",
|
||||
})
|
||||
export class AppComponent extends BaseAppComponent {
|
||||
export class AppComponent extends BaseAppComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { Subject, concatMap, takeUntil } from "rxjs";
|
||||
|
||||
@@ -16,7 +16,7 @@ import { ToastService } from "@bitwarden/components";
|
||||
selector: "app-provider-subscription",
|
||||
templateUrl: "./provider-subscription.component.html",
|
||||
})
|
||||
export class ProviderSubscriptionComponent {
|
||||
export class ProviderSubscriptionComponent implements OnInit, OnDestroy {
|
||||
providerId: string;
|
||||
subscription: ProviderSubscriptionResponse;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { combineLatest, combineLatestWith, filter, Observable, startWith, switchMap } from "rxjs";
|
||||
|
||||
@@ -31,7 +31,7 @@ import { ProjectService } from "../project.service";
|
||||
selector: "sm-project-secrets",
|
||||
templateUrl: "./project-secrets.component.html",
|
||||
})
|
||||
export class ProjectSecretsComponent {
|
||||
export class ProjectSecretsComponent implements OnInit {
|
||||
secrets$: Observable<SecretListView[]>;
|
||||
|
||||
private organizationId: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
||||
import { ChangeDetectorRef, Component, Inject, OnInit } from "@angular/core";
|
||||
import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from "@angular/core";
|
||||
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
||||
import { lastValueFrom, Subject, takeUntil } from "rxjs";
|
||||
|
||||
@@ -54,7 +54,7 @@ export interface SecretOperation {
|
||||
@Component({
|
||||
templateUrl: "./secret-dialog.component.html",
|
||||
})
|
||||
export class SecretDialogComponent implements OnInit {
|
||||
export class SecretDialogComponent implements OnInit, OnDestroy {
|
||||
loading = true;
|
||||
projects: ProjectListView[];
|
||||
addNewProject = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
||||
import { Component, Inject } from "@angular/core";
|
||||
import { Component, Inject, OnInit } from "@angular/core";
|
||||
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
||||
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
@@ -24,7 +24,7 @@ export interface ServiceAccountOperation {
|
||||
@Component({
|
||||
templateUrl: "./service-account-dialog.component.html",
|
||||
})
|
||||
export class ServiceAccountDialogComponent {
|
||||
export class ServiceAccountDialogComponent implements OnInit {
|
||||
protected formGroup = new FormGroup(
|
||||
{
|
||||
name: new FormControl("", {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnDestroy } from "@angular/core";
|
||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { Subject, takeUntil } from "rxjs";
|
||||
|
||||
@@ -16,7 +16,10 @@ import { ServiceAccountEventLogApiService } from "./service-account-event-log-ap
|
||||
selector: "sm-service-accounts-events",
|
||||
templateUrl: "./service-accounts-events.component.html",
|
||||
})
|
||||
export class ServiceAccountEventsComponent extends BaseEventsComponent implements OnDestroy {
|
||||
export class ServiceAccountEventsComponent
|
||||
extends BaseEventsComponent
|
||||
implements OnInit, OnDestroy
|
||||
{
|
||||
exportFileName = "machine-account-events";
|
||||
private destroy$ = new Subject<void>();
|
||||
private serviceAccountId: string;
|
||||
|
||||
Reference in New Issue
Block a user