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 } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
@@ -17,7 +17,7 @@ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dial
templateUrl: './view-rule.component.html',
styleUrls: ['./view-rule.component.scss']
})
export class ViewRuleComponent implements OnInit {
export class ViewRuleComponent {
/** Accounting rule. */
accountingRule: any;
@@ -38,9 +38,6 @@ export class ViewRuleComponent implements OnInit {
});
}
ngOnInit() {
}
/**
* Deletes the accounting rule and redirects to accounting rules.
*/
+2 -5
View File
@@ -1,5 +1,5 @@
/** Angular Imports */
import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
/** Custom Services */
@@ -14,7 +14,7 @@ import { PopoverService } from '../configuration-wizard/popover/popover.service'
templateUrl: './accounting.component.html',
styleUrls: ['./accounting.component.scss']
})
export class AccountingComponent implements OnInit, AfterViewInit {
export class AccountingComponent implements AfterViewInit {
/* Reference of Chart of Accounts */
@ViewChild('chartofAccounts') chartofAccounts: ElementRef<any>;
@@ -48,9 +48,6 @@ export class AccountingComponent implements OnInit, AfterViewInit {
private configurationWizardService: ConfigurationWizardService,
private popoverService: PopoverService) { }
ngOnInit() {
}
/**
* Popover function
* @param template TemplateRef<any>.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
@@ -18,7 +18,7 @@ import { Location } from '@angular/common';
templateUrl: './view-gl-account.component.html',
styleUrls: ['./view-gl-account.component.scss']
})
export class ViewGlAccountComponent implements OnInit {
export class ViewGlAccountComponent {
/** GL Account. */
glAccount: any;
@@ -40,9 +40,6 @@ export class ViewGlAccountComponent implements OnInit {
});
}
ngOnInit() {
}
/**
* Deletes the gl account and redirects to chart of accounts.
*/
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
@@ -17,7 +17,7 @@ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dial
templateUrl: './view-closure.component.html',
styleUrls: ['./view-closure.component.scss']
})
export class ViewClosureComponent implements OnInit {
export class ViewClosureComponent {
/** GL Account closure. */
glAccountClosure: any;
@@ -38,9 +38,6 @@ export class ViewClosureComponent implements OnInit {
});
}
ngOnInit() {
}
/**
* Deletes the gl account closure and redirects to closing entries.
*/
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
@@ -18,7 +18,7 @@ import { Location } from '@angular/common';
templateUrl: './view-financial-activity-mapping.component.html',
styleUrls: ['./view-financial-activity-mapping.component.scss']
})
export class ViewFinancialActivityMappingComponent implements OnInit {
export class ViewFinancialActivityMappingComponent {
/** Financial activity account ID. */
financialActivityAccountId: any;
@@ -43,9 +43,6 @@ export class ViewFinancialActivityMappingComponent implements OnInit {
});
}
ngOnInit() {
}
/**
* Deletes the financial activity account and redirects to financial activity mappings.
*/
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Inject } from '@angular/core';
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { UntypedFormControl } from '@angular/forms';
@@ -11,7 +11,7 @@ import { UntypedFormControl } from '@angular/forms';
templateUrl: './revert-transaction.component.html',
styleUrls: ['./revert-transaction.component.scss']
})
export class RevertTransactionComponent implements OnInit {
export class RevertTransactionComponent {
/** Comments input form control. */
comments = new UntypedFormControl('');
@@ -23,7 +23,4 @@ export class RevertTransactionComponent implements OnInit {
constructor(public dialogRef: MatDialogRef<RevertTransactionComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
}
}