Chore: housekeeping, linting

This commit is contained in:
Pieter Vander Vennet 2025-06-04 00:21:28 +02:00
parent f942529755
commit 30d00eb06d
74 changed files with 998 additions and 623 deletions

View file

@ -1,4 +1,14 @@
import { Concat, Conversion, DesugaringContext, DesugaringStep, Each, Fuse, On, Pass, SetDefault } from "./Conversion"
import {
Concat,
Conversion,
DesugaringContext,
DesugaringStep,
Each,
Fuse,
On,
Pass,
SetDefault,
} from "./Conversion"
import { ThemeConfigJson } from "../Json/ThemeConfigJson"
import { PrepareLayer, RewriteSpecial } from "./PrepareLayer"
import { LayerConfigJson } from "../Json/LayerConfigJson"
@ -15,7 +25,11 @@ class SubstituteLayer extends Conversion<string | LayerConfigJson, LayerConfigJs
private readonly _state: DesugaringContext
constructor(state: DesugaringContext) {
super("SubstituteLayer", "Converts the identifier of a builtin layer into the actual layer, or converts a 'builtin' syntax with override in the fully expanded form. Note that 'tagRenderings+' will be inserted before 'leftover-questions'", [])
super(
"SubstituteLayer",
"Converts the identifier of a builtin layer into the actual layer, or converts a 'builtin' syntax with override in the fully expanded form. Note that 'tagRenderings+' will be inserted before 'leftover-questions'",
[]
)
this._state = state
}
@ -170,7 +184,7 @@ export class AddDefaultLayers extends DesugaringStep<ThemeConfigJson> {
constructor(state: DesugaringContext) {
super(
"AddDefaultLayers",
"Adds the default layers, namely: " + Constants.added_by_default.join(", "),
"Adds the default layers, namely: " + Constants.added_by_default.join(", ")
)
this._state = state
}
@ -211,7 +225,7 @@ class AddContextToTranslationsInLayout extends DesugaringStep<ThemeConfigJson> {
constructor() {
super(
"AddContextToTranlationsInLayout",
"Adds context to translations, including the prefix 'themes:json.id'; this is to make sure terms in an 'overrides' or inline layer are linkable too",
"Adds context to translations, including the prefix 'themes:json.id'; this is to make sure terms in an 'overrides' or inline layer are linkable too"
)
}
@ -229,7 +243,7 @@ class ApplyOverrideAll extends DesugaringStep<ThemeConfigJson> {
constructor() {
super(
"ApplyOverrideAll",
"Applies 'overrideAll' onto every 'layer'. The 'overrideAll'-field is removed afterwards",
"Applies 'overrideAll' onto every 'layer'. The 'overrideAll'-field is removed afterwards"
)
}
@ -280,7 +294,7 @@ class AddDependencyLayersToTheme extends DesugaringStep<ThemeConfigJson> {
constructor(state: DesugaringContext) {
super(
"AddDependencyLayersToTheme",
`If a layer has a dependency on another layer, these layers are added automatically on the theme. (For example: defibrillator depends on 'walls_and_buildings' to snap onto. This layer is added automatically)`,
`If a layer has a dependency on another layer, these layers are added automatically on the theme. (For example: defibrillator depends on 'walls_and_buildings' to snap onto. This layer is added automatically)`
)
this._state = state
}
@ -462,7 +476,7 @@ class WarnForUnsubstitutedLayersInTheme extends DesugaringStep<ThemeConfigJson>
constructor() {
super(
"WarnForUnsubstitutedLayersInTheme",
"Generates a warning if a theme uses an inline layer; we recommend splitting of all layers in separate files",
"Generates a warning if a theme uses an inline layer; we recommend splitting of all layers in separate files"
)
}