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,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 'app/shared/delete-dialog/delete-dialog.co
|
||||
templateUrl: './view-adhoc-query.component.html',
|
||||
styleUrls: ['./view-adhoc-query.component.scss']
|
||||
})
|
||||
export class ViewAdhocQueryComponent implements OnInit {
|
||||
export class ViewAdhocQueryComponent {
|
||||
|
||||
/** Adhoc query data. */
|
||||
adhocQueryData: any;
|
||||
@@ -38,9 +38,6 @@ export class ViewAdhocQueryComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the report run frequency value from id
|
||||
* @returns {string} Report run frequency value.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
/**
|
||||
* Bulk Import component.
|
||||
@@ -9,14 +9,12 @@ import { Component, OnInit } from '@angular/core';
|
||||
templateUrl: './bulk-import.component.html',
|
||||
styleUrls: ['./bulk-import.component.scss']
|
||||
})
|
||||
export class BulkImportComponent implements OnInit {
|
||||
export class BulkImportComponent {
|
||||
// Initialize an array of 17 boolean values, all set to false
|
||||
arrowBooleans: boolean[] = new Array(17).fill(false);
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
/**
|
||||
* Popover function
|
||||
* @param arrowNumber - The index of the boolean value to toggle.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/**
|
||||
@@ -10,7 +10,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
templateUrl: './view-employee.component.html',
|
||||
styleUrls: ['./view-employee.component.scss']
|
||||
})
|
||||
export class ViewEmployeeComponent implements OnInit {
|
||||
export class ViewEmployeeComponent {
|
||||
|
||||
/** Employee data. */
|
||||
employeeData: any;
|
||||
@@ -25,7 +25,4 @@ export class ViewEmployeeComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
templateUrl: './view-fund.component.html',
|
||||
styleUrls: ['./view-fund.component.scss']
|
||||
})
|
||||
export class ViewFundComponent implements OnInit {
|
||||
export class ViewFundComponent {
|
||||
|
||||
/** Fund data. */
|
||||
fundData: any;
|
||||
@@ -21,7 +21,4 @@ export class ViewFundComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -14,7 +14,7 @@ import { PopoverService } from '../configuration-wizard/popover/popover.service'
|
||||
templateUrl: './organization.component.html',
|
||||
styleUrls: ['./organization.component.scss']
|
||||
})
|
||||
export class OrganizationComponent implements OnInit, AfterViewInit {
|
||||
export class OrganizationComponent implements AfterViewInit {
|
||||
|
||||
shouldShowFundMapping = false;
|
||||
/* Reference of manage offices */
|
||||
@@ -55,9 +55,6 @@ export class OrganizationComponent implements OnInit, AfterViewInit {
|
||||
private configurationWizardService: ConfigurationWizardService,
|
||||
private popoverService: PopoverService) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Popover function
|
||||
* @param template TemplateRef<any>.
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<mifosx-campaign-preview-step
|
||||
[smsCampaignTemplate]="smsCampaignTemplate"
|
||||
[campaign]="smsCampaign" (submit)="submit()"
|
||||
[campaign]="smsCampaign" (submitEvent)="submit()"
|
||||
>
|
||||
</mifosx-campaign-preview-step>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<mifosx-campaign-preview-step
|
||||
[campaign]="smsCampaign"
|
||||
[editedCampaignMessage]="campaignMessage"
|
||||
[smsCampaignTemplate]="smsCampaignTemplate" (submit)="submit()"
|
||||
[smsCampaignTemplate]="smsCampaignTemplate" (submitEvent)="submit()"
|
||||
>
|
||||
</mifosx-campaign-preview-step>
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,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>
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ export class CampaignPreviewStepComponent implements OnInit {
|
||||
smsProviders: any[];
|
||||
|
||||
/** Emits submit() event */
|
||||
@Output() submit = new EventEmitter;
|
||||
@Output() submitEvent = new EventEmitter;
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
@@ -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-teller.component.html',
|
||||
styleUrls: ['./view-teller.component.scss']
|
||||
})
|
||||
export class ViewTellerComponent implements OnInit {
|
||||
export class ViewTellerComponent {
|
||||
|
||||
/** Teller data. */
|
||||
tellerData: any;
|
||||
@@ -38,9 +38,6 @@ export class ViewTellerComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the teller and redirects to tellers.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user