Skip to content

Commit 128aa16

Browse files
committed
format: Fix linting errors
1 parent d2a2ab3 commit 128aa16

File tree

9 files changed

+49
-31
lines changed

9 files changed

+49
-31
lines changed

angular/src/account/login/login.service.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
import { TokenService } from '@abp/auth/token.service';
2+
import { LogService } from '@abp/log/log.service';
3+
import { MessageService } from '@abp/message/message.service';
4+
import { UtilsService } from '@abp/utils/utils.service';
15
import { Injectable } from '@angular/core';
26
import { Router } from '@angular/router';
3-
import { TokenAuthServiceProxy, AuthenticateModel, AuthenticateResultModel, ExternalLoginProviderInfoModel, ExternalAuthenticateModel, ExternalAuthenticateResultModel } from '@shared/service-proxies/service-proxies';
4-
import { UrlHelper } from '@shared/helpers/UrlHelper';
57
import { AppConsts } from '@shared/AppConsts';
6-
7-
import { MessageService } from '@abp/message/message.service';
8-
import { LogService } from '@abp/log/log.service';
9-
import { TokenService } from '@abp/auth/token.service';
10-
import { UtilsService } from '@abp/utils/utils.service';
8+
import { UrlHelper } from '@shared/helpers/UrlHelper';
9+
import { AuthenticateModel, AuthenticateResultModel, TokenAuthServiceProxy } from '@shared/service-proxies/service-proxies';
1110
import { finalize } from 'rxjs/operators';
1211

