feat: separate prettier from eslint

This commit is contained in:
Rainer Killinger
2023-01-11 13:25:18 +01:00
committed by Thea Schöbl
parent 939fb6ef0f
commit a88d000ccd
381 changed files with 17952 additions and 38411 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 StApps
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
@@ -14,12 +14,7 @@
*/
import {Component, Input, OnDestroy} from '@angular/core';
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
import {
SCLanguage,
SCThingTranslator,
SCThingType,
SCTranslations,
} from '@openstapps/core';
import {SCLanguage, SCThingTranslator, SCThingType, SCTranslations} from '@openstapps/core';
import {Subscription} from 'rxjs';
import {ContextMenuService} from './context-menu.service';
import {FilterContext, SortContext, SortContextOption} from './context-type';
@@ -83,8 +78,7 @@ export class ContextMenuComponent implements OnDestroy {
private translateService: TranslateService,
private readonly contextMenuService: ContextMenuService,
) {
this.language = this.translateService
.currentLang as keyof SCTranslations<SCLanguage>;
this.language = this.translateService.currentLang as keyof SCTranslations<SCLanguage>;
this.translator = new SCThingTranslator(this.language);
this.subscriptions.push(
@@ -111,10 +105,7 @@ export class ContextMenuComponent implements OnDestroy {
/**
* Returns translated property name
*/
getTranslatedPropertyName(
property: string,
onlyForType?: SCThingType,
): string {
getTranslatedPropertyName(property: string, onlyForType?: SCThingType): string {
return (
this.translator.translatedPropertyNames(
onlyForType ?? SCThingType.AcademicEvent,
@@ -126,11 +117,7 @@ export class ContextMenuComponent implements OnDestroy {
/**
* Returns translated property value
*/
getTranslatedPropertyValue(
onlyForType: SCThingType,
field: string,
key?: string,
): string | undefined {
getTranslatedPropertyValue(onlyForType: SCThingType, field: string, key?: string): string | undefined {
return this.translator.translatedPropertyValue(onlyForType, field, key);
}