From 250fada2bf40c6a0abcbeb7d02214615ecdbb8ac Mon Sep 17 00:00:00 2001
From: paflov <paf@titelfrei.de>
Date: Wed, 19 Feb 2020 18:30:27 +0100
Subject: [PATCH] linting

---
 src/app/about/about.component.ts                     |  4 ++--
 src/app/app.component.ts                             |  2 +-
 src/app/app.config.ts                                |  4 ++--
 src/app/app.module.ts                                |  2 +-
 src/app/maindata.service.ts                          | 12 ++++++------
 src/app/start/start.component.ts                     |  2 +-
 src/app/sys-check/report/report.component.ts         | 12 ++++++------
 src/app/sys-check/start.component.ts                 |  7 +++----
 src/app/sys-check/sys-check.component.ts             | 12 ++++++------
 .../tc-navi-buttons/unit-navi-buttons.component.ts   |  2 +-
 .../sys-check/unit-check/unit-check.component.html   |  2 +-
 src/app/test-controller/test-controller.module.ts    |  2 +-
 .../test-controller/unithost/unit-routing-guards.ts  |  7 +++++--
 13 files changed, 36 insertions(+), 34 deletions(-)

diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts
index 675674ca..567917dc 100644
--- a/src/app/about/about.component.ts
+++ b/src/app/about/about.component.ts
@@ -1,7 +1,7 @@
 import { MainDataService } from 'src/app/maindata.service';
 import { Component, Inject } from '@angular/core';