12+
1313
@Injectable()
1414
export class LoginService {
1515

@@ -47,7 +47,11 @@ export class LoginService {
4747

4848
if (authenticateResult.accessToken) {
4949
// Successfully logged in
50-
this.login(authenticateResult.accessToken, authenticateResult.encryptedAccessToken, authenticateResult.expireInSeconds, this.rememberMe);
50+
this.login(
51+
authenticateResult.accessToken,
52+
authenticateResult.encryptedAccessToken,
53+
authenticateResult.expireInSeconds,
54+
this.rememberMe);
5155

5256
} else {
5357
// Unexpected result!
@@ -59,7 +63,7 @@ export class LoginService {
5963

6064
private login(accessToken: string, encryptedAccessToken: string, expireInSeconds: number, rememberMe?: boolean): void {
6165

62-
let tokenExpireDate = rememberMe ? (new Date(new Date().getTime() + 1000 * expireInSeconds)) : undefined;
66+
const tokenExpireDate = rememberMe ? (new Date(new Date().getTime() + 1000 * expireInSeconds)) : undefined;
6367

6468
this._tokenService.setToken(
6569
accessToken,

angular/src/app/home/home.component.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class HomeComponent extends AppComponentBase implements AfterViewInit {
3535
let realtime = 'on';
3636
function initRealTimeChart() {
3737
// Real time ==========================================================================================
38-
let plot = ($ as any).plot('#real_time_chart', [getRandomData()], {
38+
const plot = ($ as any).plot('#real_time_chart', [getRandomData()], {
3939
series: {
4040
shadowSize: 0,
4141
color: 'rgb(0, 188, 212)'
@@ -81,7 +81,7 @@ export class HomeComponent extends AppComponentBase implements AfterViewInit {
8181

8282
function initSparkline() {
8383
$('.sparkline').each(function () {
84-
let $this = $(this);
84+
const $this = $(this);
8585
$this.sparkline('html', $this.data());
8686
});
8787
}
@@ -113,18 +113,21 @@ export class HomeComponent extends AppComponentBase implements AfterViewInit {
113113
});
114114
}
115115

116-
let data = [], totalPoints = 110;
116+
let data = [];
117+
const totalPoints = 110;
118+
117119
function getRandomData() {
118120
if (data.length > 0) { data = data.slice(1); }
119121

120122
while (data.length < totalPoints) {
121-
let prev = data.length > 0 ? data[data.length - 1] : 50, y = prev + Math.random() * 10 - 5;
123+
const prev = data.length > 0 ? data[data.length - 1] : 50;
124+
let y = prev + Math.random() * 10 - 5;
122125
if (y < 0) { y = 0; } else if (y > 100) { y = 100; }
123126

124127
data.push(y);
125128
}
126129

127-
let res = [];
130+
const res = [];
128131
for (let i = 0; i < data.length; ++i) {
129132
res.push([i, data[i]]);
130133
}

angular/src/app/layout/right-sidebar.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import { Component, Injector, ViewEncapsulation, OnInit } from '@angular/core';
22
import { AppComponentBase } from '@shared/app-component-base';
33
import { ConfigurationServiceProxy, ChangeUiThemeInput } from '@shared/service-proxies/service-proxies';
44

5+
class UiThemeInfo {
6+
constructor(
7+
public name: string,
8+
public cssClass: string
9+
) { }
10+
}
11+
512
@Component({
613
templateUrl: './right-sidebar.component.html',
714
selector: 'right-sidebar',
@@ -62,9 +69,3 @@ export class RightSideBarComponent extends AppComponentBase implements OnInit {
6269
}
6370
}
6471

65-
class UiThemeInfo {
66-
constructor(
67-
public name: string,
68-
public cssClass: string
69-
) { }
70-
}

angular/src/root.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ export function getBaseHref(platformLocation: PlatformLocation): string {
133133

134134
function getDocumentOrigin() {
135135
if (!document.location.origin) {
136-
return document.location.protocol + '//' + document.location.hostname + (document.location.port ? ':' + document.location.port : '');
136+
const port = document.location.port ? ':' + document.location.port : '';
137+
return document.location.protocol + '//' + document.location.hostname + port;
137138
}
138139

139140
return document.location.origin;

angular/src/shared/helpers/SignalRAspNetCoreHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { UtilsService } from '@abp/utils/utils.service';
44
export class SignalRAspNetCoreHelper {
55
static initSignalR(): void {
66

7-
let encryptedAuthToken = new UtilsService().getCookieValue(AppConsts.authorization.encrptedAuthTokenName);
7+
const encryptedAuthToken = new UtilsService().getCookieValue(AppConsts.authorization.encrptedAuthTokenName);
88

99
abp.signalr = {
1010
autoConnect: true,

angular/src/shared/helpers/UrlHelper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ export class UrlHelper {
55
static readonly initialUrl = location.href;
66

77
static getQueryParameters(): any {
8-
return document.location.search.replace(/(^\?)/, '').split('&').map(function (n) { return n = n.split('='), this[n[0]] = n[1], this; }.bind({}))[0];
8+
return document.location.search
9+
.replace(/(^\?)/, '')
10+
.split('&')
11+
.map(function (n) { return n = n.split('='), this[n[0]] = n[1], this; }.bind({}))[0];
912
}
1013
}

angular/src/shared/paged-listing-component-base.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class PagedRequestDto {
1515
maxResultCount: number;
1616
}
1717

18-
export abstract class PagedListingComponentBase<EntityDto> extends AppComponentBase implements OnInit {
18+
export abstract class PagedListingComponentBase<TEntityDto> extends AppComponentBase implements OnInit {
1919

2020
public pageSize = 10;
2121
public pageNumber = 1;
@@ -43,7 +43,7 @@ export abstract class PagedListingComponentBase<EntityDto> extends AppComponentB
4343
}
4444

4545
public getDataPage(page: number): void {
46-
let req = new PagedRequestDto();
46+
const req = new PagedRequestDto();
4747
req.maxResultCount = this.pageSize;
4848
req.skipCount = (page - 1) * this.pageSize;
4949

@@ -54,5 +54,5 @@ export abstract class PagedListingComponentBase<EntityDto> extends AppComponentB
5454
}
5555

5656
protected abstract list(request: PagedRequestDto, pageNumber: number, finishedCallback: Function): void;
57-
protected abstract delete(entity: EntityDto): void;
57+
protected abstract delete(entity: TEntityDto): void;
5858
}

angular/src/shared/session/app-session.service.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
import { Injectable } from '@angular/core';
2-
import { SessionServiceProxy, UserLoginInfoDto, TenantLoginInfoDto, ApplicationInfoDto, GetCurrentLoginInformationsOutput } from '@shared/service-proxies/service-proxies';
31
import { AbpMultiTenancyService } from '@abp/multi-tenancy/abp-multi-tenancy.service';
2+
import { Injectable } from '@angular/core';
3+
import {
4+
ApplicationInfoDto,
5+
GetCurrentLoginInformationsOutput,
6+
SessionServiceProxy,
7+
TenantLoginInfoDto,
8+
UserLoginInfoDto
9+
} from '@shared/service-proxies/service-proxies';
410

511
@Injectable()
612
export class AppSessionService {

angular/src/typings.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
declare var System: any;
1515

16-
declare var App: any; //Related to Metronic
17-
declare var Layout: any; //Related to Metronic
16+
declare var App: any; // Related to Metronic
17+
declare var Layout: any; // Related to Metronic
1818

1919
declare var Push: any;
2020

@@ -28,4 +28,4 @@ interface JQuery {
2828

2929
interface JQueryStatic {
3030
AdminBSB: any;
31-
}
31+
}

0 commit comments

Comments
 (0)