Skip to content

Commit f674eb3

Browse files
committed
lint
1 parent c3458fc commit f674eb3

21 files changed

Lines changed: 47 additions & 93 deletions

File tree

backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"description": "Demonstrate the value of GitHub",
66
"main": "src/index.ts",
77
"scripts": {
8-
"start": "node -e \"process.env.NODE_HEAP_SIZE = process.env.NODE_HEAP_SIZE || '4096'; console.log('Using memory limit: ' + process.env.NODE_HEAP_SIZE + 'MB'); process.exit(0)\" && NODE_OPTIONS=\"--max-old-space-size=${NODE_HEAP_SIZE:-6120}\" node --enable-source-maps dist/index.js | bunyan -o short -l info",
8+
"start": "node --enable-source-maps dist/index.js | bunyan -o short -l info",
99
"test": "vitest",
1010
"build": "tsc",
11-
"dev": "NODE_OPTIONS='--max-old-space-size=4096' tsx watch src/index.ts | bunyan -o short -l info",
11+
"dev": "tsx watch src/index.ts | bunyan -o short -l info",
1212
"lint": "eslint src/**/*.ts",
1313
"compose:start": "docker-compose -f ../compose.yml up -d",
1414
"db:start": "docker-compose -f ../compose.yml up -d mongo",

backend/src/services/status.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ export interface StatusType {
2424
}
2525

2626
class StatusService {
27-
constructor() {
28-
29-
}
27+
28+
constructor() { }
3029

3130
async getStatus(req?: Request): Promise<StatusType> {
3231
const status = {} as StatusType;

frontend/src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NgModule } from '@angular/core';
22
import { ReactiveFormsModule } from '@angular/forms';
33
import { MaterialModule } from './material.module';
4-
import { RouterLink, RouterModule, RouterOutlet, Routes } from '@angular/router';
4+
import { RouterLink, RouterModule, RouterOutlet } from '@angular/router';
55
import { CommonModule } from '@angular/common';
66
import { TableComponent } from './shared/table/table.component';
77

frontend/src/app/error/error.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export class ErrorComponent {
2222
private router: Router
2323
) {
2424
const navigation = this.router.getCurrentNavigation();
25-
const state = navigation?.extras?.state as { error: any };
25+
const state = navigation?.extras?.state;
2626

2727
if (state) {
28-
if (state.error) {
29-
this.error = state.error || JSON.stringify(state.error);
28+
if (state['error']) {
29+
this.error = state['error'] || JSON.stringify(state['error']);
3030
} else {
3131
this.error.message = 'An unknown error occurred';
3232
}

frontend/src/app/guards/setup.guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Injectable, isDevMode } from '@angular/core';
1+
import { Injectable } from '@angular/core';
22
import { CanActivate, GuardResult, MaybeAsync, Router } from '@angular/router';
33
import { of } from 'rxjs';
44
import { catchError, map } from 'rxjs/operators';

frontend/src/app/main/copilot/copilot-dashboard/dashboard-card/dashboard-card-bars/dashboard-card-bars.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { MatIconModule } from '@angular/material/icon';
55
import { MatProgressBarModule } from '@angular/material/progress-bar';
66
import { CopilotMetrics } from '../../../../../services/api/metrics.service.interfaces';
77
import { HighchartsService } from '../../../../../services/highcharts.service';
8-
import { LoadingSpinnerComponent } from '../../../../../shared/loading-spinner/loading-spinner.component';
98

109
export interface DashboardCardBarsInput {
1110
value: number;
@@ -23,8 +22,7 @@ export interface DashboardCardBarsInput {
2322
MatIconModule,
2423
CommonModule,
2524
MatProgressBarModule,
26-
MatIconModule,
27-
// LoadingSpinnerComponent
25+
MatIconModule
2826
],
2927
templateUrl: './dashboard-card-bars.component.html',
3028
styleUrls: [

frontend/src/app/main/copilot/copilot-dashboard/dashboard-card/dashboard-card-drilldown-bar-chart/dashboard-card-drilldown-bar-chart.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ import { HighchartsChartModule } from 'highcharts-angular';
77
import { CommonModule } from '@angular/common';
88
import { HighchartsService } from '../../../../../services/highcharts.service';
99
import { CopilotMetrics } from '../../../../../services/api/metrics.service.interfaces';
10-
import { LoadingSpinnerComponent } from '../../../../../shared/loading-spinner/loading-spinner.component';
1110

1211
@Component({
1312
selector: 'app-dashboard-card-drilldown-bar-chart',
1413
standalone: true,
1514
imports: [
1615
MatCardModule,
1716
CommonModule,
18-
HighchartsChartModule,
19-
// LoadingSpinnerComponent
17+
HighchartsChartModule
2018
],
2119
templateUrl: './dashboard-card-drilldown-bar-chart.component.html',
2220
styleUrls: [

frontend/src/app/main/copilot/copilot-dashboard/dashboard-card/dashboard-card-line-chart/dashboard-card-line-chart.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input } from '@angular/core';
1+
import { Component, Input, OnChanges } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { HighchartsChartModule } from 'highcharts-angular';
44
import * as Highcharts from 'highcharts';
@@ -12,7 +12,7 @@ import { HighchartsService } from '../../../../../services/highcharts.service';
1212
templateUrl: './dashboard-card-line-chart.component.html',
1313
styleUrls: ['./dashboard-card-line-chart.component.scss']
1414
})
15-
export class DashboardCardLineChartComponent {
15+
export class DashboardCardLineChartComponent implements OnChanges {
1616
@Input() data?: CopilotMetrics[];
1717

1818
Highcharts: typeof Highcharts = Highcharts;

frontend/src/app/main/copilot/copilot-dashboard/dashboard.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
22
import { AppModule } from '../../../app.module';
3-
import { DashboardCardValueComponent } from './dashboard-card/dashboard-card-value/dashboard-card-value.component';
43
import { MetricsService } from '../../../services/api/metrics.service';
54
import { CopilotMetrics } from '../../../services/api/metrics.service.interfaces';
6-
import { ActivityResponse, Seat, SeatService } from '../../../services/api/seat.service';
7-
import { MembersService } from '../../../services/api/members.service';
5+
import { ActivityResponse, SeatService } from '../../../services/api/seat.service';
86
import { CopilotSurveyService, Survey } from '../../../services/api/copilot-survey.service';
9-
import { forkJoin, Subject, Subscription, takeUntil } from 'rxjs';
7+
import { Subject, Subscription, takeUntil } from 'rxjs';
108
import { AdoptionChartComponent } from '../copilot-value/adoption-chart/adoption-chart.component';
119
import { DailyActivityChartComponent } from '../copilot-value/daily-activity-chart/daily-activity-chart.component';
1210
import { TimeSavedChartComponent } from '../copilot-value/time-saved-chart/time-saved-chart.component';
@@ -104,7 +102,6 @@ export class CopilotDashboardComponent implements OnInit, OnDestroy {
104102

105103
constructor(
106104
private metricsService: MetricsService,
107-
private membersService: MembersService,
108105
private seatService: SeatService,
109106
private surveyService: CopilotSurveyService,
110107
private installationsService: InstallationsService,

frontend/src/app/main/copilot/copilot-metrics/copilot-metrics.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
1+
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
22
import { DateRangeSelectComponent } from "../../../shared/date-range-select/date-range-select.component";
33
import { MetricsService } from '../../../services/api/metrics.service';
44
import { CopilotMetrics } from '../../../services/api/metrics.service.interfaces';
@@ -34,7 +34,7 @@ import { DashboardCardLineChartComponent } from '../copilot-dashboard/dashboard-
3434
'../copilot-dashboard/dashboard.component.scss'
3535
]
3636
})
37-
export class CopilotMetricsComponent implements OnInit {
37+
export class CopilotMetricsComponent implements OnInit, OnDestroy {
3838
metrics?: CopilotMetrics[];
3939
metricsTotals?: CopilotMetrics;
4040
installation?: Installation = undefined;

0 commit comments

Comments
 (0)