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,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Currency } from 'app/shared/models/general.model';
|
||||
templateUrl: './general-tab.component.html',
|
||||
styleUrls: ['./general-tab.component.scss']
|
||||
})
|
||||
export class GeneralTabComponent implements OnInit {
|
||||
export class GeneralTabComponent {
|
||||
isLoading = true;
|
||||
isActive = false;
|
||||
entityType: string;
|
||||
@@ -33,7 +33,4 @@ export class GeneralTabComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AuthenticationService } from 'app/core/authentication/authentication.service';
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
@@ -8,7 +8,7 @@ import { SavingsService } from 'app/savings/savings.service';
|
||||
templateUrl: './notes-tab.component.html',
|
||||
styleUrls: ['./notes-tab.component.scss']
|
||||
})
|
||||
export class NotesTabComponent implements OnInit {
|
||||
export class NotesTabComponent {
|
||||
|
||||
entityId: string;
|
||||
username: string;
|
||||
@@ -25,9 +25,6 @@ export class NotesTabComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
addNote(noteContent: any) {
|
||||
this.savingsService.createSavingsNote(this.entityId, noteContent).subscribe((response: any) => {
|
||||
this.entityNotes.push({
|
||||
|
||||
+2
-6
@@ -1,7 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { UploadDocumentDialogComponent } from 'app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component';
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { environment } from 'environments/environment';
|
||||
@@ -11,7 +10,7 @@ import { environment } from 'environments/environment';
|
||||
templateUrl: './savings-documents-tab.component.html',
|
||||
styleUrls: ['./savings-documents-tab.component.scss']
|
||||
})
|
||||
export class SavingsDocumentsTabComponent implements OnInit {
|
||||
export class SavingsDocumentsTabComponent {
|
||||
|
||||
/** Stores the resolved savings documents data */
|
||||
entityDocuments: any;
|
||||
@@ -33,9 +32,6 @@ export class SavingsDocumentsTabComponent implements OnInit {
|
||||
this.entityId = this.route.parent.snapshot.paramMap.get('savingAccountId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
setSavingsDocumentsData(data: any) {
|
||||
data.forEach((ele: any) => {
|
||||
ele.docUrl = this.settingsService.serverUrl + '/savings/' + ele.parentEntityId + '/documents/' + ele.id + '/attachment?tenantIdentifier=' + environment.fineractPlatformTenantId;
|
||||
|
||||
+2
-5
@@ -1,15 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-savings-transaction-datatable-tab',
|
||||
templateUrl: './savings-transaction-datatable-tab.component.html',
|
||||
styleUrls: ['./savings-transaction-datatable-tab.component.scss']
|
||||
})
|
||||
export class SavingsTransactionDatatableTabComponent implements OnInit {
|
||||
export class SavingsTransactionDatatableTabComponent {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
<span
|
||||
*ngIf="!(transactionData.interestedPostedAsOn === false && (transactionData.transactionType.id === 17 || transactionData.transactionType.id === 3))">
|
||||
<span *mifosxHasPermission="'ADJUSTTRANSACTION_SAVINGSACCOUNT'">
|
||||
<button mat-raised-button color="primary" *ngIf="transactionData.transactionType.value == 'Transfer' || transactionData.reversed == 'true'
|
||||
|| transactionData.transactionType.id==3 || transactionData.transactionType.id==17" [routerLink]="'edit'">
|
||||
<button mat-raised-button color="primary" *ngIf="transactionData.transactionType.value === 'Transfer' || transactionData.reversed === 'true'
|
||||
|| transactionData.transactionType.id===3 || transactionData.transactionType.id===17" [routerLink]="'edit'">
|
||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>{{"labels.buttons.Edit" | translate}}
|
||||
</button>
|
||||
</span>
|
||||
|
||||
+2
-5
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -12,7 +12,7 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
templateUrl: './savings-transaction-general-tab.component.html',
|
||||
styleUrls: ['./savings-transaction-general-tab.component.scss']
|
||||
})
|
||||
export class SavingsTransactionGeneralTabComponent implements OnInit {
|
||||
export class SavingsTransactionGeneralTabComponent {
|
||||
|
||||
accountId: string;
|
||||
transactionId: string;
|
||||
@@ -30,9 +30,6 @@ export class SavingsTransactionGeneralTabComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
allowUndo(): boolean {
|
||||
if (this.transactionData.reversed && this.transactionData.transactionType.amountHold) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user