Skip to content

Commit a684a1f

Browse files
committed
fix: resolve lint errors in template
1 parent 0c5edc3 commit a684a1f

File tree

14 files changed

+24
-23
lines changed

14 files changed

+24
-23
lines changed

packages/igx-templates/igx-ts/custom-templates/awesome-grid/files/src/app/__path__/__filePrefix__.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
IgxOverlayService,
1818
IgxStringFilteringOperand,
1919
IgxSummaryResult,
20-
OverlayClosingEventArgs,
2120
OverlaySettings,
2221
IgxSwitchComponent,
2322
IgxInputGroupComponent,

packages/igx-templates/igx-ts/custom-templates/fintech-grid/files/src/app/__path__/__filePrefix__.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<igx-switch [checked]="true" [(ngModel)]="theme" (change)="onThemeChanged($event)">Dark</igx-switch>
66
</div>
77
<div class="control-item">
8-
<igx-switch [checked]="grouped" (change)="onChange($event)"
8+
<igx-switch [checked]="grouped" (change)="onChange()"
99
cssClass="fintech-sample-switch">
1010
Grouped</igx-switch>
1111
</div>
@@ -203,7 +203,7 @@
203203
</div>
204204

205205
<igx-dialog #dialog [closeOnOutsideSelect]="true" (closed)="onCloseHandler()">
206-
<div (keydown)="closeDialog($event)">
206+
<div (keydown)="closeDialog($event)" tabindex="0">
207207
<igx-dialog-title> Chart </igx-dialog-title>
208208

209209
<div style="padding: 20px">

packages/igx-templates/igx-ts/custom-templates/fintech-grid/files/src/app/__path__/__filePrefix__.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
250250
}
251251
}
252252

253-
public onChange(event: IChangeCheckboxEventArgs): void {
253+
public onChange(): void {
254254
if (this.grid1.groupingExpressions.length > 0) {
255255
this.grid1.groupingExpressions = [];
256256
} else {
@@ -477,9 +477,8 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
477477
*/
478478
private updateRandomPrices(data: any[]): any {
479479
const newData = data.slice();
480-
for (let i = Math.round(Math.random() * 10), y = 0; i < data.length; i += Math.round(Math.random() * 10)) {
480+
for (let i = Math.round(Math.random() * 10); i < data.length; i += Math.round(Math.random() * 10)) {
481481
newData[i] = this.randomizeObjectData(data[i]);
482-
y++;
483482
}
484483
return newData;
485484
}

packages/igx-templates/igx-ts/custom-templates/fintech-grid/files/src/app/__path__/localData.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class LocalDataService {
1212
this.records = this.records$.asObservable();
1313
}
1414

15-
public getData(count: number = 10) {
15+
public getData(count = 10) {
1616
const financialData: FinancialData = new FinancialData();
1717
this.records$.next(financialData.generateData(count));
1818
}

packages/igx-templates/igx-ts/custom-templates/fintech-grid/files/src/app/__path__/localData/financialData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ export class FinancialData {
900900

901901
for (const mockData of MOCKFINANCEDATA) {
902902
for (const prop in mockData) {
903-
if (mockData.hasOwnProperty(prop)) {
903+
if (Object.prototype.hasOwnProperty.call(mockData, prop)) {
904904
dataObj[prop] = mockData[prop];
905905
}
906906
}

packages/igx-templates/igx-ts/custom-templates/fintech-tree-grid/files/src/app/__path__/assets/financialData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ export class FinancialData {
900900

901901
for (const mockData of MOCKFINANCEDATA) {
902902
for (const prop in mockData) {
903-
if (mockData.hasOwnProperty(prop)) {
903+
if (Object.prototype.hasOwnProperty.call(mockData, prop)) {
904904
dataObj[prop] = mockData[prop];
905905
}
906906
}

packages/igx-templates/igx-ts/custom-templates/fintech-tree-grid/files/src/app/__path__/localData.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class LocalDataService {
1212
this.records = this.records$.asObservable();
1313
}
1414

15-
public getData(count: number = 10): void {
15+
public getData(count = 10): void {
1616
const financialData: FinancialData = new FinancialData();
1717
this.records$.next(financialData.generateData(count));
1818
}

packages/igx-templates/igx-ts/custom-templates/fintech-tree-grid/files/src/app/__path__/tree-grid-grouping.pipe.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class GroupByRecord {
77
}
88

99
export class ITreeGridAggregation {
10-
public field: string = '';
10+
public field = '';
1111
public aggregate: (parent: any, children: any[]) => any = [] as any;
1212
}
1313

@@ -40,7 +40,7 @@ export class <%=ClassName%>TreeGridGroupingPipe implements PipeTransform {
4040
parentID: any,
4141
data: any[]) {
4242
for (const groupRecord of groupRecords) {
43-
const parent: { [key: string]: any } = {};
43+
const parent: Record<string, any> = {};
4444
const children = groupRecord.records;
4545

4646
parent[primaryKey] = parentID + groupRecord.key;

packages/igx-templates/igx-ts/custom-templates/login/files/src/app/__path__/__filePrefix__.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, EventEmitter, Output } from '@angular/core';
1+
import { Component } from '@angular/core';
22
import {
33
FormBuilder,
44
FormGroup,

packages/igx-templates/igx-ts/hierarchical-grid/hierarchical-grid-custom/files/src/app/__path__/__filePrefix__.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ export class <%=ClassName%>Component {
1212
public localData: Artist[] = ARTISTS;
1313

1414
public toggleColumn(col: ColumnType, event: MouseEvent): void {
15-
col.pinned ? col.unpin() : col.pin();
15+
if (col.pinned) {
16+
col.unpin();
17+
} else {
18+
col.pin();
19+
}
1620
event.stopPropagation();
1721
}
1822
}

0 commit comments

Comments
 (0)