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:
Ralph Hopman
2024-11-08 09:37:08 +01:00
committed by Adam Saghy
parent e910679673
commit 9034ce2847
204 changed files with 2184 additions and 1173 deletions
@@ -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,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>
@@ -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;