Skip to content

Commit 97632b7

Browse files
committed
feat: fix all lint errors
1 parent 502ad85 commit 97632b7

File tree

21 files changed

+75
-207
lines changed

21 files changed

+75
-207
lines changed

frontend/.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
],
5858
"typescript-eslint/quotes": "off",
5959
"no-underscore-dangle": "off",
60-
"radix": "off"
60+
"radix": "off",
61+
"max-len": "off",
62+
"prefer-arrow/prefer-arrow-functions": "off"
6163
}
6264
},
6365
{

frontend/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class AppComponent implements AfterViewInit {
3030
if (event instanceof NavigationEnd) {
3131
this._googleAnalytics.sendPageView(event.urlAfterRedirects);
3232
}
33-
}
33+
};
3434

3535
ngAfterViewInit() {
3636
this._cdr.detectChanges();

frontend/src/app/core/services/google-analytics.service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from '@angular/core';
2-
declare var gtag: any;
2+
declare const gtag: any;
33
const GOOGLE_ANALYTICS_ID = 'UA-80363801-4';
44
@Injectable({
55
providedIn: 'root'
@@ -22,16 +22,19 @@ export class GoogleAnalyticsService {
2222
return;
2323
}
2424
this.gtag('event', eventName, {
25+
/* eslint-disable @typescript-eslint/naming-convention */
2526
event_category: eventCategory,
2627
event_label: eventLabel,
28+
/* eslint-enable @typescript-eslint/naming-convention */
2729
value: eventValue
2830
});
29-
}
31+
};
3032

3133
public sendPageView(url: string) {
3234
if (!this.gtag) {
3335
return;
3436
}
37+
// eslint-disable-next-line @typescript-eslint/naming-convention
3538
this.gtag('config', GOOGLE_ANALYTICS_ID, { page_path: url });
3639
}
3740
}

frontend/src/app/core/validators/no-whitespace.validator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { AbstractControl, ValidatorFn } from '@angular/forms';
22

3+
// eslint-disable-next-line @typescript-eslint/naming-convention
34
export function NoWhitespaceValidator(): ValidatorFn {
45
return (control: AbstractControl): { [key: string]: any } => {
56
let controlVal = control.value;
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
import { JUser } from './user';
22

33
export class JComment {
4-
constructor(issueId: string, user: JUser) {
5-
const now = new Date();
6-
this.id = `${now.getTime()}`;
7-
this.issueId = issueId;
8-
this.user = user;
9-
this.createdAt = now.toISOString();
10-
this.updatedAt = now.toISOString();
11-
}
12-
134
id: string;
145
body: string;
156
createdAt: string;
@@ -18,4 +9,13 @@ export class JComment {
189
userId: string;
1910
// mapped to display by userId
2011
user: JUser;
12+
13+
constructor(issueId: string, user: JUser) {
14+
const now = new Date();
15+
this.id = `${now.getTime()}`;
16+
this.issueId = issueId;
17+
this.user = user;
18+
this.createdAt = now.toISOString();
19+
this.updatedAt = now.toISOString();
20+
}
2121
}

frontend/src/app/interface/issue.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
12
import { JComment } from './comment';
23

4+
/* eslint-disable no-shadow */
35
export enum IssueType {
46
STORY = 'Story',
57
TASK = 'Task',
@@ -9,6 +11,7 @@ export enum IssueType {
911
export enum IssueStatus {
1012
BACKLOG = 'Backlog',
1113
SELECTED = 'Selected',
14+
// eslint-disable-next-line @typescript-eslint/naming-convention
1215
IN_PROGRESS = 'InProgress',
1316
DONE = 'Done'
1417
}
@@ -53,3 +56,4 @@ export interface JIssue {
5356
comments: JComment[];
5457
projectId: string;
5558
}
59+
/* eslint-enable no-shadow */

frontend/src/app/interface/project.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface JProject {
1313
users: JUser[];
1414
}
1515

16+
// eslint-disable-next-line no-shadow
1617
export enum ProjectCategory {
1718
SOFTWARE = 'Software',
1819
MARKETING = 'Marketing',

frontend/src/app/jira-control/avatar/avatar.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ const Template: Story<AvatarComponent> = (args: AvatarComponent) => ({
1616

1717
export const Rounded: Story<AvatarComponent> = Template.bind({});
1818
Rounded.args = {
19-
avatarUrl: avatarUrl,
19+
avatarUrl,
2020
size: 64
2121
};
2222

2323
export const Square: Story<AvatarComponent> = Template.bind({});
2424
Square.args = {
25-
avatarUrl: avatarUrl,
25+
avatarUrl,
2626
size: 64,
2727
rounded: false
2828
};

frontend/src/app/jira-control/button/button.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Secondary.args = {
3333

3434
export const Empty: Story<ButtonProps> = Template.bind({});
3535
Empty.args = {
36-
icon: "times",
36+
icon: 'times',
3737
className: 'btn-empty',
3838
label: 'Cancel'
3939
};

frontend/src/app/project/auth/auth.query.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { Query } from '@datorama/akita';
44

55
@Injectable({ providedIn: 'root' })
66
export class AuthQuery extends Query<AuthState> {
7+
user$ = this.select();
8+
userId$ = this.select('id');
9+
710
constructor(protected store: AuthStore) {
811
super(store);
912
}
10-
11-
user$ = this.select();
12-
userId$ = this.select('id');
1313
}

0 commit comments

Comments
 (0)