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

@ -29,7 +29,7 @@ export class ValidateLanguageCompleteness extends DesugaringStep<ThemeConfig> {
constructor(...languages: string[]) {
super(
"ValidateLanguageCompleteness",
"Checks that the given object is fully translated in the specified languages",
"Checks that the given object is fully translated in the specified languages"
)
this._languages = languages ?? ["en"]
}
@ -132,7 +132,7 @@ class OverrideShadowingCheck extends DesugaringStep<ThemeConfigJson> {
constructor() {
super(
"OverrideShadowingCheck",
"Checks that an 'overrideAll' does not override a single override",
"Checks that an 'overrideAll' does not override a single override"
)
}
@ -267,7 +267,7 @@ export class DetectConflictingAddExtraTags extends DesugaringStep<TagRenderingCo
constructor() {
super(
"DetectConflictingAddExtraTags",
"The `if`-part in a mapping might set some keys. Those keys are not allowed to be set in the `addExtraTags`, as this might result in conflicting values",
"The `if`-part in a mapping might set some keys. Those keys are not allowed to be set in the `addExtraTags`, as this might result in conflicting values"
)
}
@ -311,7 +311,7 @@ export class DetectNonErasedKeysInMappings extends DesugaringStep<QuestionableTa
constructor() {
super(
"DetectNonErasedKeysInMappings",
"A tagRendering might set a freeform key (e.g. `name` and have an option that _should_ erase this name, e.g. `noname=yes`). Under normal circumstances, every mapping/freeform should affect all touched keys",
"A tagRendering might set a freeform key (e.g. `name` and have an option that _should_ erase this name, e.g. `noname=yes`). Under normal circumstances, every mapping/freeform should affect all touched keys"
)
}
@ -407,7 +407,7 @@ export class DetectMappingsShadowedByCondition extends DesugaringStep<TagRenderi
constructor(forceError: boolean = false) {
super(
"DetectMappingsShadowedByCondition",
"Checks that, if the tagrendering has a condition, that a mapping is not contradictory to it, i.e. that there are no dead mappings",
"Checks that, if the tagrendering has a condition, that a mapping is not contradictory to it, i.e. that there are no dead mappings"
)
this._forceError = forceError
}
@ -598,7 +598,7 @@ export class ValidatePossibleLinks extends DesugaringStep<string | Record<string
constructor() {
super(
"ValidatePossibleLinks",
"Given a possible set of translations, validates that <a href=... target='_blank'> does have `rel='noopener'` set",
"Given a possible set of translations, validates that <a href=... target='_blank'> does have `rel='noopener'` set"
)
}
@ -657,10 +657,7 @@ export class CheckTranslation extends DesugaringStep<Translatable> {
private readonly _allowUndefined: boolean
constructor(allowUndefined: boolean = false) {
super(
"CheckTranslation",
"Checks that a translation is valid and internally consistent",
)
super("CheckTranslation", "Checks that a translation is valid and internally consistent")
this._allowUndefined = allowUndefined
}
@ -1037,7 +1034,7 @@ export class DetectDuplicatePresets extends DesugaringStep<ThemeConfig> {
constructor() {
super(
"DetectDuplicatePresets",
"Detects mappings which have identical (english) names or identical mappings.",
"Detects mappings which have identical (english) names or identical mappings."
)
}
@ -1101,7 +1098,10 @@ export class ValidateThemeEnsemble extends Conversion<
>
> {
constructor() {
super("ValidateThemeEnsemble", "Validates that all themes together are logical, i.e. no duplicate ids exists within (overriden) themes")
super(
"ValidateThemeEnsemble",
"Validates that all themes together are logical, i.e. no duplicate ids exists within (overriden) themes"
)
}
convert(