From 9df52d660feb722404be00a50f3c8a612bec1c15 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 14:42:53 +0200 Subject: Migrate client to eslint --- client/src/app/+signup/+register/custom-stepper.component.ts | 6 +++--- client/src/app/+signup/+register/register.component.ts | 11 +++++++---- .../verify-account-email/verify-account-email.component.ts | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'client/src/app/+signup') diff --git a/client/src/app/+signup/+register/custom-stepper.component.ts b/client/src/app/+signup/+register/custom-stepper.component.ts index 5a80895f9..3b7ba40e8 100644 --- a/client/src/app/+signup/+register/custom-stepper.component.ts +++ b/client/src/app/+signup/+register/custom-stepper.component.ts @@ -1,5 +1,5 @@ -import { Component } from '@angular/core' import { CdkStep, CdkStepper } from '@angular/cdk/stepper' +import { Component } from '@angular/core' @Component({ selector: 'my-custom-stepper', @@ -14,13 +14,13 @@ export class CustomStepperComponent extends CdkStepper { } isCompleted (step: CdkStep) { - return step.stepControl && step.stepControl.dirty && step.stepControl.valid + return step.stepControl?.dirty && step.stepControl.valid } isAccessible (index: number) { const stepsCompletedMap = this.steps.map(step => this.isCompleted(step)) return index === 0 ? true - : stepsCompletedMap[ index - 1 ] + : stepsCompletedMap[index - 1] } } diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts index 056442107..d8ac39c7c 100644 --- a/client/src/app/+signup/+register/register.component.ts +++ b/client/src/app/+signup/+register/register.component.ts @@ -49,8 +49,7 @@ export class RegisterComponent implements OnInit { private authService: AuthService, private userService: UserService, private hooks: HooksService - ) { - } + ) { } get requiresEmailVerification () { return this.serverConfig.signup.requiresEmailVerification @@ -138,11 +137,15 @@ export class RegisterComponent implements OnInit { this.success = $localize`You are now logged in as ${body.username}!` }, - error: err => this.error = err.message + error: err => { + this.error = err.message + } }) }, - error: err => this.error = err.message + error: err => { + this.error = err.message + } }) } } diff --git a/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts index 457a0abe0..827ec7652 100644 --- a/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts +++ b/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts @@ -20,7 +20,7 @@ export class VerifyAccountEmailComponent implements OnInit { private authService: AuthService, private notifier: Notifier, private route: ActivatedRoute - ) { + ) { } ngOnInit () { -- cgit v1.2.3