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.
@@ -20,7 +20,13 @@ import {
SCCreativeWorkWithoutReferences,
} from './abstract/creative-work';
import {SCThingMeta, SCThingType} from './abstract/thing';
import {SCAcademicPriceGroup, SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta, SCThingThatCanBeOfferedTranslatableProperties, SCThingThatCanBeOfferedWithoutReferences} from './abstract/thing-that-can-be-offered';
import {
SCAcademicPriceGroup,
SCThingThatCanBeOffered,
SCThingThatCanBeOfferedMeta,
SCThingThatCanBeOfferedTranslatableProperties,
SCThingThatCanBeOfferedWithoutReferences,
} from './abstract/thing-that-can-be-offered';
import {
SCThingWithCategoriesSpecificValues,
SCThingWithCategoriesTranslatableProperties,
@@ -31,7 +37,8 @@ import {
/**
* Categories of a book
*/
export type SCBookCategories = 'audio'
export type SCBookCategories =
| 'audio'
| 'book'
| 'cd'
| 'dvd'
@@ -55,8 +62,8 @@ export type SCBookCategories = 'audio'
*/
export interface SCBookWithoutReferences
extends SCCreativeWorkWithoutReferences,
SCThingThatCanBeOfferedWithoutReferences,
SCThingWithCategoriesWithoutReferences<SCBookCategories, SCThingWithCategoriesSpecificValues> {
SCThingThatCanBeOfferedWithoutReferences,
SCThingWithCategoriesWithoutReferences<SCBookCategories, SCThingWithCategoriesSpecificValues> {
/**
* Categories of a book
*/
@@ -96,8 +103,8 @@ export interface SCBookWithoutReferences
*/
export interface SCBook
extends SCCreativeWork,
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
SCBookWithoutReferences {
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
SCBookWithoutReferences {
/**
* Translated properties of a book
*/
@@ -114,9 +121,8 @@ export interface SCBook
*/
export interface SCBookTranslatableFields
extends SCThingWithCategoriesTranslatableProperties,
SCThingThatCanBeOfferedTranslatableProperties,
SCCreativeWorkTranslatableProperties {
}
SCThingThatCanBeOfferedTranslatableProperties,
SCCreativeWorkTranslatableProperties {}
/**
* Meta information about a book
@@ -128,8 +134,10 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<SCBookCategories,
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBookCategories,
SCThingWithCategoriesSpecificValues
>().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldTranslations.de,
categories: 'Format',
ISBNs: 'ISBN',
@@ -137,8 +145,10 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
},
en: {
...new SCCreativeWorkMeta().fieldTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<SCBookCategories,
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBookCategories,
SCThingWithCategoriesSpecificValues
>().fieldTranslations.en,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldTranslations.en,
categories: 'format',
ISBNs: 'ISBN',
@@ -151,12 +161,12 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
*/
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta()
.fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<SCBookCategories,
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>()
.fieldValueTranslations.de,
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBookCategories,
SCThingWithCategoriesSpecificValues
>().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldValueTranslations.de,
categories: {
audio: 'Tonträger',
book: 'Buch',
@@ -180,12 +190,12 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
type: 'Buch',
},
en: {
...new SCCreativeWorkMeta()
.fieldValueTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<SCBookCategories,
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>()
.fieldValueTranslations.en,
...new SCCreativeWorkMeta().fieldValueTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBookCategories,
SCThingWithCategoriesSpecificValues
>().fieldValueTranslations.en,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldValueTranslations.en,
type: SCThingType.Book,
categories: {
audio: 'audio material',