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,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
/** Custom Components */
import { LoanAccountTableComponent } from '../loan-account-table/loan-account-table.component';
@@ -11,7 +11,7 @@ import { SavingsAccountTableComponent } from '../savings-account-table/savings-a
templateUrl: './center-navigation.component.html',
styleUrls: ['./center-navigation.component.scss']
})
export class CenterNavigationComponent implements OnInit {
export class CenterNavigationComponent {
@ViewChild(LoanAccountTableComponent) loanAccountTableComponent: LoanAccountTableComponent;
@ViewChild(SavingsAccountTableComponent) savingsAccountTableComponent: SavingsAccountTableComponent;
@@ -23,7 +23,4 @@ export class CenterNavigationComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
/** Custom Components */
import { LoanAccountTableComponent } from '../loan-account-table/loan-account-table.component';
@@ -12,7 +12,7 @@ import { MemberGroupsComponent } from '../member-groups/member-groups.component'
templateUrl: './client-navigation.component.html',
styleUrls: ['./client-navigation.component.scss']
})
export class ClientNavigationComponent implements OnInit {
export class ClientNavigationComponent {
@ViewChild(LoanAccountTableComponent) loanAccountTableComponent: LoanAccountTableComponent;
@ViewChild(SavingsAccountTableComponent) savingsAccountTableComponent: SavingsAccountTableComponent;
@@ -24,7 +24,4 @@ export class ClientNavigationComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
/** Custom Components */
import { LoanAccountTableComponent } from '../loan-account-table/loan-account-table.component';
@@ -11,7 +11,7 @@ import { SavingsAccountTableComponent } from '../savings-account-table/savings-a
templateUrl: './group-navigation.component.html',
styleUrls: ['./group-navigation.component.scss']
})
export class GroupNavigationComponent implements OnInit {
export class GroupNavigationComponent {
@ViewChild(LoanAccountTableComponent) loanAccountTableComponent: LoanAccountTableComponent;
@ViewChild(SavingsAccountTableComponent) savingsAccountTableComponent: SavingsAccountTableComponent;
@@ -22,7 +22,4 @@ export class GroupNavigationComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
@@ -12,7 +12,7 @@ import { AccountsFilterPipe } from '../../pipes/accounts-filter.pipe';
templateUrl: './loan-account-table.component.html',
styleUrls: ['./loan-account-table.component.scss']
})
export class LoanAccountTableComponent implements OnInit {
export class LoanAccountTableComponent {
/** Columns to be displayed in the loan accounts table. */
displayedColumns: string[] = ['accountNo', 'productName', 'Type', 'Status'];
@@ -50,9 +50,6 @@ export class LoanAccountTableComponent implements OnInit {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
ngOnInit() {
}
/**
* Toggles the loan status
*/
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
@@ -9,7 +9,7 @@ import { MatTableDataSource } from '@angular/material/table';
templateUrl: './member-groups.component.html',
styleUrls: ['./member-groups.component.scss']
})
export class MemberGroupsComponent implements OnInit {
export class MemberGroupsComponent {
/** Columns to be displayed in the member groups table. */
displayedColumns: string[] = ['accountNo', 'name'];
@@ -38,6 +38,4 @@ export class MemberGroupsComponent implements OnInit {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
ngOnInit() { }
}
@@ -1,20 +1,17 @@
/** Angular Imports */
import { Component, OnInit, Input } from '@angular/core';
import { Component, Input } from '@angular/core';
@Component({
selector: 'mifosx-office-navigation',
templateUrl: './office-navigation.component.html',
styleUrls: ['./office-navigation.component.scss']
})
export class OfficeNavigationComponent implements OnInit {
export class OfficeNavigationComponent {
@Input() officeData: any;
@Input() employeeData: any;
constructor() { }
ngOnInit() {
}
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
@@ -12,7 +12,7 @@ import { AccountsFilterPipe } from '../../pipes/accounts-filter.pipe';
templateUrl: './savings-account-table.component.html',
styleUrls: ['./savings-account-table.component.scss']
})
export class SavingsAccountTableComponent implements OnInit {
export class SavingsAccountTableComponent {
/** Columns to be displayed in the savings accounts table. */
displayedColumns: string[] = ['accountNo', 'productName', 'accountBalance', 'Status'];
@@ -50,9 +50,6 @@ export class SavingsAccountTableComponent implements OnInit {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
ngOnInit() {
}
/**
* Toggles the savings status
*/
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
@@ -12,7 +12,7 @@ import { AccountsFilterPipe } from '../../pipes/accounts-filter.pipe';
templateUrl: './share-account-table.component.html',
styleUrls: ['./share-account-table.component.scss']
})
export class ShareAccountTableComponent implements OnInit {
export class ShareAccountTableComponent {
/** Columns to be displayed in the share accounts table. */
displayedColumns: string[] = ['accountNo', 'productName', 'totalApprovedShares', 'Status'];
@@ -50,9 +50,6 @@ export class ShareAccountTableComponent implements OnInit {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
ngOnInit() {
}
/**
* Toggles the share status
*/
@@ -1,19 +1,16 @@
/** Angular Imports */
import { Component, OnInit, Input } from '@angular/core';
import { Component, Input } from '@angular/core';
@Component({
selector: 'mifosx-staff-navigation',
templateUrl: './staff-navigation.component.html',
styleUrls: ['./staff-navigation.component.scss']
})
export class StaffNavigationComponent implements OnInit {
export class StaffNavigationComponent {
@Input() employeeData: any;
@Input() centerData: any;
constructor() { }
ngOnInit() {
}
}