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:
@@ -58,7 +58,7 @@
|
||||
<ng-template matStepLabel>{{"labels.inputs.PREVIEW" | translate}}</ng-template>
|
||||
|
||||
<mifosx-loans-account-preview-step [loansAccountTemplate]="loansAccountTemplate"
|
||||
[loansAccountProductTemplate]="loansAccountProductTemplate" [loansAccount]="loansAccount" (submit)="submit()">
|
||||
[loansAccountProductTemplate]="loansAccountProductTemplate" [loansAccount]="loansAccount" (submitEvent)="submit()">
|
||||
</mifosx-loans-account-preview-step>
|
||||
|
||||
</mat-step>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -13,7 +13,7 @@ import { GlimTermsStepComponent } from './glim-account-stepper/glim-terms-step/g
|
||||
templateUrl: './create-glim-account.component.html',
|
||||
styleUrls: ['./create-glim-account.component.scss']
|
||||
})
|
||||
export class CreateGlimAccountComponent implements OnInit {
|
||||
export class CreateGlimAccountComponent {
|
||||
|
||||
/** Imports all the step component */
|
||||
@ViewChild(GlimDetailsStepComponent, { static: true }) loansAccountDetailsStep: GlimDetailsStepComponent;
|
||||
@@ -61,9 +61,6 @@ export class CreateGlimAccountComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets loans account product template and collateral template
|
||||
* @param {any} $event API response
|
||||
|
||||
+1
-1
@@ -269,7 +269,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
-6
@@ -1,11 +1,11 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-glim-preview-step',
|
||||
templateUrl: './glim-preview-step.component.html',
|
||||
styleUrls: ['./glim-preview-step.component.scss']
|
||||
})
|
||||
export class GlimPreviewStepComponent implements OnInit {
|
||||
export class GlimPreviewStepComponent {
|
||||
|
||||
|
||||
/** Loans Account Template */
|
||||
@@ -15,7 +15,7 @@ export class GlimPreviewStepComponent implements OnInit {
|
||||
/** 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'];
|
||||
@@ -24,7 +24,4 @@ export class GlimPreviewStepComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value == 2">
|
||||
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value === 2">
|
||||
<mat-label>{{"labels.inputs.Select On" | translate}}</mat-label>
|
||||
<mat-select formControlName="repaymentFrequencyNthDayType">
|
||||
<mat-option
|
||||
@@ -73,7 +73,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value == 2">
|
||||
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value === 2">
|
||||
<mat-label>{{"labels.inputs.Select Day" | translate}}</mat-label>
|
||||
<mat-select formControlName="repaymentFrequencyDayOfWeekType">
|
||||
<mat-option
|
||||
|
||||
Reference in New Issue
Block a user