refactor: move to eslint

This commit is contained in:
Rainer Killinger
2022-08-17 16:02:34 +02:00
parent c1dc7b4e8f
commit f864c64efa
92 changed files with 2287 additions and 1871 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 StApps
* Copyright (C) 2019-2022 Open 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.
@@ -24,7 +24,8 @@ import {SCThingMeta, SCThingType} from './abstract/thing';
import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered';
import {
SCThingWithCategoriesSpecificValues,
SCThingWithCategoriesWithoutReferences, SCThingWithCategoriesWithoutReferencesMeta,
SCThingWithCategoriesWithoutReferences,
SCThingWithCategoriesWithoutReferencesMeta,
} from './abstract/thing-with-categories';
import {SCUserGroup} from './abstract/user-groups';
import {SCOrganizationWithoutReferences} from './organization';
@@ -39,7 +40,7 @@ export type SCMessageCategories = 'news';
*/
export interface SCMessageWithoutReferences
extends SCCreativeWorkWithoutReferences,
SCThingWithCategoriesWithoutReferences<SCMessageCategories, SCThingWithCategoriesSpecificValues> {
SCThingWithCategoriesWithoutReferences<SCMessageCategories, SCThingWithCategoriesSpecificValues> {
/**
* Organizational unit for which the message is intended
*/
@@ -93,8 +94,7 @@ export interface SCMessageWithoutReferences
* @validatable
* @indexable
*/
export interface SCMessage
extends SCCreativeWork, SCMessageWithoutReferences {
export interface SCMessage extends SCCreativeWork, SCMessageWithoutReferences {
/**
* Translated fields of a message
*/
@@ -110,7 +110,8 @@ export interface SCMessage
* Translatable properties of a message
*/
export interface SCMessageTranslatableProperties
extends SCCreativeWorkTranslatableProperties, SCThingThatCanBeOfferedTranslatableProperties {
extends SCCreativeWorkTranslatableProperties,
SCThingThatCanBeOfferedTranslatableProperties {
/**
* Message itself
*
@@ -122,17 +123,17 @@ export interface SCMessageTranslatableProperties
/**
* Meta information about messages
*/
export class SCMessageMeta
extends SCThingMeta
implements SCMetaTranslations<SCMessage> {
export class SCMessageMeta extends SCThingMeta implements SCMetaTranslations<SCMessage> {
/**
* Translations of fields
*/
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<SCMessageCategories,
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCMessageCategories,
SCThingWithCategoriesSpecificValues
>().fieldTranslations.de,
audienceOrganizations: 'Zielgruppenorganisationen',
audiences: 'Zielgruppen',
dateCreated: 'Erstellungsdatum',
@@ -141,8 +142,10 @@ export class SCMessageMeta
},
en: {
...new SCCreativeWorkMeta().fieldTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<SCMessageCategories,
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCMessageCategories,
SCThingWithCategoriesSpecificValues
>().fieldTranslations.en,
audienceOrganizations: 'audience organizations',
audiences: 'audiences',
dateCreated: 'date created',
@@ -157,8 +160,10 @@ export class SCMessageMeta
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<SCMessageCategories,
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCMessageCategories,
SCThingWithCategoriesSpecificValues
>().fieldValueTranslations.de,
audiences: {
employees: 'Angestellte',
guests: 'Gäste',
@@ -171,8 +176,10 @@ export class SCMessageMeta
},
en: {
...new SCCreativeWorkMeta().fieldValueTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<SCMessageCategories,
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCMessageCategories,
SCThingWithCategoriesSpecificValues
>().fieldValueTranslations.en,
type: SCThingType.Message,
},
};