1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[SM-265] Add eslint rule forbidding get().value (#3671)

This commit is contained in:
Oscar Hinton
2022-10-04 15:40:00 +02:00
committed by GitHub
parent 9ca877a7be
commit b153ed6d01
7 changed files with 25 additions and 23 deletions

View File

@@ -135,7 +135,7 @@ export class LoginComponent extends BaseLoginComponent {
}
async goAfterLogIn() {
const masterPassword = this.formGroup.get("masterPassword")?.value;
const masterPassword = this.formGroup.value.masterPassword;
// Check master password against policy
if (this.enforcedPasswordPolicyOptions != null) {
@@ -170,7 +170,7 @@ export class LoginComponent extends BaseLoginComponent {
}
async submit() {
const rememberEmail = this.formGroup.get("rememberEmail")?.value;
const rememberEmail = this.formGroup.value.rememberEmail;
await this.stateService.setRememberEmail(rememberEmail);
if (!rememberEmail) {
@@ -192,7 +192,7 @@ export class LoginComponent extends BaseLoginComponent {
}
private getPasswordStrengthUserInput() {
const email = this.formGroup.get("email")?.value;
const email = this.formGroup.value.email;
let userInput: string[] = [];
const atPosition = email.indexOf("@");
if (atPosition > -1) {

View File

@@ -73,7 +73,7 @@ export class RegisterFormComponent extends BaseRegisterComponent {
this.enforcedPolicyOptions != null &&
!this.policyService.evaluateMasterPassword(
this.passwordStrengthResult.score,
this.formGroup.get("masterPassword")?.value,
this.formGroup.value.masterPassword,
this.enforcedPolicyOptions
)
) {

View File

@@ -57,8 +57,8 @@ export class BillingComponent extends OrganizationPlansComponent {
async ngOnInit() {
const additionalSeats = this.product == ProductType.Families ? 0 : 1;
this.formGroup.patchValue({
name: this.orgInfoForm.get("name")?.value,
billingEmail: this.orgInfoForm.get("email")?.value,
name: this.orgInfoForm.value.name,
billingEmail: this.orgInfoForm.value.email,
additionalSeats: additionalSeats,
plan: this.plan,
product: this.product,