-import {Router} from "@angular/router";
-import {CustomtextService} from "iqb-components";
+import { Router } from '@angular/router';
+import { CustomtextService } from 'iqb-components';
 
 @Component({
   templateUrl: './about.component.html'
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index e76b1850..b68b0ea5 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core';
 import { BackendService } from './backend.service';
 import { LoginData } from './app.interfaces';
 import {CustomtextService, ServerError} from 'iqb-components';
-import {appconfig} from "./app.config";
+import { appconfig } from './app.config';
 
 @Component({
   selector: 'tc-root',
diff --git a/src/app/app.config.ts b/src/app/app.config.ts
index b93e962f..ebf413c6 100644
--- a/src/app/app.config.ts
+++ b/src/app/app.config.ts
@@ -1,8 +1,8 @@
-import {CustomTextDefs} from "iqb-components";
+import { CustomTextDefs } from 'iqb-components';
 
 export interface CustomTextsDefList {
   keyPrefix: string;
-  description : string;
+  description: string;
   defList: CustomTextDefs;
 }
 
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 9a9d7c77..238dd356 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -17,7 +17,7 @@ import { LocationStrategy, HashLocationStrategy } from '@angular/common';
 import { FlexLayoutModule } from '@angular/flex-layout';
 import { ErrormsgComponent } from './errormsg/errormsg.component';
 import { httpInterceptorProviders } from './app.interceptor';
-import {IqbComponentsModule} from "iqb-components";
+import { IqbComponentsModule } from 'iqb-components';
 
 
 @NgModule({
diff --git a/src/app/maindata.service.ts b/src/app/maindata.service.ts
index 073cff67..452e6b22 100644
--- a/src/app/maindata.service.ts
+++ b/src/app/maindata.service.ts
@@ -2,8 +2,8 @@ import { BackendService } from './backend.service';
 import { BehaviorSubject, Subject, forkJoin } from 'rxjs';
 import { Injectable } from '@angular/core';
 import { LoginData } from './app.interfaces';
-import {CustomtextService, ServerError} from "iqb-components";
-import {appconfig, customtextKeySeparator, CustomTextsDefList} from "./app.config";
+import { CustomtextService, ServerError } from 'iqb-components';
+import { appconfig, customtextKeySeparator, CustomTextsDefList } from './app.config';
 
 @Injectable({
   providedIn: 'root'
@@ -152,14 +152,14 @@ export class MainDataService {
     this.cts.addCustomTexts(myCustomTexts);
   }
 
-  public setDefaultCustomtexts(newTexts: {[key: string]: string;}) {
+  public setDefaultCustomtexts(newTexts: {[key: string]: string; }) {
     for (const ctKey of Object.keys(newTexts)) {
       const sepIndex = ctKey.indexOf(customtextKeySeparator);
       if (sepIndex > 1) {
-        const keyPrefix = ctKey.slice(0 , sepIndex-1);
-        const keyId = ctKey.slice(sepIndex+1);
+        const keyPrefix = ctKey.slice(0 , sepIndex - 1);
+        const keyId = ctKey.slice(sepIndex + 1);
 
-        switch(keyPrefix) {
+        switch (keyPrefix) {
           case 'app': {
             appconfig.customtextsApp.defList[keyId].defaultvalue = newTexts[ctKey];
             break;
diff --git a/src/app/start/start.component.ts b/src/app/start/start.component.ts
index 4546b22f..db33743a 100644
--- a/src/app/start/start.component.ts
+++ b/src/app/start/start.component.ts
@@ -8,7 +8,7 @@ import { Router } from '@angular/router';
 import { Component, OnInit, OnDestroy } from '@angular/core';
 import { FormGroup, FormBuilder, Validators } from '@angular/forms';
 import { StartButtonData } from './start-button-data.class';
-import {appconfig} from "../app.config";
+import { appconfig } from '../app.config';
 
 @Component({
   templateUrl: './start.component.html',
diff --git a/src/app/sys-check/report/report.component.ts b/src/app/sys-check/report/report.component.ts
index 10d6be08..a3abd8fc 100644
--- a/src/app/sys-check/report/report.component.ts
+++ b/src/app/sys-check/report/report.component.ts
@@ -1,10 +1,10 @@
-import {BackendService} from '../backend.service';
+import { BackendService } from '../backend.service';
 import { SysCheckDataService } from '../sys-check-data.service';
-import {Component, Input} from '@angular/core';
-import {SaveReportComponent} from './save-report/save-report.component';
-import {MatDialog, MatSnackBar} from '@angular/material';
-import {ReportEntry} from "../sys-check.interfaces";
-import {Subscription} from "rxjs";
+import { Component, Input } from '@angular/core';
+import { SaveReportComponent } from './save-report/save-report.component';
+import { MatDialog, MatSnackBar } from '@angular/material';
+import { ReportEntry } from '../sys-check.interfaces';
+import { Subscription } from 'rxjs';
 
 @Component({
   selector: 'iqb-report',
diff --git a/src/app/sys-check/start.component.ts b/src/app/sys-check/start.component.ts
index 6a974803..94092c20 100644
--- a/src/app/sys-check/start.component.ts
+++ b/src/app/sys-check/start.component.ts
@@ -1,9 +1,9 @@
 import { SysCheckDataService } from './sys-check-data.service';
 import { Router, ActivatedRoute } from '@angular/router';
 import { BackendService } from './backend.service';
-import {Component, OnInit, SkipSelf} from '@angular/core';
+import { Component, OnInit, SkipSelf } from '@angular/core';
 import { CheckConfig } from './sys-check.interfaces';
-import {CustomtextService} from "iqb-components";
+import { CustomtextService } from 'iqb-components';
 
 
 
@@ -27,8 +27,7 @@ export class StartComponent implements OnInit {
     this.dataLoading = true;
     this.bs.getCheckConfigs().subscribe(myConfigs => {
       this.checkConfigList = myConfigs;
-      // @ts-ignore
-      console.log(this.cts.getCustomText('app_title', 'tütü'))
+      console.log(this.cts.getCustomText('app_title', 'the app-title'));
       this.dataLoading = false;
     });
   }
diff --git a/src/app/sys-check/sys-check.component.ts b/src/app/sys-check/sys-check.component.ts
index 8166eb29..13b32ffa 100644
--- a/src/app/sys-check/sys-check.component.ts
+++ b/src/app/sys-check/sys-check.component.ts
@@ -1,9 +1,9 @@
 import { SysCheckDataService } from './sys-check-data.service';
 import { ActivatedRoute, ParamMap } from '@angular/router';
-import { Component, OnInit} from '@angular/core';
-import {BackendService} from './backend.service';
-import {Subscription} from "rxjs";
-import {CustomtextService} from "iqb-components";
+import {Component, OnDestroy, OnInit} from '@angular/core';
+import { BackendService } from './backend.service';
+import { Subscription } from 'rxjs';
+import { CustomtextService } from 'iqb-components';
 
 
 interface Checks {
@@ -19,7 +19,7 @@ interface Checks {
   templateUrl: './sys-check.component.html',
   styleUrls: ['./sys-check.component.scss']
 })
-export class SysCheckComponent implements OnInit {
+export class SysCheckComponent implements OnInit, OnDestroy {
   private taskSubscription: Subscription = null;
   dataLoading = false;
 
@@ -63,7 +63,7 @@ export class SysCheckComponent implements OnInit {
           const myCustomTexts: {[key: string]: string} = {};
           checkConfig.customtexts.forEach(ct => {
             myCustomTexts[ct.key] = ct.value;
-          })
+          });
           this.cts.addCustomTexts(myCustomTexts);
         }
         this.ds.nextTask();
diff --git a/src/app/sys-check/unit-check/tc-navi-buttons/unit-navi-buttons.component.ts b/src/app/sys-check/unit-check/tc-navi-buttons/unit-navi-buttons.component.ts
index fc58ae7f..7efa477a 100644
--- a/src/app/sys-check/unit-check/tc-navi-buttons/unit-navi-buttons.component.ts
+++ b/src/app/sys-check/unit-check/tc-navi-buttons/unit-navi-buttons.component.ts
@@ -1,5 +1,5 @@
 import { SysCheckDataService } from '../../sys-check-data.service';
-import { Component, OnInit } from '@angular/core';
+import { Component } from '@angular/core';
 
 @Component({
   selector: 'tc-navi-buttons',
diff --git a/src/app/sys-check/unit-check/unit-check.component.html b/src/app/sys-check/unit-check/unit-check.component.html
index 46268b6d..13a75a20 100644
--- a/src/app/sys-check/unit-check/unit-check.component.html
+++ b/src/app/sys-check/unit-check/unit-check.component.html
@@ -5,7 +5,7 @@
   </mat-card-title>
   <mat-card-subtitle>Bitte beachten Sie die Anweisungen in den einzelnen Aufgaben und bearbeiten Sie hierzu die Fragen auf der rechten Seite.</mat-card-subtitle>
 
-  <tc-navi-buttons></tc-navi-buttons><!-- TODO needed? -->
+  <tc-navi-buttons></tc-navi-buttons>
 </mat-card-header>
 
 <mat-card-content style="height: 610px; overflow: auto">
diff --git a/src/app/test-controller/test-controller.module.ts b/src/app/test-controller/test-controller.module.ts
index 36adf4b9..7deb84e5 100644
--- a/src/app/test-controller/test-controller.module.ts
+++ b/src/app/test-controller/test-controller.module.ts
@@ -1,4 +1,4 @@
-import {IqbComponentsModule} from "iqb-components";
+import { IqbComponentsModule } from 'iqb-components';
 
 export { TestControllerService } from './test-controller.service';
 import { NgModule } from '@angular/core';
diff --git a/src/app/test-controller/unithost/unit-routing-guards.ts b/src/app/test-controller/unithost/unit-routing-guards.ts
index 37f45d5e..ba5e494f 100644
--- a/src/app/test-controller/unithost/unit-routing-guards.ts
+++ b/src/app/test-controller/unithost/unit-routing-guards.ts
@@ -1,5 +1,5 @@
 import { StartLockInputComponent } from '../start-lock-input/start-lock-input.component';
-import {ConfirmDialogComponent, ConfirmDialogData, CustomtextService} from 'iqb-components';
+import { ConfirmDialogComponent, ConfirmDialogData, CustomtextService } from 'iqb-components';
 import { MatDialog, MatSnackBar } from '@angular/material';
 import { TestControllerService } from '../test-controller.service';
 import { switchMap, map, filter, take } from 'rxjs/operators';
@@ -146,7 +146,10 @@ export class UnitActivateGuard implements CanActivate {
                   return of(true);
 
                 } else {
-                  this.snackBar.open('Die Eingabe war nicht korrekt.', this.cts.getCustomText('booklet_codeToEnterTitle'), {duration: 3000});
+                  this.snackBar.open(
+                    'Die Eingabe war nicht korrekt.', this.cts.getCustomText('booklet_codeToEnterTitle'),
+                    {duration: 3000}
+                  );
                   return of(false);
                 }
               }
-- 
GitLab