build: Replace Codelyzer and TSLint with Angular ESLint
Migrate from the deprecated TSLint to Angluar ESLint. Also fix current linting issues in the code, in particular: - Use strict equals operators (=== and !==) - Remove empty lifecycle methods (mostly ngOnInit) - Output bindings including aliases should not be named as standard dom events (submit) - Async pipe results should not be negated
This commit is contained in:
+1
-1
@@ -290,7 +290,7 @@
|
||||
<button mat-raised-button [routerLink]="['../..']">
|
||||
{{"labels.buttons.Cancel" | translate}}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="submit.emit()">
|
||||
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
|
||||
{{"labels.buttons.Submit" | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+3
-5
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||
|
||||
/**
|
||||
* Create Loans Account Preview Step
|
||||
@@ -9,7 +9,7 @@ import { Component, OnInit, Input, Output, EventEmitter, OnDestroy, OnChanges, S
|
||||
templateUrl: './loans-account-preview-step.component.html',
|
||||
styleUrls: ['./loans-account-preview-step.component.scss']
|
||||
})
|
||||
export class LoansAccountPreviewStepComponent implements OnInit, OnChanges {
|
||||
export class LoansAccountPreviewStepComponent implements OnChanges {
|
||||
|
||||
/** Loans Account Template */
|
||||
@Input() loansAccountTemplate: any = [];
|
||||
@@ -18,7 +18,7 @@ export class LoansAccountPreviewStepComponent implements OnInit, OnChanges {
|
||||
/** Loans Account Data */
|
||||
@Input() loansAccount: any;
|
||||
/** Submit Loans Account */
|
||||
@Output() submit = new EventEmitter();
|
||||
@Output() submitEvent = new EventEmitter();
|
||||
|
||||
/** Charges Displayed Columns */
|
||||
chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType', 'date'];
|
||||
@@ -29,8 +29,6 @@ export class LoansAccountPreviewStepComponent implements OnInit, OnChanges {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.productEnableDownPayment = this.loansAccountProductTemplate.product.enableDownPayment;
|
||||
}
|
||||
|
||||
+2
-4
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
@@ -8,7 +8,7 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
templateUrl: './loans-account-schedule-step.component.html',
|
||||
styleUrls: ['./loans-account-schedule-step.component.scss']
|
||||
})
|
||||
export class LoansAccountScheduleStepComponent implements OnInit {
|
||||
export class LoansAccountScheduleStepComponent {
|
||||
|
||||
/** Currency Code */
|
||||
@Input() currencyCode: string;
|
||||
@@ -29,8 +29,6 @@ export class LoansAccountScheduleStepComponent implements OnInit {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
showRepaymentInfo(): void {
|
||||
this.repaymentScheduleDetails = {periods: []};
|
||||
const locale = this.settingsService.language.code;
|
||||
|
||||
+19
-19
@@ -83,7 +83,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="14%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value == 2">
|
||||
<mat-form-field fxFlex="14%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value === 2">
|
||||
<mat-label>{{"labels.inputs.Select On" | translate}}</mat-label>
|
||||
<mat-select formControlName="repaymentFrequencyNthDayType">
|
||||
<mat-option *ngFor="let repaymentFrequencyNthDayType of repaymentFrequencyNthDayTypeData"
|
||||
@@ -93,7 +93,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="14%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value == 2">
|
||||
<mat-form-field fxFlex="14%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value === 2">
|
||||
<mat-label>{{"labels.inputs.Select Day" | translate}}</mat-label>
|
||||
<mat-select formControlName="repaymentFrequencyDayOfWeekType">
|
||||
<mat-option *ngFor="let repaymentFrequencyDayOfWeekType of repaymentFrequencyDaysOfWeekTypeData"
|
||||
@@ -329,15 +329,15 @@
|
||||
<span fxFlex="40%">{{"labels.inputs.Frequency Interval for recalculation" | translate}}</span>
|
||||
<span fxFlex="60%">
|
||||
<span>{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.value}}</span>
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id == 3 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday != null">
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 3 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday">
|
||||
on {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value}}</span>
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id == 4 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay != null">on day
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay">on day
|
||||
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay}}</span>
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id == 4 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay == null &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay != null">on
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 &&
|
||||
! loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay">on
|
||||
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value}}
|
||||
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value}}</span>
|
||||
</span>
|
||||
@@ -346,7 +346,7 @@
|
||||
</ng-container>
|
||||
|
||||
<div fxFlexFill
|
||||
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id != 1">
|
||||
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id !== 1">
|
||||
<span fxFlex="40%">{{"labels.inputs.Frequency Interval for recalculation" | translate}}</span>
|
||||
<span fxFlex="60%">{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval}}</span>
|
||||
</div>
|
||||
@@ -401,23 +401,23 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container
|
||||
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id != 0">
|
||||
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0">
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Frequency for compounding" | translate}}</span>
|
||||
<span fxFlex="60%">{{
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.value}}
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id == 3 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday != null">
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday">
|
||||
on {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value}}
|
||||
</span>
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id == 4 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay != null">on day
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay">on day
|
||||
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay}}
|
||||
</span>
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id == 4 &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay == null &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay != null">on
|
||||
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 &&
|
||||
! loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay &&
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay">on
|
||||
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value}}
|
||||
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value}}
|
||||
</span>
|
||||
@@ -426,7 +426,7 @@
|
||||
</ng-container>
|
||||
|
||||
<div fxFlexFill
|
||||
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id != 0 && loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id != 1">
|
||||
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0 && loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id !== 1">
|
||||
<span fxFlex="40%">{{"labels.inputs.Frequency Interval for compounding" | translate}}</span>
|
||||
<span fxFlex="60%">{{
|
||||
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval}}</span>
|
||||
|
||||
Reference in New Issue
Block a user