Skip to content

Commit 0c5edc3

Browse files
committed
fix: lint according to new config
1 parent 9fe0916 commit 0c5edc3

File tree

28 files changed

+69
-105
lines changed

28 files changed

+69
-105
lines changed

packages/igx-templates/igx-ts/carousel/default/files/src/app/__path__/__filePrefix__.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export class <%=ClassName%>Component implements OnInit {
1414
public interval = 3000;
1515
public pause = true;
1616
public loop = true;
17-
constructor() { }
1817

1918
public ngOnInit() {
2019
this.addNewSlide();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ export class <%=ClassName%>Component implements OnInit, OnDestroy, AfterViewInit
8686
public overlaySettings!: OverlaySettings;
8787
public winner: Athlete = { Avatar: '', Name: '' } as Athlete;
8888
public top3: Athlete[] = [];
89-
private _live: boolean = true;
89+
private _live = true;
9090
private _timer: any;
9191
private windowWidth: any;
92-
private _overlayId: string = '';
92+
private _overlayId = '';
9393

9494
get live(): boolean {
9595
return this._live;
@@ -127,7 +127,7 @@ export class <%=ClassName%>Component implements OnInit, OnDestroy, AfterViewInit
127127
this.localData.forEach(rec => this.getSpeed(rec));
128128
this.windowWidth = window.innerWidth;
129129
this._timer = setInterval(() => this.ticker(), 1500);
130-
this.overlayService.closing.subscribe((event: OverlayClosingEventArgs) => {
130+
this.overlayService.closing.subscribe(() => {
131131
this.showOverlay = false;
132132
});
133133
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit {
9494
public soonSummary = SoonSummary;
9595

9696
public cols!: QueryList<ColumnType>;
97-
public hiddenColsLength: number = 0;
98-
public pinnedColsLength: number = 0;
97+
public hiddenColsLength = 0;
98+
public pinnedColsLength = 0;
9999

100100
public searchText = '';
101101
public caseSensitive = false;

packages/igx-templates/igx-ts/custom-templates/crm-grid/files/src/app/__path__/data.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export interface Employee {
3434
tags: string;
3535
}
3636

37-
/* tslint:disable */
3837
export const DATA: Employee[] = [
3938
{ "id": 256286239, "avatar": "assets/images/men/43.jpg", "name": "Gawain Beadnall", "email": "[email protected]", "company": "Divanoodle", "position": "Statistician I", "work_phone": "+1-317-866-4381", "mobile_phone": "+1-203-937-3567", "fax": "+1-212-115-1790", "street": "47 Garrison Park", "city": "Indianapolis", "post_code": 46207, "state": "IN", "country": "United States", "referred_by": "Vyky Corwin", "created_on": new Date("12/8/2017"), "birthday": new Date("2/10/2002"), "last_activity": new Date("12/16/2017"), "next_activity": new Date("4/16/2019"), "deals_won": 5, "deals_lost": 13, "deals_pending": 7, "deals_total": 25, "ratio": 28, "estimated_sales": 686210, "actual_sales": 421105, "tags": "warm, engineering" },
4039
{ "id": 863241310, "avatar": "assets/images/women/40.jpg", "name": "Ivy Simkovich", "email": "[email protected]", "company": "Linktype", "position": "Research Nurse", "work_phone": "+1-770-283-2050", "mobile_phone": "+1-509-995-2578", "fax": "+1-907-491-2187", "street": "3 Aberg Street", "city": "Marietta", "post_code": 30061, "state": "GA", "country": "United States", "referred_by": "Hew Chung", "created_on": new Date("6/24/2017"), "birthday": new Date("1/1/1997"), "last_activity": new Date("7/15/2017"), "next_activity": new Date("6/15/2019"), "deals_won": 2, "deals_lost": 4, "deals_pending": 29, "deals_total": 35, "ratio": 33, "estimated_sales": 2008801, "actual_sales": 186592, "tags": "demo, medical" },
@@ -487,4 +486,3 @@ export const DATA: Employee[] = [
487486
{ "id": 75323534, "avatar": "assets/images/women/52.jpg", "name": "Lorena Mousdall", "email": "[email protected]", "company": "Aimbo", "position": "Geologist III", "work_phone": "+1-720-341-5046", "mobile_phone": "+1-916-195-7584", "fax": "+1-215-624-1834", "street": "12 Melby Place", "city": "Denver", "post_code": 80241, "state": "CO", "country": "United States", "referred_by": "Carmina Tomaszek", "created_on": new Date("3/13/2017"), "birthday": new Date("9/13/1978"), "last_activity": new Date("3/24/2017"), "next_activity": new Date("10/24/2018"), "deals_won": 14, "deals_lost": 11, "deals_pending": 2, "deals_total": 27, "ratio": 56, "estimated_sales": 300438, "actual_sales": 1338988, "tags": "cool, engineering" },
488487
{ "id": 46063202, "avatar": "assets/images/women/71.jpg", "name": "Gayle St Pierre", "email": "[email protected]", "company": "Trupe", "position": "VP Accounting", "work_phone": "+1-530-168-6924", "mobile_phone": "+1-646-366-5359", "fax": "+1-757-548-1834", "street": "48 Veith Junction", "city": "Chico", "post_code": 95973, "state": "CA", "country": "United States", "referred_by": "Lynda Drinan", "created_on": new Date("3/26/2017"), "birthday": new Date("3/10/1971"), "last_activity": new Date("4/17/2017"), "next_activity": new Date("10/17/2018"), "deals_won": 13, "deals_lost": 14, "deals_pending": 9, "deals_total": 36, "ratio": 48, "estimated_sales": 1716966, "actual_sales": 668928, "tags": "cold, medical" },
489488
{ "id": 743401827, "avatar": "assets/images/women/56.jpg", "name": "Romy Giacomelli", "email": "[email protected]", "company": "Eimbee", "position": "Cost Accountant", "work_phone": "+1-719-646-0552", "mobile_phone": "+1-203-707-2786", "fax": "+1-214-685-1141", "street": "952 Springs Alley", "city": "Colorado Springs", "post_code": 80915, "state": "CO", "country": "United States", "referred_by": "Alanna Begg", "created_on": new Date("11/18/2017"), "birthday": new Date("10/16/1982"), "last_activity": new Date("12/2/2017"), "next_activity": new Date("2/2/2018"), "deals_won": 5, "deals_lost": 13, "deals_pending": 8, "deals_total": 26, "ratio": 28, "estimated_sales": 1423424, "actual_sales": 949815, "tags": "subscriber, construction" }];
490-
/* tslint:enable */

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
9393
@ViewChild('chart1', { static: true }) public chart1!: IgxCategoryChartComponent;
9494
@ViewChild('dialog', { static: true }) public dialog!: IgxDialogComponent;
9595

96-
public showToolbar: boolean = false;
96+
public showToolbar = false;
9797
public properties: string[] = [];
9898
public selectionMode: GridSelectionMode = 'multiple';
9999
public chartType = CategoryChartType;
100-
public theme: boolean = false;
101-
public volume: number = 1000;
102-
public frequency: number = 500;
100+
public theme = false;
101+
public volume = 1000;
102+
public frequency = 500;
103103
public data: any[] = [];
104104
public chartData: any[] = [];
105105
public multiCellSelection: { data: any[] } = { data: [] };
@@ -133,7 +133,7 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
133133
public contracts = Contract;
134134
public regions = REGIONS;
135135
private subscription: any;
136-
private selectedButton: number = -1;
136+
private selectedButton = -1;
137137
private timer: any;
138138
private volumeChanged: any;
139139
constructor(
@@ -166,7 +166,7 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
166166
];
167167
this.volumeChanged = this.volumeSlider.valueChange.pipe(debounce(() => timer(200)));
168168
this.volumeChanged.subscribe(
169-
(x: any) => {
169+
() => {
170170
this.localService.getData(this.volume);
171171
},
172172
(err: string) => console.log('Error: ' + err));
@@ -364,11 +364,10 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
364364
private strongPositive = (rowData: any): boolean => {
365365
return rowData['Change(%)'] >= 1;
366366
}
367-
private strongNegative = (rowData: any, key: string): boolean => {
367+
private strongNegative = (rowData: any): boolean => {
368368
return rowData['Change(%)'] <= -1;
369369
}
370370

371-
// tslint:disable:member-ordering
372371
public trends = {
373372
changeNeg: this.changeNegative,
374373
changePos: this.changePositive,
@@ -431,8 +430,6 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
431430
}
432431
}
433432

434-
// tslint:enable:member-ordering
435-
436433
private disableOtherButtons(ind: number, disableButtons: boolean): void {
437434
if (this.subscription) {
438435
this.subscription.unsubscribe();

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* tslint:disable */
21
export const REGIONS: any[] = [
32
{
43
"Region": "North America",
@@ -48,7 +47,6 @@ export const MOCKFINANCEDATA: any[] = [
4847
"IndSect": "Consumer, Cyclical",
4948
"IndSubg": "Airlines",
5049
"SecType": "PUBLIC",
51-
// tslint:disable-next-line:object-literal-sort-keys
5250
"CpnTyp": "FIXED",
5351
"IssuerN": "AMERICAN AIRLINES GROUP",
5452
"Moodys": "WR",
@@ -887,7 +885,6 @@ interface IResponse {
887885
data: any[];
888886
recordsUpdated: number;
889887
}
890-
/* tslint:enable */
891888
export class FinancialData {
892889
public generateData(count: number): any[] {
893890
const currData = [];
@@ -900,9 +897,6 @@ export class FinancialData {
900897
const region = REGIONS[this.generateRandomNumber(0, 5)];
901898
dataObj.Region = region.Region;
902899
dataObj.Country = this.randomizeCountry(region);
903-
// for (let y = 0; y < 80; y++) {
904-
// dataObj["Text" + y] = "Text";
905-
// }
906900

907901
for (const mockData of MOCKFINANCEDATA) {
908902
for (const prop in mockData) {
@@ -930,12 +924,10 @@ export class FinancialData {
930924

931925
public updateRandomPrices(data: any[]): any {
932926
const currData = data.slice(0, data.length + 1);
933-
let y = 0;
934927
for (let i = Math.round(Math.random() * 10); i < data.length; i += Math.round(Math.random() * 10)) {
935928
const dataObj = Object.assign({}, data[i]);
936929
this.randomizeObjectData(dataObj);
937930
currData[i] = dataObj;
938-
y++;
939931
}
940932
// return {data: currData, recordsUpdated: y };
941933
return currData;

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
7070
@ViewChild('slider1', { static: true }) public volumeSlider!: IgxSliderComponent;
7171
@ViewChild('slider2', { static: true }) public intervalSlider!: IgxSliderComponent;
7272

73-
public showToolbar: boolean = true;
73+
public showToolbar = true;
7474
public selectionMode: GridSelectionMode = 'multiple';
75-
public theme: boolean = false;
76-
public volume: number = 1000;
77-
public frequency: number = 500;
75+
public theme = false;
76+
public volume = 1000;
77+
public frequency = 500;
7878
public data: any[] = [];
7979
public controls = [
8080
{
@@ -111,7 +111,7 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
111111
field: 'Price'
112112
},
113113
{
114-
aggregate: (parent: any, data: any[]) => {
114+
aggregate: (parent: any) => {
115115
return parent.Change / (parent.Price - parent.Change) * 100;
116116
},
117117
field: 'Change(%)'
@@ -137,7 +137,7 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
137137
};
138138

139139
private subscription: any;
140-
private selectedButton: number = -1;
140+
private selectedButton = -1;
141141
private timer: any;
142142
private volumeChanged: any;
143143

@@ -150,7 +150,7 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
150150
this.grid1.sortingExpressions = [{ fieldName: this.groupColumnKey, dir: SortingDirection.Desc }];
151151
this.volumeChanged = this.volumeSlider.valueChange.pipe(debounce(() => timer(200)));
152152
this.volumeChanged.subscribe(
153-
(x: any) => {
153+
() => {
154154
this.localService.getData(this.volume);
155155
},
156156
(err: string) => console.log('Error: ' + err));
@@ -241,11 +241,10 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
241241
private strongPositive = (rowData: any): boolean => {
242242
return rowData['Change(%)'] >= 1;
243243
}
244-
private strongNegative = (rowData: any, key: string): boolean => {
244+
private strongNegative = (rowData: any): boolean => {
245245
return rowData['Change(%)'] <= -1;
246246
}
247247

248-
// tslint:disable:member-ordering
249248
public trends = {
250249
changeNeg: this.changeNegative,
251250
changePos: this.changePositive,
@@ -261,7 +260,6 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
261260
strongNegative2: this.strongNegative,
262261
strongPositive2: this.strongPositive
263262
};
264-
// tslint:enable:member-ordering
265263

266264
private disableOtherButtons(ind: number, disableButtons: boolean): void {
267265
if (this.subscription) {
@@ -308,10 +306,8 @@ export class <%=ClassName%>Component implements OnInit, AfterViewInit, OnDestroy
308306
*/
309307
private updateRandomPrices(data: any[]): any {
310308
const newData = data.slice();
311-
let y = 0;
312309
for (let i = Math.round(Math.random() * 10); i < newData.length; i += Math.round(Math.random() * 10)) {
313310
this.randomizeObjectData(newData[i]);
314-
y++;
315311
}
316312
return newData;
317313
}

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* tslint:disable */
21
export const REGIONS: any[] = [
32
{
43
"Region": "North America",
@@ -48,7 +47,6 @@ export const MOCKFINANCEDATA: any[] = [
4847
"IndSect": "Consumer, Cyclical",
4948
"IndSubg": "Airlines",
5049
"SecType": "PUBLIC",
51-
// tslint:disable-next-line:object-literal-sort-keys
5250
"CpnTyp": "FIXED",
5351
"IssuerN": "AMERICAN AIRLINES GROUP",
5452
"Moodys": "WR",
@@ -887,7 +885,6 @@ interface IResponse {
887885
data: any[];
888886
recordsUpdated: number;
889887
}
890-
/* tslint:enable */
891888
export class FinancialData {
892889
public generateData(count: number): any[] {
893890
const currData = [];
@@ -900,9 +897,6 @@ export class FinancialData {
900897
const region = REGIONS[this.generateRandomNumber(0, 5)];
901898
dataObj.Region = region.Region;
902899
dataObj.Country = this.randomizeCountry(region);
903-
// for (let y = 0; y < 80; y++) {
904-
// dataObj["Text" + y] = "Text";
905-
// }
906900

907901
for (const mockData of MOCKFINANCEDATA) {
908902
for (const prop in mockData) {
@@ -930,12 +924,10 @@ export class FinancialData {
930924

931925
public updateRandomPrices(data: any[]): any {
932926
const currData = data.slice(0, data.length + 1);
933-
let y = 0;
934927
for (let i = Math.round(Math.random() * 10); i < data.length; i += Math.round(Math.random() * 10)) {
935928
const dataObj = Object.assign({}, data[i]);
936929
this.randomizeObjectData(dataObj);
937930
currData[i] = dataObj;
938-
y++;
939931
}
940932
// return {data: currData, recordsUpdated: y };
941933
return currData;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class <%=ClassName%>Component {
5656
}
5757

5858
tryLogin() {
59+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5960
const loginInfo = this.loginForm.value;
6061
// use loginInfo
6162
this.showLogin = false;
@@ -72,6 +73,7 @@ export class <%=ClassName%>Component {
7273
}
7374

7475
tryRegister() {
76+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
7577
const registerInfo = this.registrationForm.value;
7678
// use registerInfo
7779
this.showRegister = false;

packages/igx-templates/igx-ts/custom-templates/weather-forecast/files/src/app/__path__/weather-data.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// tslint:disable:object-literal-sort-keys
21
export const data = {
32
city: 'Sofia',
43
humidity: '44%',

0 commit comments

Comments
 (0)