Skip to content
Snippets Groups Projects
Commit e6fc243b authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Merge branch 'optimizeLinter' into 'master'

Optimize linter

See merge request arsnova/arsnova-lite!143
parents 4eb4d4b6 39a8029a
1 merge request!143Optimize linter
Pipeline #23933 passed with stages
in 3 minutes and 34 seconds
......@@ -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
......
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';
......
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 => {
......
......@@ -7,7 +7,7 @@ import { Component, OnInit } from '@angular/core';
})
export class HomePageComponent implements OnInit {
mobile: boolean = true;
mobile = true;
constructor() { }
......
......@@ -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) {
......
......@@ -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;
}
......
......@@ -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 {
......
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';
......
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() {
......
......@@ -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';
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment