diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da2552cb8a207cadeef72c65c5df74212c917413..7b683904d1ededd58c57ad4cc9277b0dca4aa694 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ tslint: - npm install @angular/core - npm install typescript - npm install rxjs - - node_modules/tslint/bin/tslint -p ./tsconfig.json -c ./tslint.json ./src/**/*.ts + - node_modules/tslint/bin/tslint -p ./tsconfig.json -c ./tslint.json --project ngbuild: stage: build diff --git a/src/app/components/creator/content-creator/content-creator.component.ts b/src/app/components/creator/content-creator/content-creator.component.ts index c714e60b94ae35cea50abf2df1a15f5bc5606856..c3915f07b0c8521a9372153f856172b4394f2f0e 100644 --- a/src/app/components/creator/content-creator/content-creator.component.ts +++ b/src/app/components/creator/content-creator/content-creator.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { ContentText } from '../../../models/content-text'; -import { FormControl } from '@angular/forms';; +import { FormControl } from '@angular/forms'; import { Room } from '../../../models/room'; import { TranslateService } from '@ngx-translate/core'; diff --git a/src/app/components/home/_dialogs/user-activation/user-activation.component.ts b/src/app/components/home/_dialogs/user-activation/user-activation.component.ts index f0f71df0deb6b774d711a2c02a39686215c08054..74629868e8f34cb20109be64f5c71f2916e4c0bf 100644 --- a/src/app/components/home/_dialogs/user-activation/user-activation.component.ts +++ b/src/app/components/home/_dialogs/user-activation/user-activation.component.ts @@ -1,8 +1,8 @@ import { Component, Inject, OnInit } from '@angular/core'; import { NotificationService } from '../../../../services/util/notification.service'; import { UserService } from '../../../../services/http/user.service'; -import { FormControl, Validators} from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef} from '@angular/material'; +import { FormControl, Validators } from '@angular/forms'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; @Component({ @@ -31,7 +31,7 @@ export class UserActivationComponent implements OnInit { this.userService.activate(this.data.name.trim(), activationKey).subscribe( ret => { - this.dialogRef.close({success: true}); + this.dialogRef.close({ success: true }); }, err => { this.translationService.get('login.activation-key-incorrect').subscribe(message => { diff --git a/src/app/components/home/home-page/home-page.component.ts b/src/app/components/home/home-page/home-page.component.ts index b630f9533564845829998678511c6a22e9c0be36..eec655fa3ea823dfbd746378b02d76df1eb5bd9f 100644 --- a/src/app/components/home/home-page/home-page.component.ts +++ b/src/app/components/home/home-page/home-page.component.ts @@ -7,7 +7,7 @@ import { Component, OnInit } from '@angular/core'; }) export class HomePageComponent implements OnInit { - mobile: boolean = true; + mobile = true; constructor() { } diff --git a/src/app/components/participant/content-choice-participant/content-choice-participant.component.ts b/src/app/components/participant/content-choice-participant/content-choice-participant.component.ts index 8d9a8635dd53f594a4ac4f8cbee738933dd80481..e780f3015610d418146a173b0d09ca7bc3ee2d8c 100644 --- a/src/app/components/participant/content-choice-participant/content-choice-participant.component.ts +++ b/src/app/components/participant/content-choice-participant/content-choice-participant.component.ts @@ -52,7 +52,7 @@ export class ContentChoiceParticipantComponent implements OnInit { } submitAnswer(): void { - let selectedAnswers: number[] = []; + const selectedAnswers: number[] = []; if (this.content.multiple) { for (let i = 0; i < this.checkedAnswers.length; i++) { if (this.checkedAnswers[i].checked) { diff --git a/src/app/components/shared/header/header.component.ts b/src/app/components/shared/header/header.component.ts index c5d28a7f134191acbeaa6ea96293c1ed3ca6203a..c57ae654c08b16823232c0b5d4339d4946cd6fee 100644 --- a/src/app/components/shared/header/header.component.ts +++ b/src/app/components/shared/header/header.component.ts @@ -78,7 +78,7 @@ export class HeaderComponent implements OnInit { const dialogRef = this.dialog.open(LoginComponent, { width: '350px' }); - let role = (isDozent === true) ? UserRole.CREATOR : UserRole.PARTICIPANT; + const role = (isDozent === true) ? UserRole.CREATOR : UserRole.PARTICIPANT; dialogRef.componentInstance.role = role; dialogRef.componentInstance.isStandard = true; } diff --git a/src/app/components/shared/room-join/room-join.component.ts b/src/app/components/shared/room-join/room-join.component.ts index 3e81020ead0fc9ef37bd8172c575579aa2e23272..07ca5cd82a638f3387c10b3da078fe9e1308855b 100644 --- a/src/app/components/shared/room-join/room-join.component.ts +++ b/src/app/components/shared/room-join/room-join.component.ts @@ -46,7 +46,7 @@ export class RoomJoinComponent implements OnInit { } getRoom(id: string): void { - if (id.length - (id.split(' ').length -1) < 8) { + if (id.length - (id.split(' ').length - 1) < 8) { this.translateService.get('home-page.exactly-8').subscribe(message => { this.notificationService.show(message); }); @@ -55,7 +55,7 @@ export class RoomJoinComponent implements OnInit { this.notificationService.show(message); }); } else { - this.roomService.getRoomByShortId(id.replace(/\s/g, "")) + this.roomService.getRoomByShortId(id.replace(/\s/g, '')) .subscribe(room => { this.room = room; if (!room) { @@ -75,7 +75,6 @@ export class RoomJoinComponent implements OnInit { } }); } - } joinRoom(id: string): void { diff --git a/src/app/interceptors/authentication.interceptor.ts b/src/app/interceptors/authentication.interceptor.ts index 4939c7f4eb6f67c78e0b84f268fde024c75f6c84..8fddfefae77c8530277f75f39388f393b3751ad0 100644 --- a/src/app/interceptors/authentication.interceptor.ts +++ b/src/app/interceptors/authentication.interceptor.ts @@ -1,7 +1,13 @@ - -import {tap} from 'rxjs/operators'; +import { tap } from 'rxjs/operators'; import { Injectable } from '@angular/core'; -import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; +import { + HttpErrorResponse, + HttpEvent, + HttpHandler, + HttpInterceptor, + HttpRequest, + HttpResponse +} from '@angular/common/http'; import { AuthenticationService } from '../services/http/authentication.service'; import { NotificationService } from '../services/util/notification.service'; diff --git a/src/app/services/http/authentication.service.ts b/src/app/services/http/authentication.service.ts index d1ab0b5dc55704b195d5dd23fcbfabcb13f37ef6..2ac6be1b6f48bbb74a695c8675540d5d2d394a14 100644 --- a/src/app/services/http/authentication.service.ts +++ b/src/app/services/http/authentication.service.ts @@ -1,5 +1,4 @@ - -import {catchError, map} from 'rxjs/operators'; +import { catchError, map } from 'rxjs/operators'; import { Injectable } from '@angular/core'; import { User } from '../../models/user'; import { Observable , of , BehaviorSubject } from 'rxjs'; @@ -119,13 +118,13 @@ export class AuthenticationService { } else { return 'false'; } - }),catchError((e) => { + }), catchError((e) => { // check if user needs activation if (e.error.errorType === 'DisabledException') { return of('activation'); } return of('false'); - }),); + }), ); } get watchUser() { diff --git a/src/app/services/http/room.service.ts b/src/app/services/http/room.service.ts index 4566c05902de34f4fc2ef68f1db0f19dcd91516c..3ab13d5ae45ded893b7e6885d841135dadeb473c 100644 --- a/src/app/services/http/room.service.ts +++ b/src/app/services/http/room.service.ts @@ -96,7 +96,7 @@ export class RoomService extends BaseHttpService { parseDefaultContentGroup(room: Room): Room { if (room.contentGroups) { - for (let cg of room.contentGroups) { + for (const cg of room.contentGroups) { if (!cg.name || cg.name === '') { cg.name = 'Default'; }